diff --git a/gstlal-calibration/bin/gstlal_compute_strain b/gstlal-calibration/bin/gstlal_compute_strain index 9c5fd765811dea97945c5b54c4a0d5e89ef7855f..51cd7716f5c5aa6bf727c82210287212647bafae 100755 --- a/gstlal-calibration/bin/gstlal_compute_strain +++ b/gstlal-calibration/bin/gstlal_compute_strain @@ -282,7 +282,7 @@ parser.add_option("--powerlines-freq-var", metavar = "Hz", type = float, default parser.add_option("--witness-channel-list", metavar = "name", default = None, help = "List of witness channels to use to subtract noise from h(t), given as a string. Use semicolons (;) to separate channels/groups of channels that should be processed separately. Use commas to separate channels that should be processed together. For example, --witness-channel-list=\"chan1,chan2,chan3;chan4,chan5\". This means the pipeline will process the first 3 channels together and the last 2 channels together. (Default is to not use any witness channels.)") parser.add_option("--witness-channel-sr", metavar = "Hz", type = int, default = 2048, help = "Sample rate at which transfer functions will be computed and witness channels will be filtered. (Default = 2048 Hz)") parser.add_option("--witness-channel-fft-time", metavar = "seconds", type = float, default = 4.0, help = "The length in seconds of the fast Fourier transforms used to compute transfer functions between witness channels and h(t). The fft's are windowed with Hann windows and overlapped. (Default = 4.0)") -parser.add_option("--num-witness-ffts", metavar = "integer", type = int, default = 128, help = "The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). (Default = 128)") +parser.add_option("--num-witness-ffts", metavar = "integer", type = int, default = 1800, help = "The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). (Default = 128)") parser.add_option("--witness-fir-length", metavar = "seconds", type = float, default = 0.5, help = "The length in seconds of the filters applied to the witness channels before subtracting from h(t) (Default = 0.5)") parser.add_option("--witness-frequency-resolution", metavar = "Hz", type = float, default = 1.0, help = "The frequency resolution of the filters applied to the witness channels before subtracting from h(t). It can be advantageous to lower the frequency resolution in order to average over excess noise. (Default = 1.0)") parser.add_option("--witness-notch-frequencies", metavar = "list", default = None, help = "List of minima and maxima of frequency ranges where the Fourier transform of h(t) will be replaced by a straight line in the calculation of transfer functions between witness channels and h(t) for noise subtraction. Here is an example using the expected format: --witness-notch-frequencies=\"498.0,505.5,997.0,1008.5\" This can be useful, e.g., if there are loud lines in the signal that are not present in the witness channels. (Default is to not use any notches.)") diff --git a/gstlal-calibration/gst/lal/gstlal_trackfrequency.c b/gstlal-calibration/gst/lal/gstlal_trackfrequency.c index 0640671dc8c8515b42b61fdb7a5dec4201146cbe..8ba1417a30951168f5cf69e911bb814a21a381e9 100644 --- a/gstlal-calibration/gst/lal/gstlal_trackfrequency.c +++ b/gstlal-calibration/gst/lal/gstlal_trackfrequency.c @@ -149,10 +149,7 @@ static void trackfrequency_ ## DTYPE(const DTYPE *src, DTYPE *dst, gint64 size, } \ \ /* Reset the step size to search the next cycle */ \ - if(*current_frequency) \ - *check_step = (int) (0.2 * rate / *current_frequency + 0.61); \ - else \ - *check_step = 1; \ + *check_step = (int) (0.2 * rate / *current_frequency + 0.61) > 1 ? (int) (0.2 * rate / *current_frequency + 0.61) : 1; \ } \ /* We should be at the end of the output buffer now */ \ g_assert_cmpint(size, == , j); \ @@ -243,10 +240,7 @@ static void trackfrequency_complex_ ## DTYPE(const DTYPE complex *src, DTYPE *ds } \ \ /* Reset the step size to search the next cycle */ \ - if(*current_frequency) \ - *check_step = (int) (0.2 * rate / fabs(*current_frequency) + 0.61); \ - else \ - *check_step = 1; \ + *check_step = (int) (0.2 * rate / fabs(*current_frequency) + 0.61) > 1 ? (int) (0.2 * rate / fabs(*current_frequency) + 0.61) : 1; \ } \ /* We should be at the end of the output buffer now */ \ g_assert_cmpint(size, == , j); \