OctaveFilterBank#
- class acoular.tprocess.OctaveFilterBank
Bases:
FilterBankOctave or third-octave filter bank.
Inherits from
FilterBankand implements an octave or third-octave filter bank. This class is used for filtering multi-channel time series data, such as time signal signals, using bandpass filters with center frequencies at octave or third-octave intervals.See also
FilterBankThe base class for implementing IIR filter banks.
SamplesGeneratorInterface for generating multi-channel time domain signal processing blocks.
scipy.signalSciPy module for signal processing.
- lband
The lowest band center frequency index. Default is
21. This index refers to the position in the scale of octave or third-octave bands.
- hband
The highest band center frequency index + 1. Default is
40. This is the position in the scale of octave or third-octave bands.
- fraction
The fraction of an octave, either
'Octave'or'Third octave'. Default is'Octave'. Determines the width of the frequency bands. ‘Octave’ refers to full octaves, and'Third octave'refers to third-octave bands.
- ba
The list of filter coefficients for all filters in the filter bank. The coefficients are computed based on the
lband,hband, andfractionattributes.
- bands
The list of labels describing the frequency bands in the filter bank.
- num_bands
The total number of bands in the filter bank.
- digest
A unique identifier for the filter, based on its properties. (read-only)
- 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:
- num
int Number of samples per block.
- num
- Yields:
numpy.ndarrayAn 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 ofnum.
Notes
The returned samples are bandpass filtered according to the coefficients in
sos. Each block corresponds to the filtered samples for each frequency band.
- source
The input data source. It must be an instance of a
SamplesGenerator-derived class.
- sos
The list containing second order section (SOS) coefficients for the filters in the filter bank.
- num_channels
The total number of output channels resulting from the filter bank operation.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_samples
Number of samples in output, as given by
source.