diff --git a/gstlal-calibration/gst/lal/gstlal_dqtukey.c b/gstlal-calibration/gst/lal/gstlal_dqtukey.c index 5b2ea5a2b19fc59d2c75ecc5ffc8158d20e26d43..17b0e5f27650387193801b3601cb45e5892846f7 100644 --- a/gstlal-calibration/gst/lal/gstlal_dqtukey.c +++ b/gstlal-calibration/gst/lal/gstlal_dqtukey.c @@ -332,7 +332,7 @@ double_ramp: \ if(!(i % num_cycle_in)) { \ for(j = 0; j < num_cycle_out; j++, dst++, (*ramp_down_index)++, (*ramp_up_index)++) { \ if(invert_window) \ - *dst = ramp[*ramp_down_index] * (1.0 - (*ramp_up_index < transition_samples ? ramp[*ramp_up_index] : 1.0)); \ + *dst = 1.0 - (1.0 - ramp[*ramp_down_index]) * (*ramp_up_index < transition_samples ? ramp[*ramp_up_index] : 1.0); \ else \ *dst = (1.0 - ramp[*ramp_down_index]) * (*ramp_up_index < transition_samples ? ramp[*ramp_up_index] : 1.0); \ \ diff --git a/gstlal-calibration/tests/lal_dqtukey_test.py b/gstlal-calibration/tests/lal_dqtukey_test.py index c5a2f88472a50cd95ab6a5d6ac3523c067ca5455..e45093d3ea17636b58a19904fb8673e2d07aa920 100755 --- a/gstlal-calibration/tests/lal_dqtukey_test.py +++ b/gstlal-calibration/tests/lal_dqtukey_test.py @@ -49,7 +49,8 @@ def lal_dqtukey_01(pipeline, name): rate_in = 16 # Hz rate_out = 16384 # Hz buffer_length = 1.0 # seconds - test_duration = 30.0 # seconds + test_duration = 300.0 # seconds + transition_samples = 997 # # build pipeline @@ -58,10 +59,10 @@ def lal_dqtukey_01(pipeline, name): head = test_common.int_test_src(pipeline, buffer_length = buffer_length, rate = rate_in, width = 32, test_duration = test_duration, wave = 5, freq = 0) head = pipeparts.mktee(pipeline, head) pipeparts.mknxydumpsink(pipeline, head, "%s_in.txt" % name) - normal = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = 1024, required_on = 2, required_off = 1, invert_control = False) - invert = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = 1024, required_on = 2, required_off = 1, invert_control = True) - invwin = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = 1024, required_on = 2, required_off = 1, invert_control = False, invert_window = True) - invboth = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = 1024, required_on = 2, required_off = 1, invert_control = True, invert_window = True) + normal = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = transition_samples, required_on = 2, required_off = 1, invert_control = False) + invert = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = transition_samples, required_on = 2, required_off = 1, invert_control = True) + invwin = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = transition_samples, required_on = 2, required_off = 1, invert_control = False, invert_window = True) + invboth = pipeparts.mkgeneric(pipeline, head, "lal_dqtukey", transition_samples = transition_samples, required_on = 2, required_off = 1, invert_control = True, invert_window = True) normal = pipeparts.mkcapsfilter(pipeline, normal, "audio/x-raw,rate=%s,format=F64LE" % rate_out) invert = pipeparts.mkcapsfilter(pipeline, invert, "audio/x-raw,rate=%s,format=F64LE" % rate_out) invwin = pipeparts.mkcapsfilter(pipeline, invwin, "audio/x-raw,rate=%s,format=F64LE" % rate_out)