Skip to content
Snippets Groups Projects
Commit e18e1884 authored by ChiWai Chan's avatar ChiWai Chan
Browse files

gstlal_inspiral_calc_snr : disable gating/veto on data

parent 75048a06
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,6 @@ Typical Usages: ...@@ -11,9 +11,6 @@ Typical Usages:
--gps-start-time --gps-start-time
--gps-end-time --gps-end-time
--injection --injection
--ht-gate-threshold
--veto-segments-file
--veto-segments-name
2. SVD bank options: 2. SVD bank options:
--svd-bank (require) --svd-bank (require)
...@@ -138,11 +135,6 @@ def parse_command_line(): ...@@ -138,11 +135,6 @@ def parse_command_line():
group.add_option("--instrument", metavar = "name", help = "The detector from which the --reference-psd and --frame-cache are loaded (require).") group.add_option("--instrument", metavar = "name", help = "The detector from which the --reference-psd and --frame-cache are loaded (require).")
parser.add_option_group(group) parser.add_option_group(group)
group = OptionGroup(parser, "Place Holder Options", "There are no needs to input anything")
group.add_option("--reconstruction_segment_list", metavar = "None", help = "There is no need to input anything into it, it will be automatically filled if --injection is provided.")
group.add_option("--veto-segments", metavar = "None", help = "There is no need to input anything into it, it will be automatically filled if --veto-segments-file and --veto-segments-name are provided.")
parser.add_option_group(group)
parser.add_option("--verbose", action = "store_true", help = "Be verbsoe.") parser.add_option("--verbose", action = "store_true", help = "Be verbsoe.")
options, args = parser.parse_args() options, args = parser.parse_args()
...@@ -190,22 +182,6 @@ def parse_command_line(): ...@@ -190,22 +182,6 @@ def parse_command_line():
if options.instrument not in set(gw_data_source_info.channel_dict): if options.instrument not in set(gw_data_source_info.channel_dict):
raise ValueError("No such instrument: %s in detectos: (%s)"% (options.instrument, ", ".join(set(gw_data_source_info.channel_dict)))) raise ValueError("No such instrument: %s in detectos: (%s)"% (options.instrument, ", ".join(set(gw_data_source_info.channel_dict))))
# Setting up injections if provided
# FIXME: test me
if options.injections:
offset_padding = max([int(abs(float(offset)))+2 for offset in bank.sngl_inspiral_table.get_end()])
options.reconstruction_segment_list = simulation.sim_inspiral_to_segment_list(options.injections, pad = offset_padding)
else:
options.reconstruction_segment_list = None
# Setting up vetos segments if provided
if options.veto_segments_file:
# FIXME: this is broken
segments_file = ligolw_utils.load_filename(options.veto_segments_file, verbose = options.verbose, contenthandler = ligolw.LIGOLWContentHandler)
options.veto_segments = ligolw_segments.segmenttable_get_by_name(segments_file, options.veto_segments_name).coalesce()
else:
options.veto_segments = None
return options, gw_data_source_info, bank, psd return options, gw_data_source_info, bank, psd
# Use Finite Impulse Response # Use Finite Impulse Response
...@@ -261,8 +237,6 @@ if options.mode == 0: ...@@ -261,8 +237,6 @@ if options.mode == 0:
options.instrument, options.instrument,
psd = psd, psd = psd,
psd_fft_length = options.psd_fft_length, psd_fft_length = options.psd_fft_length,
ht_gate_threshold = options.ht_gate_threshold,
veto_segments = options.veto_segments,
track_psd = options.track_psd, track_psd = options.track_psd,
width = options.output_width, width = options.output_width,
verbose = options.verbose verbose = options.verbose
......
...@@ -140,7 +140,7 @@ class SNR_Pipeline(object): ...@@ -140,7 +140,7 @@ class SNR_Pipeline(object):
return Gst.FlowReturn.OK return Gst.FlowReturn.OK
class LLOID_SNR(SNR_Pipeline): class LLOID_SNR(SNR_Pipeline):
def __init__(self, gw_data_source_info, bank, instrument, psd = None, psd_fft_length = 32, ht_gate_threshold = None, veto_segments = None, track_psd = False, width = 32, verbose = False): def __init__(self, gw_data_source_info, bank, instrument, psd = None, psd_fft_length = 32, ht_gate_threshold = float("inf"), veto_segments = None, track_psd = False, width = 32, verbose = False):
SNR_Pipeline.__init__(self, name = "gstlal_inspiral_lloid_snr", verbose = verbose) SNR_Pipeline.__init__(self, name = "gstlal_inspiral_lloid_snr", verbose = verbose)
self.snr_info["instrument"] = instrument self.snr_info["instrument"] = instrument
...@@ -196,7 +196,7 @@ class LLOID_SNR(SNR_Pipeline): ...@@ -196,7 +196,7 @@ class LLOID_SNR(SNR_Pipeline):
return self.get_snr_series(row_number, drop_first, drop_last) return self.get_snr_series(row_number, drop_first, drop_last)
class FIR_SNR(SNR_Pipeline): class FIR_SNR(SNR_Pipeline):
def __init__(self, gw_data_source_info, template, instrument, rate, latency, psd = None, psd_fft_length = 32, width = 32, track_psd = False, verbose = False): def __init__(self, gw_data_source_info, template, instrument, rate, latency, psd = None, psd_fft_length = 32, ht_gate_threshold = float("inf"), veto_segments = None, width = 32, track_psd = False, verbose = False):
SNR_Pipeline.__init__(self, name = "gstlal_inspiral_fir_snr", verbose = verbose) SNR_Pipeline.__init__(self, name = "gstlal_inspiral_fir_snr", verbose = verbose)
self.snr_info["instrument"] = instrument self.snr_info["instrument"] = instrument
...@@ -217,6 +217,8 @@ class FIR_SNR(SNR_Pipeline): ...@@ -217,6 +217,8 @@ class FIR_SNR(SNR_Pipeline):
instrument = instrument, instrument = instrument,
psd = psd[instrument], psd = psd[instrument],
psd_fft_length = psd_fft_length, psd_fft_length = psd_fft_length,
ht_gate_threshold = ht_gate_threshold,
veto_segments = veto_segments,
track_psd = track_psd, track_psd = track_psd,
width = width, width = width,
statevector = statevector, statevector = statevector,
......
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