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

added better channel name parsing

parent d1071490
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ from gstlal import pipeparts
from gstlal import lloidparts
from gstlal import reference_psd
from gstlal import streamthinca
from gstlal import inspiral
def excepthook(*args):
# system exception hook that forces hard exit. without this,
......@@ -106,7 +106,7 @@ def parse_command_line():
parser.add_option("--injections", metavar = "filename", help = "Set the name of the LIGO light-weight XML file from which to load injections (optional).")
parser.add_option("--veto-segments-file", metavar = "filename", help = "Set the name of the LIGO light-weight XML file from which to load vetoes (optional).")
parser.add_option("--veto-segments-name", metavar = "name", help = "Set the name of the segments to extract from the segment tables and use as the veto list.", default = "vetoes")
parser.add_option("--channel-name", metavar = "name", default = "LSC-STRAIN", help = "Set the name of the channel to process (optional). The default is \"LSC-STRAIN\".")
parser.add_option("--channel-name", metavar = "name", default = "LSC-STRAIN", 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("--nxydump-segment", metavar = "start:stop", default = ":", help = "Set the time interval to dump from nxydump elments (optional). The default is \":\", i.e. dump all time.")
parser.add_option("--output", metavar = "filename", help = "Set the name of the LIGO light-weight XML output file *.{xml,xml.gz} or an SQLite database *.sqlite (required).")
parser.add_option("--reference-psd", metavar = "filename", help = "Instead of measuring the noise spectrum, load the spectrum from this LIGO light-weight XML file (optional).")
......@@ -152,10 +152,11 @@ def parse_command_line():
# Get the banks and make the detectors
# FIXME add error checking on length of banks per detector, etc
svd_banks = parse_banks(options.svd_bank)
# FIXME if the channel names are different for different detectors this won't work
# You get a dictionary of channels keyed by ifo, can be overidden by command line, default is LSC-STRAIN
channel_dict = inspiral.channel_dict_from_channel_list(options.channel_name)
detectors = {}
for instrument in set(svd_banks.keys()):
detectors[instrument] = lloidparts.DetectorData(options.frame_cache, options.channel_name)
detectors[instrument] = lloidparts.DetectorData(options.frame_cache, channel_dict[instrument])
# FIXME: should also check for read permissions
required_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