PowerSpectraImport#
- class acoular.spectra.PowerSpectraImport
Bases:
PowerSpectraProvides 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
csmattribute. This can be useful when algorithms shall be evaluated with existing CSMs. The frequency or frequencies contained by the CSM must be set via thefrequenciesattribute. The attr:num_channels attributes is determined on the basis of the CSM shape. In contrast to thePowerSpectraobject, the attributessample_freq,source,block_size,window,overlap,cached, andnum_blockshave no functionality.- csm = Property(desc='cross spectral matrix')
The cross-spectral matrix stored in an array of shape
(n, m, m)of complex fornfrequencies andmchannels.
- frequencies = Union(None, 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')
PowerSpectraImportdoes not consume time data; source is alwaysNone.
- 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
frequenciesand returns the corresponding frequency array. Iffrequenciesis not defined, a warning is raised.- Returns:
numpy.ndarrayArray containing the frequencies.