SpectralEntropy
SpectralEntropy(
*args ,
dim: Any = None,
fmin: Any = None,
fmax: Any = None,
normalize: Any = True,
spectral_format: Any = auto,
negative_frequencies: Any = auto,
)-> None
Compute spectral entropy from a Fourier-domain patch.
Spectral entropy measures the disorder of the spectral power distribution. Low values indicate concentrated spectral energy, while high values indicate broadband or noisy spectra. The input patch must already be transformed with Patch.dft or Patch.stft.
Parameters
| Parameter | Description |
|---|---|
| dim |
Frequency dimension over which to compute the descriptor. This can be either the original dimension name, such as "time", or the Fourierdimension name, such as "ft_time". If omitted, a single Fourierdimension is inferred. |
| fmin | Optional lower frequency bound. |
| fmax | Optional upper frequency bound. |
| normalize | If True, normalize entropy to [0, 1]. Defaults to True. |
| spectral_format |
Representation of the spectral data. "auto" uses DASCore DFT/STFTmetadata when available. Other options are "fft" for complex Fouriercoefficients, "amplitude" for amplitude spectra, "power" forpower spectra, and "density" for power spectral densities.
|
| negative_frequencies |
How to handle negative frequency bins. "auto" drops negative binswhen power is symmetric and raises otherwise, folding a verified negative Nyquist bin to positive frequency without changing its power. "drop" always usesnon-negative frequencies, "raise" rejects spectra with negative bins, and"keep" includes them in the calculation.
|
Returns
PatchType Patch containing spectral entropy.
Methods
| Name | Description |
|---|---|
| check | Refuse a patch which does not carry what the operation needs. |
| describe | Return the entropy of the power distribution. |
| get_metadata | Return the reduced metadata, and the bins and format to read. |
| model_copy | Copy the model, dropping cached values the update invalidates. |
| new | Create new instance with some attributed updated. |
| numpy_kernel | Return the descriptor of the power in the bins kept. |
| spectral_entropy | Compute spectral entropy from a Fourier-domain patch. |
| reconcile | Return metadata or a patch holding the final data; default as is. |
| result_dtype | Return the power’s dtype, at least double. |
| run | Run the operation: check, get_metadata, kernel, reconcile, record. |
| units | Return no units: entropy, in bits or normalized to [0, 1], is unitless. |