From fbd7f1778580c4161d8df1f5be94522892ea5e63 Mon Sep 17 00:00:00 2001
From: Surabhi Sachdev <surabhi.sachdev@ligo.org>
Date: Thu, 13 Dec 2018 07:47:58 -0800
Subject: [PATCH] Fix end time recording for the shifted early warning
 waveforms

---
 gstlal-inspiral/python/cbc_template_fir.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gstlal-inspiral/python/cbc_template_fir.py b/gstlal-inspiral/python/cbc_template_fir.py
index 39737de598..f6f9eba28a 100644
--- a/gstlal-inspiral/python/cbc_template_fir.py
+++ b/gstlal-inspiral/python/cbc_template_fir.py
@@ -476,7 +476,7 @@ def generate_templates(template_table, approximant, psd, f_low, time_slices, aut
 				data, target_index = condition_ear_warn_template(approximant, data, epoch_time, sample_rate_max, max_shift_time)
 				data *= tukeywindow(data, samps = 32)
 				# record the new end times for the waveforms (since we performed the shifts)
-				row.end = LIGOTimeGPS(float(target_index-(len(data) - 1.))/sample_rate_max)
+				row.end = LIGOTimeGPS(float(target_index)/sample_rate_max)
 			else:
 				data *= tukeywindow(data, samps = 32)
 
-- 
GitLab