FilterBank#

class acoular.tprocess.FilterBank

Bases: TimeOut

Abstract base class for IIR filter banks based on scipy.signal.lfilter.

Implements a bank of parallel filters. This class should not be instantiated by itself.

Inherits from TimeOut, and defines the structure for working with filter banks for processing multi-channel time series data, such as time signal signals.

See also

TimeOut

ABC for signal processing blocks that interact with data from a source.

SamplesGenerator

Interface for any generating multi-channel time domain signal processing block.

scipy.signal

SciPy module for signal processing.

source = Instance(SamplesGenerator)

The input data source. It must be an instance of a SamplesGenerator-derived class.

sos = Property()

The list containing second order section (SOS) coefficients for the filters in the filter bank.

bands = Property()

A list of labels describing the different frequency bands of the filter bank.

num_bands = Property()

The total number of bands in the filter bank.

num_channels = Property()

The total number of output channels resulting from the filter bank operation.

result(num)

Yield the bandpass filtered output of the source in blocks of samples.

This method uses the second order section coefficients (sos) to filter the input samples provided by the source in blocks. The result is returned as a generator.

Parameters:
numint

Number of samples per block.

Yields:
numpy.ndarray

An array of shape (num, num_channels), delivering the filtered samples for each band. The last block may contain fewer samples if the total number of samples is not a multiple of num.

Notes

The returned samples are bandpass filtered according to the coefficients in sos. Each block corresponds to the filtered samples for each frequency band.