def test_padding(self): segs = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, cache=True) segs2 = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, padding={'DATA':(8, -8)}, cache=True) self.assertTrue(abs(segs) > abs(segs2))
def test_bounds(self): segs = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, cache=True) segs_all = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, bounds={'DATA':(1126051217, 1126051217 + 100000)}, cache=True) segs_none = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, bounds={'DATA':(0, 10)}, cache=True) self.assertTrue(abs(segs) == abs(segs_all)) self.assertTrue(abs(segs) > abs(segs_none))
def test_padding(self): segs = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, cache=True) segs2 = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, padding={'DATA': (8, -8)}, cache=True) self.assertTrue(abs(segs) > abs(segs2))
def test_cumulative_query(self): segs1 = query_flag('H1', 'CBC_HW_INJ', 1126051217, 1126051217 + 100000, cache=True) segs2 = query_flag('H1', 'BURST_HW_INJ', 1126051217, 1126051217 + 100000, cache=True) segs = query_cumulative_flags('H1', ['CBC_HW_INJ', 'BURST_HW_INJ'], 1126051217, 1126051217 + 100000, cache=True) csegs = (segs1 + segs2).coalesce() self.assertTrue(abs(csegs - segs) == 0)
def test_bounds(self): segs = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, cache=True) segs_all = query_cumulative_flags( 'H1', ['DATA'], 1126051217, 1126051217 + 100000, bounds={'DATA': (1126051217, 1126051217 + 100000)}, cache=True) segs_none = query_cumulative_flags('H1', ['DATA'], 1126051217, 1126051217 + 100000, bounds={'DATA': (0, 10)}, cache=True) self.assertTrue(abs(segs) == abs(segs_all)) self.assertTrue(abs(segs) > abs(segs_none))