From c0033740cf291a82af2378b2a879eaa06b748f39 Mon Sep 17 00:00:00 2001 From: Evan Goetz Date: Wed, 15 Jul 2026 17:56:08 -0700 Subject: [PATCH] Fix SEI watchdog plotting (data access issue) The SeiWatchDogPlot.draw() class method accesses data (oof) and may end up trying to access data beyond the end of the frame cache because the current class initialization uses an int() truncation to the GPS time used for the centre of the plot range. This sometimes results in an incorrect frame cache that the reading of data is a different range. To fix this, we use floor and ceil to make sure the full range of data is selected --- gwsumm/plot/sei.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gwsumm/plot/sei.py b/gwsumm/plot/sei.py index 916aff28..48f653b9 100644 --- a/gwsumm/plot/sei.py +++ b/gwsumm/plot/sei.py @@ -21,6 +21,7 @@ import re from configparser import NoSectionError, NoOptionError +from math import ceil, floor from matplotlib.pyplot import subplots from matplotlib.ticker import NullLocator @@ -46,7 +47,7 @@ def __init__(self, gpstime, chamber, sensor, config, outfile, ifo=None, """Configure a new `SeiWatchDogPlot`. """ super().__init__( - [], int(gpstime) - duration/2., int(gpstime) + duration/2., + [], floor(gpstime - duration/2.), ceil(gpstime + duration/2.), ) # get params