FiltFiltOctave#
- class acoular.tprocess.FiltFiltOctave
Bases:
FiltOctaveOctave or third-octave bandpass filter with zero-phase distortion.
This filter applies an IIR bandpass filter in both forward and reverse directions, effectively eliminating phase distortion. It provides zero-phase filtering but requires significantly more memory compared to causal filtering.
See also
FilterThe base class implementing a general IIR filter.
FiltOctaveThe standard octave or third-octave filter with causal filtering.
Notes
Due to the double-pass filtering, additional bandwidth correction is applied to maintain accurate frequency response.
This approach requires storing the entire signal in memory before processing, making it unsuitable for real-time applications with large datasets.
- order
The half-order of the IIR filter, applied twice (once forward and once backward). This results in a final filter order twice as large as the specified value. Default is
2.
- digest
A unique identifier for the filter, based on its properties. (read-only)
- result(num)
Apply the filter to the input signal and yields filtered data block-wise.
The input signal is first stored in memory, then filtered in both forward and reverse directions to achieve zero-phase distortion. The processed signal is yielded in blocks.
- Parameters:
- num
int Number of samples per block.
- num
- Yields:
numpy.ndarrayAn array containing the filtered signal for the current block. Each block has 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.
Notes
This method requires the entire signal to be stored in memory, making it unsuitable for streaming or real-time applications.
Filtering is performed separately for each channel to optimize memory usage.
- band
The center frequency of the octave or third-octave band. Default is
1000.
- fraction
Defines whether the filter is an octave-band or third-octave-band filter.
'Octave': Full octave band filter.'Third octave': Third-octave band filter.
Default is
'Octave'.
- sos
Second-order sections representation of the filter coefficients. This property depends on
band,fraction,order, and the source’s digest.
- source
The input data source. It must be an instance of a
SamplesGenerator-derived class.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_channels
Number of channels in output, as given by
source.
- num_samples
Number of samples in output, as given by
source.