diff --git a/gstlal-inspiral/bin/gstlal_inspiral_calc_snr b/gstlal-inspiral/bin/gstlal_inspiral_calc_snr index 485b773171521c00722572159af52d82db75cc25..5789721c18263bc84e625998141de25e2e4c0245 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_calc_snr +++ b/gstlal-inspiral/bin/gstlal_inspiral_calc_snr @@ -136,8 +136,8 @@ def parse_command_line(): group.add_option("--outdir", metavar = "directory", type = "str", help = "Output directory for SNR(s) (require).") group.add_option("--mode", metavar = "method", type = "int", default = 0, help = "The method (0 = LLOID / 1 = FIR) that is used to calculate SNR (default = 0).") group.add_option("--complex", action = "store_true", help = "Choose whether to output the complex snr or not.") - group.add_option("--start", metavar = "seconds", type = "int", help = "Start SNR time series at GPS time '--start' (require).") - group.add_option("--end", metavar = "seconds", type = "int", help = "End SNR time series at GPS time '--end' (require).") + group.add_option("--start", metavar = "seconds", type = "float", help = "Start SNR time series at GPS time '--start' (require).") + group.add_option("--end", metavar = "seconds", type = "float", help = "End SNR time series at GPS time '--end' (require).") group.add_option("--output-width", metavar = "bits", type = "int", default = 32, help = "The size of the output data, can only be 32 or 64 bits (default = 32 bits).") 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) diff --git a/gstlal-inspiral/python/svd_bank_snr.py b/gstlal-inspiral/python/svd_bank_snr.py index abeeb9d4f6f83783b63c28a721f042a415407591..b06802c3c2eae14d0d1a5794083faa140d85466d 100644 --- a/gstlal-inspiral/python/svd_bank_snr.py +++ b/gstlal-inspiral/python/svd_bank_snr.py @@ -87,7 +87,6 @@ class SNR_Pipeline(object): "f0": 0, "sampleUnits" : lal.DimensionlessUnit, "length" : len(data)} - if data.dtype == numpy.float32: tseries = lal.CreateREAL4TimeSeries(**para) elif data.dtype == numpy.float64: @@ -103,7 +102,7 @@ class SNR_Pipeline(object): return tseries def get_snr_series(self, COMPLEX = False): - assert snr_info["epoch"] is not None, "No SNRs are obtained, check your start time." + assert self.snr_info["epoch"] is not None, "No SNRs are obtained, check your start time." gps_start = self.snr_info["epoch"].gpsSeconds + self.snr_info["epoch"].gpsNanoSeconds * 10.**-9 gps = gps_start + numpy.arange(len(self.snr_info["data"])) * self.snr_info["deltaT"]