Introducing a TimeSeries.correlate() method
Created by: alurban
@duncanmmacleod, this pull request makes the following changes:
- Introduce a method,
TimeSeries.correlate()
, which convolvesself
with the phase reverse of a given signal, yielding the matched-filter SNR - The new method whitens both the input and the matched-filter if requested, using an ASD of the input followed by two calls to
TimeSeries.whiten()
- Add a unit test and documentation example for the new method (the latter requires
LIGO.ORG
credentials) - Update
TimeSeries.whiten()
to normalize by expected standard deviation, rather than observed - Update the unit test for
TimeSeries.whiten()
Note, the SNR timeseries returned by TimeSeries.correlate()
has the same length and timestamps as self
. Both self
and the matched-filter argument are detrended (to give the output zero mean), and the output SNR is normalized by its expected standard deviation (to give unit variance). Users will have to remember to take the absolute value of the output if they don't care about minus signs.
This should be considered a target for gwpy 0.13.0/1.0.0.
This fixes #892 (closed).