Qu

filter_from_sos

Builtin index · Signal processing

result = filter_from_sos(sos, [fs])

Input: sos, fs · Output: result

What it is

sos: a matrix, one second-order section per row, either [b0, b1, b2, a1, a2] (a0 = 1 implied) or [b0, b1, b2, a0, a1, a2] (MATLAB/SciPy layout, normalized by a0); fs (optional number, Hz).

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = filter_from_sos(sos, [fs])
sos matrixsos: a matrix, one second-order section per row, either [b0, b1, b2, a1, a2] (a0 = 1 implied) or [b0, b1, b2, a0, a1, a2] (MATLAB/SciPy layout, normalized by a0).
fs number, optionalfs (optional number, Hz).
Model —kind "filter", field sos
Returns a Model (kind "filter", field sos) that works with sosfilt, filtfilt, freqz, fvtool, filter_info, bode and the rest, for coefficients designed elsewhere. Without fs the model carries no rate and frequency axes are normalized.

Examples

No documentation example calls this form yet. The Signal processing chapter is where one belongs.

How it works

filter_from_sos(sos, [fs]) -- wrap second-order sections designed elsewhere as a filter model. One section per row: [b0, b1, b2, a1, a2] (Qu's own layout, a0 = 1 implied) or [b0, b1, b2, a0, a1, a2] (MATLAB's and SciPy's), which is normalized by its a0.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.