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

Number of frequencies

freqs

1-D array of frequencies

block_size

The length of the block used to calculate the spectra

digest

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).

sample_freq

Sampling frequency of the signal, defaults to 1.0

num_samples

Number of signal samples

num_channels

Number of channels