From bb76c95cb37244a156d51a4383f93611540fbb4c Mon Sep 17 00:00:00 2001
From: Chad Hanna <chad.hanna@ligo.org>
Date: Wed, 11 Jul 2018 19:13:33 -0700
Subject: [PATCH] gstlaldeglitchfilter: make the minimum veto segment 2 seconds
 and increase the taper length to one second on each side

---
 gstlal-ugly/gst/lal/gstlaldeglitchfilter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gstlal-ugly/gst/lal/gstlaldeglitchfilter.c b/gstlal-ugly/gst/lal/gstlaldeglitchfilter.c
index 789cf88de1..ac60512719 100644
--- a/gstlal-ugly/gst/lal/gstlaldeglitchfilter.c
+++ b/gstlal-ugly/gst/lal/gstlaldeglitchfilter.c
@@ -347,9 +347,10 @@ static GstFlowReturn process_buffer(GstLALDeglitchFilter *filter, GstBuffer * in
 			 */
 
 			guint64 duration = segstop - segstart;
-			g_assert(duration >= 1.0 * GST_SECOND); /* must be greater than or equal to 1.0s */
+			gdouble min_window_duration = 2.0 * GST_SECOND;
+			g_assert(duration >= min_window_duration); /* must be greater than or equal to 1.0s */
 			g_assert(filter->rate >= 128); /* This probably doesnt make sense for low sample rates, so this is just here as a safety check. FIXME */
-			gdouble beta = 1.0 * GST_SECOND / duration;
+			gdouble beta = min_window_duration / duration;
 			guint length = stopix - startix;
 
 			REAL8Window *window = XLALCreateTukeyREAL8Window(length, beta);
-- 
GitLab