SpectraGenerator#

class acoular.base.SpectraGenerator

Bases: Generator

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

It provides a common interface for all SpectraGenerator classes, which generate an output via the generator result() in block-wise manner. This class has no real functionality on its own and should not be used directly.

num_freqs = CInt

Number of frequencies

freqs = CArray

1-D array of frequencies

block_size = CInt

The length of the block used to calculate the spectra

digest = Property(depends_on=['sample_freq', 'num_samples', 'num_channels', 'num_freqs', 'block_size'])

A unique identifier for the generator, based on its properties. (read-only)

abstractmethod result(num=1)

Python generator that yields the output block-wise.

Parameters:
numinteger

This parameter defines the size of the number of snapshots to be yielded. Defaults to 1.

Yields:
numpy.ndarray

A two-dimensional block of shape (num, num_channels * num_freqs).