Acoular 24.03 documentation

PowerSpectra

«  FFTSpectra   ::   spectra   ::   acoular.spectra.synthetic  »

PowerSpectra

class acoular.spectra.PowerSpectra

Bases: BaseSpectra

Provides the cross spectral matrix of multichannel time data

and its eigen-decomposition.

This class includes the efficient calculation of the full cross spectral matrix using the Welch method with windows and overlap. It also contains the CSM’s eigenvalues and eigenvectors and additional properties.

The result is computed only when needed, that is when the csm, eva, or eve attributes are acturally read. Any change in the input data or parameters leads to a new calculation, again triggered when an attribute is read. The result may be cached on disk in HDF5 files and need not to be recomputed during subsequent program runs with identical input data and parameters. The input data is taken to be identical if the source has identical parameters and the same file name in case of that the data is read from a file.

source = Property(_source,

Data source; SamplesGenerator or derived object.

time_data = Property(_source, 

The SamplesGenerator object that provides the data.

calib = Instance(Calib)

The Calib object that provides the calibration data, defaults to no calibration, i.e. the raw time data is used.

deprecated: use calib property of TimeSamples objects

ind_low = Property(_ind_low,

Index of lowest frequency line to compute, integer, defaults to 1, is used only by objects that fetch the csm, PowerSpectra computes every frequency line.

ind_high = Property(_ind_high,

Index of highest frequency line to compute, integer, defaults to -1 (last possible line for default block_size).

cached = Bool(True, 

Flag, if true (default), the result is cached in h5 files and need not to be recomputed during subsequent program runs.

num_blocks = Property(

Number of FFT blocks to average, readonly (set from block_size and overlap).

freq_range = Property(

2-element array with the lowest and highest frequency. If set, will overwrite _freqlc and _freqhc according to the range. The freq_range interval will be the smallest discrete frequency inside the half-open interval [_freqlc, _freqhc[ and the smallest upper frequency outside of the interval. If user chooses the higher frequency larger than the max frequency, the max frequency will be the upper bound.

indices = Property(

Array with a sequence of indices for all frequencies between ind_low and ind_high within the result, readonly.

basename = Property( depends_on = '_source.digest', 

Name of the cache file without extension, readonly.

csm = Property( 

The cross spectral matrix, (number of frequencies, numchannels, numchannels) array of complex; readonly.

eva = Property( 

Eigenvalues of the cross spectral matrix as an (number of frequencies) array of floats, readonly.

eve = Property( 

Eigenvectors of the cross spectral matrix as an (number of frequencies, numchannels, numchannels) array of floats, readonly.

calc_csm()

csm calculation

calc_ev()

eigenvalues / eigenvectors calculation

calc_eva()

calculates eigenvalues of csm

calc_eve()

calculates eigenvectors of csm

synthetic_ev(freq, num=0)

Return synthesized frequency band values of the eigenvalues.

Parameters:
freqfloat

Band center frequency for which to return the results.

numinteger

Controls the width of the frequency bands considered; defaults to 3 (third-octave band).

num

frequency band width

0

single frequency line

1

octave band

3

third-octave band

n

1/n-octave band

Returns:
float

Synthesized frequency band value of the eigenvalues (the sum of all values that are contained in the band).

«  FFTSpectra   ::   spectra   ::   acoular.spectra.synthetic  »