Acoular 25.03 documentation

PowerSpectraImport

«  PowerSpectra   ::   spectra   ::   tbeamform  »

PowerSpectraImport

class acoular.spectra.PowerSpectraImport

Bases: PowerSpectra

Provides a dummy class for using pre-calculated CSMs.

This class does not calculate the CSM. Instead, the user can inject one or multiple existing CSMs by setting the csm attribute. This can be useful when algorithms shall be evaluated with existing CSMs. The frequency or frequencies contained by the CSM must be set via the frequencies attribute. The attr:num_channels attributes is determined on the basis of the CSM shape. In contrast to the PowerSpectra object, the attributes sample_freq, source, block_size, window, overlap, cached, and num_blocks have no functionality.

csm = Property(desc='cross spectral matrix')

The cross-spectral matrix stored in an array of shape (n, m, m) of complex for n frequencies and m channels.

frequencies = Union(CArray, Float, desc='frequencies included in the cross-spectral matrix')

The frequencies included in the CSM in ascending order. Accepts list, array, or a single float value.

num_channels = Property(depends_on=['digest'])

Number of time data channels, inferred from the shape of the CSM.

source = Enum(None, desc='PowerSpectraImport cannot consume time data')

PowerSpectraImport does not consume time data; source is always None.

sample_freq = Enum(None, desc='sampling frequency')

Sampling frequency of the signal. Default is None

block_size = Enum(None, desc='PowerSpectraImport does not operate on blocks of time data')

Block size for FFT, non-functional in this class.

window = Enum(None, desc='PowerSpectraImport does not perform windowing')

Windowing method, non-functional in this class.

overlap = Enum(None, desc='PowerSpectraImport does not consume time data')

Overlap between blocks, non-functional in this class.

cached = Enum(False, desc='PowerSpectraImport has no caching capabilities')

Caching capability, always disabled.

num_blocks = Enum(None, desc='PowerSpectraImport cannot determine the number of blocks')

Number of FFT blocks, always None.

digest = Property(depends_on=['_csmsum'])

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

basename = Property(depends_on=['digest'], desc='basename for cache file')

Name of the cache file without extension. (read-only)

fftfreq()

Return the Discrete Fourier Transform sample frequencies.

The method checks the type of frequencies and returns the corresponding frequency array. If frequencies is not defined, a warning is raised.

Returns:
numpy.ndarray

Array containing the frequencies.

«  PowerSpectra   ::   spectra   ::   tbeamform  »