Skip to content

Add support for a minimum gap when appending timeseries

Duncan Macleod requested to merge github/fork/dethodav/append_bug into main

Created by: dethodav

This PR add support for the min_gap argument to the series.append() and TimeSeriesList.join() functions. The reason for this additional argument is how the append() function checks if two series are continuous. Updating the append() function in this way would make it significantly easier for the LIGO summary pages to display range data from only times during observing mode.

Currently, append() assumes that if the gap between two series is less than dx from the series, then the two series overlap. In general, this behavior is desired (and would still be the default behavior). However, if the user has downsampled their data, it is possible that the user does intend to append two series that have a gap smaller than dx. The min_gap argument supports this behavior by allowing the user to specify a minimum gap that will still be considered discontinuous.

An example where this appeared is dealing with trend data that was further resampled. The input time series had dt = 60s, and then the data was further downsampled so that dt = 300s. This meant that if there was a data gap less than 5 minutes long, attempting to append these two time series was not possible. In this case, the user would want to set min_gap=60.

This PR still needs to include updates to the code documentation, but I wanted to start the PR to receive feedback.

Merge request reports

Loading