Commit 26ea6772 authored by Salvatore Vitale's avatar Salvatore Vitale
Browse files

Implement common section of lalinference pipe ini file - redmine 973

Original: 805aa1c54be42cd0687cd2493a89055e776b4174
parent 96b4d69e
......@@ -103,8 +103,6 @@ channels=['H1:LDAS-STRAIN','L1:LDAS-STRAIN','V1:h_16384Hz']
#####################################################################################
[lalinference]
# Segment length to use for analysis (should be long enough for whole template
seglen=32
# fake-cache is used to specify the fake names for simulated data
# For simulated LIGO noise use 'LALLIGO', Virgo noise: 'LALVirgo'
......@@ -113,8 +111,9 @@ seglen=32
#fake-cache={'H1':'LALLIGO','L1':'LALLIGO','V1':'LALVirgo'}
#####################################################################################
[lalinferencenest]
# All options in this section are passed to lalinference_nest. Some useful ones are noted below
[engine]
# All options in this section are passed to lalinference_nest and lalinference_mcmc. Some useful ones are noted below
# Options passed to a sampler which does not know them will simply be ignored
# REQUIRED SETTINGS:
# Nlive specifies the number of live points for each job
......@@ -123,6 +122,9 @@ nlive=1024
# Sampling rate for data
srate=2048
# Segment length to use for analysis (should be long enough for whole template
seglen=32
# OPTIONAL SETTINGS:
# Use lalinference_nest's resume ability if the run is interrupted
......@@ -161,10 +163,6 @@ resume=
# Print progress information throughout the run
progress=
#####################################################################################
[lalinferencemcmc]
# Add options for lalinference_mcmc
# Many of which are the same as for lalinference_nest
#####################################################################################
[resultspage]
......
......@@ -354,8 +354,12 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
"""
#psdlength = self.config.getint('input','max-psd-length')
padding=self.config.getint('input','padding')
if self.config.has_option('lalinference','seglen'):
seglen = self.config.getint('lalinference','seglen')
if self.config.has_option('engine','seglen') or self.config.has_option('lalinference','seglen'):
if self.config.has_option('engine','seglen'):
seglen = self.config.getint('engine','seglen')
if self.config.has_option('lalinference','seglen'):
seglen = self.config.getint('lalinference','seglen')
if os.path.exists("psd.xml.gz"):
psdlength = 0
else:
......@@ -678,6 +682,8 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
node.set_injection(self.config.get('input','injection-file'),event.event_id)
if self.config.has_option('lalinference','seglen'):
node.set_seglen(self.config.getint('lalinference','seglen'))
elif self.config.has_option('engine','seglen'):
node.set_seglen(self.config.getint('engine','seglen'))
else:
node.set_seglen(event.duration)
if self.config.has_option('input','psd-length'):
......@@ -744,7 +750,10 @@ class EngineJob(pipeline.CondorDAGJob):
if cp.has_option('condor','queue'):
self.add_condor_cmd('+'+cp.get('condor','queue'),'True')
self.add_condor_cmd('Requirements','(TARGET.'+cp.get('condor','queue')+' =?= True)')
self.add_ini_opts(cp,self.engine)
if cp.has_section(self.engine):
self.add_ini_opts(cp,self.engine)
if cp.has_section('engine'):
self.add_ini_opts(cp,'engine')
self.add_opt('snrpath',snrpath)
self.set_stdout_file(os.path.join(logdir,'lalinference-$(cluster)-$(process)-$(node).out'))
self.set_stderr_file(os.path.join(logdir,'lalinference-$(cluster)-$(process)-$(node).err'))
......@@ -1103,7 +1112,6 @@ class MergeNSJob(pipeline.CondorDAGJob):
self.set_sub_file(submitFile)
self.set_stdout_file(os.path.join(logdir,'merge-$(cluster)-$(process).out'))
self.set_stderr_file(os.path.join(logdir,'merge-$(cluster)-$(process).err'))
self.add_opt('Nlive',cp.get('lalinferencenest','nlive'))
self.add_condor_cmd('getenv','True')
if cp.has_option('merge','npos'):
self.add_opt('npos',cp.get('merge','npos'))
......
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