Commit 3330a845 authored by Soichiro Morisaki's avatar Soichiro Morisaki
Browse files

lalinference_pipe_utils.py: enable using psd.xml.gz only for distance max calculation

Previously, if we set distance max with psd.xml.gz, we necessarily have to use that for PSD.
This patch enables using psd.xml.gz only for distance max calculation. Whether psd.xml.gz is
used for PSD is controlled by ignore-gracedb-psd option.
parent ba12fd34
......@@ -870,15 +870,17 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
seglen = int(np.ceil(self.config.getfloat('engine','seglen')))
if self.config.has_option('lalinference','seglen'):
seglen = self.config.getint('lalinference','seglen')
if os.path.isfile(os.path.join(self.basepath,'psd.xml.gz')) or self.config.has_option('condor','bayesline') or self.config.has_option('condor','bayeswave'):
try:
use_gracedbpsd = (not self.config.getboolean('input','ignore-gracedb-psd'))
except:
use_gracedbpsd = True
if (use_gracedbpsd and os.path.isfile(os.path.join(self.basepath,'psd.xml.gz'))) or self.config.has_option('condor','bayesline') or self.config.has_option('condor','bayeswave'):
psdlength = 0
padding = 0
self.config.set('input','padding',str(padding))
if self.config.has_option('condor','bayeswave'):
if (np.log2(seglen)%1):
seglen = np.power(2., np.ceil(np.log2(seglen)))
else:
psdlength = 32*seglen
else:
......@@ -1065,11 +1067,6 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
client = GraceDb()
print("Download %s coinc.xml" % gid)
coinc_file_obj = client.files(gid, "coinc.xml")
try:
downloadpsd = (not self.config.getboolean('input','ignore-gracedb-psd'))
except:
downloadpsd = True
if downloadpsd:
print("Download %s psd.xml.gz" % gid)
try:
psd_file_obj = client.files(gid, "psd.xml.gz")
......
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