Commit d3cf262b authored by Soichiro Morisaki's avatar Soichiro Morisaki fix a bug that fhigh is set to be the highest... fix a bug that fhigh is set to be the highest frequency of the gracedb PSD even if it is not used in PE.
parent 2e8b60e2
Pipeline #120159 passed with stages
in 120 minutes and 32 seconds
......@@ -188,7 +188,8 @@ class Event():
def create_events_from_coinc_and_psd(
coinc_xml_obj, psd_dict, gid=None, threshold_snr=None, flow=20.0, roq=False
coinc_xml_obj, psd_dict=None, gid=None, threshold_snr=None, flow=20.0,
roq=False, use_gracedbpsd=False
"""This function calculates seglen, fhigh, srate and horizon distance from
coinc.xml and psd.xml.gz from GraceDB and create list of Events as input of
......@@ -206,6 +207,8 @@ def create_events_from_coinc_and_psd(
lower frequecy cutoff for overlap calculation
roq: bool
Whether the run uses ROQ or not
use_gracedbpsd: bool
Whether the gracedb PSD is used or not in PE
import lal
......@@ -226,7 +229,7 @@ def create_events_from_coinc_and_psd(
# Parse PSD
if psd_dict is not None:
if psd_dict is not None and use_gracedbpsd:
psd = list(psd_dict.values())[0]
srate_psdfile = pow(
2.0, ceil(log(psd.f0 + psd.deltaF * ( - 1), 2))
......@@ -293,7 +296,7 @@ def create_events_from_coinc_and_psd(
srate = max(srate)
srate = srate_psdfile
if psd_dict is not None:
if psd_dict is not None and use_gracedbpsd:
fhigh = srate_psdfile/2.0 * 0.95 # Because of the drop-off near Nyquist of the PSD from gstlal
srate = None
......@@ -1146,9 +1149,15 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
psd_dict = None
use_gracedbpsd = (not self.config.getboolean('input','ignore-gracedb-psd'))
except (NoOptionError, NoSectionError):
use_gracedbpsd = True
events = create_events_from_coinc_and_psd(
coinc_xml_obj, psd_dict, gid, threshold_snr=threshold_snr, flow=flow,
coinc_xml_obj, psd_dict=psd_dict, gid=gid,
threshold_snr=threshold_snr, flow=flow,
# pipedown-database
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