InOut#
- class acoular.base.InOut
Bases:
SamplesGenerator,SpectraGeneratorAbstract base class receiving from a
sourceand returning signals in the same domain.It provides a base class that can be used to create signal processing blocks that receive data from any generating
sourceand generates an output via the generatorresult()in block-wise manner.- source
Data source;
Generatoror derived object.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_channels
Number of channels in output, as given by
source.
- num_freqs
Number of frequencies in output, as given by
source.
- num_samples
Number of samples / snapshots in output, as given by
source.
- digest
A unique identifier for the generator, based on its properties. (read-only)
- abstractmethod result(num)
Python generator that processes the source data and yields the output block-wise.
This method needs to be implemented by the derived classes.
- Parameters:
- numint
The size of the first dimension of the blocks to be yielded
- Yields:
- numpy.ndarray
Two-dimensional output data block of shape (num, …)
- freqs
1-D array of frequencies
- block_size
The length of the block used to calculate the spectra