From ded6025faa210d32cac97db1a7dacaff2a2d447a Mon Sep 17 00:00:00 2001
From: CHAD RICHARD HANNA <crh184@psu.edu>
Date: Tue, 4 Jun 2019 08:25:25 -0400
Subject: [PATCH] O3_chunks: use double time to define boundaries

---
 gstlal-inspiral/share/O3/O3_chunks | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gstlal-inspiral/share/O3/O3_chunks b/gstlal-inspiral/share/O3/O3_chunks
index 4a3975f348..5c3a7baaf4 100755
--- a/gstlal-inspiral/share/O3/O3_chunks
+++ b/gstlal-inspiral/share/O3/O3_chunks
@@ -81,6 +81,9 @@ for ifo1 in ifos:
 		except KeyError:
 			doublesegs[ifo1] = seglistdicts.intersection((ifo1, ifo2))
 
+
+# This is the set of segments when at least two ifos were on
+doublesegsunion = doublesegs.union(doublesegs.keys())
 # This is the set of segments when at least one ifo was on
 segs = seglistdicts.union(seglistdicts.keys())
 
@@ -93,7 +96,11 @@ def enoughtime(seglist, start, end):
 # that we only define boundaries when *no* ifos are on
 # 2000000000 is a placeholder to define a segment end.  
 chunks = segments.segmentlist([segments.segment(segs[0][0], 2000000000)])
-for seg in segs:
+
+# This places boundaries when only one ifo or less was on
+for seg in doublesegsunion:
+# this line would only take boundaries when no ifo was on
+#for seg in segs:
 	start = seg[0]
 	end = seg[1]
 	if all([enoughtime(s, chunks[-1][0], end) for s in doublesegs.values()]):
-- 
GitLab