Skip to content

Split up functionality of TimeSeries.gate()

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

Created by: dethodav

This PR splits TimeSeries.gate() into two functions:

  • TimeSeries.find_gates() - find peaks in whitened timeseries and returns the segments to gate
  • TimeSeries.gate() - now only calls TimeSeries.find_gates() and TimeSeries.mask() to find and apply gates

The motivation for this change is that it would be helpful to be able to record the segments that were gated. Users hoping to do this can now use TimeSeries.find_gates() and TimeSeries.mask() separately.

Since this PR is only reorganizing code, the result of TimeSeries.gate() remains unchanged.

Merge request reports