Skip to content

Fix normalization for whitening and FIR filter design

Duncan Macleod requested to merge github/fork/alurban/fix-whiten-norm into develop

Created by: alurban

@duncanmmacleod, this PR adjusts the normali(s)ation in signal.filter_design.fir_from_transfer so that the resulting filter's frequency response has the same overall amplitude as the original transfer function. Crucially, this means FIR filter design will use the numpy normalization. To compensate for this, the PR also fixes normalization in TimeSeries.whiten() so that the output timeseries has zero mean and unit variance:

150914_spectra_compare-2

150914_compare

150914_spectra

First plot shows the original spectrum in blue and the frequency response of the filter in orange; second plot shows the original timeseries on top and the whitened timeseries (note the y-axis scale) on the bottom; third plot compares the original strain ASD to that of the whitened data.

This fixes #902 (closed).

Merge request reports