pactools.utils.fir.LowPassFilter

class pactools.utils.fir.LowPassFilter(fs, fc, bandwidth, ripple_db=60.0)[source]

Low-pass FIR filter

Designs a FIR filter that is a low-pass filter.

Parameters
fsfloat

Sampling frequency

fcfloat

Cut-off frequency of the low-pass filter

bandwidthfloat

Bandwidth of the FIR wavelet filter

ripple_dbfloat (default 60.0)

Positive number specifying maximum ripple in passband (dB) and minimum ripple in stopband, in Kaiser-window low-pass FIR filter.

Examples

>>> from pactools.utils import LowPassFilter
>>> f = LowPassFilter(fs=100., fc=5., bandwidth=1.)
>>> f.plot()
>>> signal_out = f.transform(signal_in)
__init__(self, fs, fc, bandwidth, ripple_db=60.0)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, fs, fc, bandwidth[, ripple_db])

Initialize self.

plot(self[, axs, fscale, colors])

Plots the impulse response and the transfer function of the filter.

transform(self, sigin[, out, out_imag])

Apply this filter to a signal