FiltFiltOctave#

class acoular.tprocess.FiltFiltOctave

Bases: FiltOctave

Octave 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

Filter

The base class implementing a general IIR filter.

FiltOctave

The 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 = Int(2)

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 = Property(depends_on=['source.digest', 'band', 'fraction', 'order'])

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:
numint

Number of samples per block.

Yields:
numpy.ndarray

An array containing the filtered signal for the current block. Each block has shape (num, num_channels), where num_channels is inherited from the source. The last block may contain fewer samples if the total number of samples is not a multiple of num.

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.