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()
The cross-spectral matrix stored in an array of shape
(n, m, m)of complex fornfrequencies andmchannels.
- frequencies = Union(None, CArray, Float)
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)
PowerSpectraImportdoes not consume time data; source is alwaysNone.
- sample_freq = Enum(None)
Sampling frequency of the signal. Default is
None
- block_size = Enum(None)
Block size for FFT, non-functional in this class.
- window = Enum(None)
Windowing method, non-functional in this class.
- overlap = Enum(None)
Overlap between blocks, non-functional in this class.
- cached = Enum(False)
Caching capability, always disabled.
- num_blocks = Enum(None)
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'])
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.