diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-07-01 10:15:09 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-07-01 10:15:09 -0500 |
| commit | e33accae4d8439dbab0764d98e6f188c9489eb06 (patch) | |
| tree | 5297f2ac0b26b5aba66512d6908f9c99e97e3683 /shared-bindings | |
| parent | 783846c6057f96999687c5895bef97b28e47e1fa (diff) | |
ulab: document sosfilt
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/ulab/filter/__init__.pyi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/shared-bindings/ulab/filter/__init__.pyi b/shared-bindings/ulab/filter/__init__.pyi index fff404300..5e7202e06 100644 --- a/shared-bindings/ulab/filter/__init__.pyi +++ b/shared-bindings/ulab/filter/__init__.pyi @@ -17,3 +17,20 @@ def convolve(r, c=None): Convolution is most time-efficient when both inputs are of float type.""" ... + +def sosfilt(sos : ulab.array, x : ulab.array, *, xi : Optional[ulab.array] = None) -> Union[ulab.array, Tuple[ulab.array, ulab.array]]: + """ + :param ulab.array sos: Array of second-order filter coefficients, must have shape (n_sections, 6). Each row corresponds to a second-order section, with the first three columns providing the numerator coefficients and the last three providing the denominator coefficients. + :param ulab.array x: The data to be filtered + :param ulab.array zi: Optional initial conditions for the filter + + :return: If ``xi`` is not specified, the filter result alone is returned. If ``xi`` is specified, the return value is a 2-tuple of the filter result and the final filter conditions. + + Filter data along one dimension using cascaded second-order sections. + + Filter a data sequence, x, using a digital IIR filter defined by sos. + + The filter function is implemented as a series of second-order filters with direct-form II transposed structure. It is designed to minimize numerical precision errors for high-order filters. + + Filter coefficients can be generated by using scipy's filter generators such as ``signal.ellip(..., output='sos')``.""" + ... |
