There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit aab70042 authored by Ryan Michael Magee's avatar Ryan Michael Magee

far.py: enabled multiple dtdphi pdf capabilities

parent 65fd4636
......@@ -62,6 +62,7 @@ import numpy
import random
from scipy import interpolate
from scipy import optimize
import os
import sys
import time
......@@ -131,8 +132,8 @@ class RankingStat(snglcoinc.LnLikelihoodRatioMixin):
# network SNR threshold
network_snrsq_threshold = 49.0
def __init__(self, template_ids = None, instruments = frozenset(("H1", "L1", "V1")), population_model_file = None, min_instruments = 1, delta_t = 0.005, horizon_factors = None):
self.numerator = inspiral_lr.LnSignalDensity(template_ids = template_ids, instruments = instruments, delta_t = delta_t, population_model_file = population_model_file, min_instruments = min_instruments, horizon_factors = horizon_factors)
def __init__(self, template_ids = None, instruments = frozenset(("H1", "L1", "V1")), population_model_file = None, dtdphi_file = None, min_instruments = 1, delta_t = 0.005, horizon_factors = None):
self.numerator = inspiral_lr.LnSignalDensity(template_ids = template_ids, instruments = instruments, delta_t = delta_t, population_model_file = population_model_file, dtdphi_file = dtdphi_file, min_instruments = min_instruments, horizon_factors = horizon_factors)
self.denominator = inspiral_lr.LnNoiseDensity(template_ids = template_ids, instruments = instruments, delta_t = delta_t, min_instruments = min_instruments)
self.zerolag = inspiral_lr.LnLRDensity(template_ids = template_ids, instruments = instruments, delta_t = delta_t, min_instruments = min_instruments)
......@@ -209,6 +210,10 @@ class RankingStat(snglcoinc.LnLikelihoodRatioMixin):
def population_model_file(self):
return self.numerator.population_model_file
@property
def dtdphi_file(self, **kwargs):
return self.numerator.dtdphi_file
@property
def segmentlists(self):
return self.denominator.segmentlists
......@@ -222,7 +227,7 @@ class RankingStat(snglcoinc.LnLikelihoodRatioMixin):
return self
def copy(self):
new = type(self)(template_ids = self.template_ids, instruments = self.instruments, population_model_file = self.population_model_file, min_instruments = self.min_instruments, delta_t = self.delta_t)
new = type(self)(template_ids = self.template_ids, instruments = self.instruments, population_model_file = self.population_model_file, dtdphi_file = self.dtdphi_file, min_instruments = self.min_instruments, delta_t = self.delta_t)
new.numerator = self.numerator.copy()
new.denominator = self.denominator.copy()
new.zerolag = self.zerolag.copy()
......@@ -397,6 +402,7 @@ class DatalessRankingStat(RankingStat):
def __init__(self, *args, **kwargs):
self.numerator = inspiral_lr.DatalessLnSignalDensity(*args, **kwargs)
kwargs.pop("population_model_file", None)
kwargs.pop("dtdphi_file", None)
self.denominator = inspiral_lr.DatalessLnNoiseDensity(*args, **kwargs)
def finish(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment