gwpy / gwsumm

Gravitational-wave interferometer summary information system
GNU General Public License v3.0
12 stars 23 forks source link

Bug in combined VT calculation if data is missing from beginning of span #381

Closed dethodav closed 9 months ago

dethodav commented 10 months ago

When the combined range is calculated, this is done point wise on this line: https://github.com/gwpy/gwsumm/blob/f658c159106fad11ab9ae051ecc65489978c846c/gwsumm/plot/range.py#L284

However, the resulting combined range array is the same length as the smallest input array. Hence if there is missing data from one detector, this causes problems. The case where this data is missing from the middle is addressed when the data is read, and the case when the data is missing from the beginning is addressed a few lines down. However, the case where the data is missing from the beginning of the span (inbcluding if no data is present at all) is not.

This results in the VT being incorrectly calculated (due to mismatched timestamps) or not being calculated at all.