scipy.signal — Signal processing
The scipy.signal submodule provides a single signal-processing
routine.
Functions
- scipy.signal.sosfilt(sos: ndarray, x: ndarray, *, zi: ndarray | None = None) ndarray | tuple[ndarray, ndarray]
Filter the one-dimensional, uniformly sampled data x using the cascaded second-order sections in sos.
- Parameters:
sos – an array-like of shape
(n_sections, 6)giving the filter sections. Each row holds the six coefficients[b0, b1, b2, a0, a1, a2]of one biquad section.x – a one-dimensional input
numpy.ndarray.zi – optional initial filter delays, a float
numpy.ndarrayof shape(n_sections, 2). If omitted, the initial conditions are taken to be zero.
- Returns:
the filtered signal as a float
numpy.ndarray. When zi is supplied, the return value is a 2-tuple(y, zf)wherezfholds the final delays in the same shape as zi.