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 thefrequencies
attribute. The attr:num_channels attributes is determined on the basis of the CSM shape. In contrast to thePowerSpectra
object, the attributessample_freq
,source
,block_size
,window
,overlap
,cached
, andnum_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 forn
frequencies andm
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 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
frequencies
and returns the corresponding frequency array. Iffrequencies
is not defined, a warning is raised.- Returns:
numpy.ndarray
Array containing the frequencies.