BiquadraticFilter

class lsst.ts.m2com.BiquadraticFilter(gain: float, coefficients: ndarray[Any, dtype[float64]], num_element: int)

Bases: object

Biquadratic filter.

Notes

Compact biquadratic format:

1 + b11 z^-1 + b21 z^-2 1 + b12 z^-1 + b22 z^-2

H(z) = gain * (———————–) (———————–) …

1 + a11 z^-1 + a21 z^-2 1 + a12 z^-1 + a22 z^-2

1 + b1N z^-1 + b2N z^-2

(———————–)

1 + a1N z^-1 + a2N z^-2

The reference is: https://en.wikipedia.org/wiki/Digital_biquad_filter

Parameters

gainfloat

Gain.

coefficientsnumpy.ndarray

Coefficients of the biquadratic filters. This should be a 2D array. Each row is the [a1n, a2n, b1n, b2n] for the nth biquadratic filter.

num_elementint

Number of the elements when calling the “filter()”.

Methods Summary

filter(value)

Filter the input value.

reset()

Reset the filter.

Methods Documentation

filter(value: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]]

Filter the input value.

Parameters

valuenumpy.ndarray

Input value with the same number of elements (aka. “num_element”) when initializing this class.

Returns

numpy.ndarray

Filtered value.

reset() None

Reset the filter.