Skip to content
Snippets Groups Projects
Commit 6a71a58c authored by Chad Hanna's avatar Chad Hanna
Browse files

moved to using a channel name dict

parent 5a6b912e
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ import glue.ligolw.utils as utils
import glue.ligolw.utils.segments as ligolw_segments
from optparse import OptionParser
from gstlal.svd_bank import read_bank
from gstlal import inspiral
###############################################################################
# environment utilities
......@@ -98,7 +99,7 @@ class gstlal_inspiral_job(pipeline.CondorDAGJob):
self.add_condor_cmd('request_cpus', '12')
self.add_condor_cmd('+RequiresMultipleCores', 'True')
self.tag_base = tag_base
self.add_condor_cmd('environment',"KMP_LIBRARY=serial;MKL_SERIAL=yes")
#self.add_condor_cmd('environment',"KMP_LIBRARY=serial;MKL_SERIAL=yes")
self.set_sub_file(tag_base+'.sub')
self.set_stdout_file('logs/'+tag_base+'-$(macroid)-$(macronodename)-$(cluster)-$(process).out')
self.set_stderr_file('logs/'+tag_base+'-$(macroid)-$(macronodename)-$(cluster)-$(process).err')
......@@ -109,7 +110,7 @@ class gstlal_inspiral_node(pipeline.CondorDAGNode):
A gstlal_inspiral node
"""
#FIXME add frame segments, name and veto segments name
def __init__(self, job, dag, gps_start_time, gps_end_time, channel, reference_psd, svd_bank, frame_cache = None, tmp_space=log_path(), ht_gate_thresh=10.0, injections=None, control_peak_time = 4, fir_stride = 4, p_node=[]):
def __init__(self, job, dag, gps_start_time, gps_end_time, channel_dict, reference_psd, svd_bank, frame_cache = None, tmp_space=log_path(), ht_gate_thresh=10.0, injections=None, control_peak_time = 4, fir_stride = 4, p_node=[]):
pipeline.CondorDAGNode.__init__(self,job)
if frame_cache is None:
......@@ -118,7 +119,7 @@ class gstlal_inspiral_node(pipeline.CondorDAGNode):
self.add_var_opt("frame-cache", frame_cache)
self.add_var_opt("gps-start-time",gps_start_time)
self.add_var_opt("gps-end-time",gps_end_time)
self.add_var_opt("channel-name", channel)
self.add_var_opt("channel-name", inspiral.pipeline_channel_list_from_channel_dict(channel_dict))
if reference_psd is not None:
self.add_var_opt("reference-psd", reference_psd)
self.add_var_opt("svd-bank", svd_bank)
......@@ -208,7 +209,7 @@ def parse_command_line():
parser.add_option("--bank-cache", metavar = "filenames", help = "Set the bank cache files in format H1=H1.cache,H2=H2.cache, etc..")
parser.add_option("--gps-start-time", metavar = "GPS", help = "Set the gps start time in seconds", type="int")
parser.add_option("--gps-stop-time", metavar = "GPS", help = "Set the gps stop time in seconds", type="int")
parser.add_option("--channel", metavar = "name", help = "Set the channel name (default=LSC-STRAIN)", default="LSC-STRAIN")
parser.add_option("--channel", metavar = "name", default=[], action = "append", help = "Set the name of the channel to process (optional). The default is \"LSC-STRAIN\" for all detectors. Override with IFO=CHANNEL-NAME can be given multiple times")
parser.add_option("--ht-gate-threshold", metavar = "float", help = "Set the h(t) gate threshold to reject glitches", type="float")
parser.add_option("--num-banks", metavar = "int", type = "int", help = "the number of banks per job")
......@@ -222,15 +223,16 @@ def parse_command_line():
#FIXME add consistency check?
bankcache = parse_cache_str(options.bank_cache)
channel_dict = inspiral.channel_dict_from_channel_list(options.channel)
return options, filenames, bankcache
return options, filenames, bankcache, channel_dict
###############################################################################
# MAIN
###############################################################################
options, filenames, bank_cache = parse_command_line()
options, filenames, bank_cache, channel_dict = parse_command_line()
try: os.mkdir("logs")
except: pass
......@@ -249,7 +251,7 @@ gstlalInspiralJob = gstlal_inspiral_job()
trials_factor = 0
for s in build_bank_string(bank_cache, options.num_banks):
gstlal_inspiral_node(gstlalInspiralJob, dag, int(options.gps_start_time), int(options.gps_stop_time), options.channel, frame_cache = options.frame_cache, reference_psd=options.reference_psd, svd_bank=s, injections=options.injections, ht_gate_thresh = options.ht_gate_threshold)
gstlal_inspiral_node(gstlalInspiralJob, dag, int(options.gps_start_time), int(options.gps_stop_time), channel_dict, frame_cache = options.frame_cache, reference_psd=options.reference_psd, svd_bank=s, injections=options.injections, ht_gate_thresh = options.ht_gate_threshold)
dag.write_sub_files()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment