Current whitening defaults considered harmful
Created by: alurban
Introduced in GWPy 0.12.0, the new TimeSeries.whiten()
method is causing minor confusion with users who expect the output timeseries to have the same length and starting time as the input, like the older method gave. For a 0.12.1 point release, whiten()
should return a non-cropped output. To prevent huge wings from spectral leakage during filter settle-in, a segment of data half the length of the whitening filter will need to be windowed on the left and right boundaries of the input.
A separate but related issue is that, with default settings, TimeSeries.whiten()
suppresses the lower frequency signal power in GW150914. If the default filter length in TimeSeries.whiten()
is bumped up to 2 seconds (same as the default FFT length for ASD measurement), then the published spectrogram is much better reproduced.
Finally, the guts of TimeSeries.whiten()
can probably be refactored a bit so that all of the filter design is done in ~gwpy.signal.filter_design
, and so that the actual application of the filter is done using scipy.signal.fftconvolve
, anticipating #883.