Filter#
- class acoular.tprocess.Filter
Bases:
TimeOutAbstract base class for IIR filters using SciPy’s
lfilter().This class implements a digital Infinite Impulse Response (IIR) filter that applies filtering to a given signal in a block-wise manner. The filter coefficients can be dynamically changed during processing.
See also
scipy.signal.lfilter()Filter data along one-dimension with an IIR or FIR (finite impulse response) filter.
scipy.signal.sosfilt()Filter data along one dimension using cascaded second-order sections.
FiltOctaveOctave or third-octave bandpass filter (causal, with non-zero phase delay).
FiltFiltOctaveOctave or third-octave bandpass filter with zero-phase distortion.
- source = Instance(SamplesGenerator)
The input data source. It must be an instance of a
SamplesGenerator-derived class.
- sos = Property()
Second-order sections representation of the filter coefficients. This property is dynamically updated and can change during signal processing.
- result(num)
Apply the IIR filter to the input signal and yields filtered data block-wise.
This method processes the signal provided by
source, applying the defined filter coefficients (sos) using thescipy.signal.sosfilt()function. The filtering is performed in a streaming fashion, yielding blocks of filtered signal data.- Parameters:
- num
int Number of samples per block.
- num
- Yields:
numpy.ndarrayAn array containing the bandpass-filtered signal for the current block. Each block has the shape (
num,num_channels), wherenum_channelsis inherited from thesource. The last block may contain fewer samples if the total number of samples is not a multiple ofnum.