bundles / scipy 1.17.1 / scipy / signal / _signaltools / _filtfilt_gust
function
scipy.signal._signaltools:_filtfilt_gust
Signature
def _filtfilt_gust ( b , a , x , axis = -1 , irlen = None ) Summary
Forward-backward IIR filter that uses Gustafsson's method.
Extended Summary
Apply the IIR filter defined by (b,a) to x twice, first forward then backward, using Gustafsson's initial conditions [1].
Let y_fb be the result of filtering first forward and then backward, and let y_bf be the result of filtering first backward then forward. Gustafsson's method is to compute initial conditions for the forward pass and the backward pass such that y_fb == y_bf.
Parameters
b: scalar or 1-D ndarrayNumerator coefficients of the filter.
a: scalar or 1-D ndarrayDenominator coefficients of the filter.
x: ndarrayData to be filtered.
axis: int, optionalAxis of
xto be filtered. Default is -1.irlen: int or None, optionalThe length of the nonnegligible part of the impulse response. If
irlenis None, or if the length of the signal is less than2 * irlen, then no part of the impulse response is ignored.
Returns
y: ndarrayThe filtered data.
x0: ndarrayInitial condition for the forward filter.
x1: ndarrayInitial condition for the backward filter.
Notes
Typically the return values x0 and x1 are not needed by the caller. The intended use of these return values is in unit tests.
Aliases
-
scipy.signal._signaltools._filtfilt_gust