FilterBank#
- class acoular.tprocess.FilterBank
Bases:
TimeOutAbstract base class for IIR filter banks based on SOS coefficients.
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
TimeOutABC for signal processing blocks that interact with data from a source.
SamplesGeneratorInterface for any generating multi-channel time domain signal processing block.
scipy.signalSciPy module for signal processing.
- 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.
- bands
A list of labels describing the different frequency bands of the filter bank.
- num_bands
The total number of bands in the filter bank.
- num_channels
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:
- num
int Maximum number of time samples per block to yield.
- num
- Yields:
numpy.ndarrayTwo-dimensional filtered time data block with shape
(n, num_bands * source.num_channels), wherenis the number of samples in the yielded block and is at mostnum. The final block may contain fewer thannumsamples.The second axis stores the filtered channels grouped by frequency band. Reshaping a block with
block.reshape(n, num_bands, source.num_channels)gives direct access to the data by sample, band, and source channel.
Notes
The returned samples are bandpass filtered according to the coefficients in
sos. Each block corresponds to the filtered samples for each frequency band.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_samples
Number of samples in output, as given by
source.
- digest
A unique identifier for the generator, based on its properties. (read-only)