radiens_core.models.spectral
Spectral analysis domain models and enums.
| CLASS | DESCRIPTION |
|---|---|
BatchSpectralResult |
Result of a batch spectral analysis request. |
SpectralAlgorithm |
Spectral estimation algorithm. |
SpectralChannelResult |
Spectral power for a single channel. |
SpectralInfoResult |
Preview of the spectral parameters a request would produce, computed without reading signal data. |
SpectralMode |
Whether a spectral result is a single spectrum or a spectrogram. |
SpectralQuery |
Parameters for a spectral analysis request. |
SpectralRange |
One alignment window over which a spectrum is computed. |
SpectralRangeResult |
Spectral results for one alignment window, across channels. |
SpectralResult |
Result of a spectral analysis request. |
SpectralUnit |
Power scale of a spectral result. |
SpectralWindowType |
Windowing function applied before the FFT. |
StftConfig |
Short-time Fourier transform parameters. |
WelchConfig |
Welch-algorithm parameters. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
FlexSpectralAlgorithm |
|
FlexSpectralMode |
|
FlexSpectralRange |
|
FlexSpectralUnit |
|
FlexSpectralWindowType |
|
Attributes
FlexSpectralAlgorithm
module-attribute
FlexSpectralAlgorithm = SpectralAlgorithm | SpectralAlgorithmStr
SpectralAlgorithm that also accepts a case-insensitive name string.
FlexSpectralMode
module-attribute
FlexSpectralMode = SpectralMode | SpectralModeStr
SpectralMode that also accepts a case-insensitive name string.
FlexSpectralRange
module-attribute
SpectralRange that also accepts a (ref_sec, pre_sec, post_sec) tuple or dict.
FlexSpectralUnit
module-attribute
FlexSpectralUnit = SpectralUnit | SpectralUnitStr
SpectralUnit that also accepts a case-insensitive name string.
FlexSpectralWindowType
module-attribute
FlexSpectralWindowType = SpectralWindowType | SpectralWindowTypeStr
SpectralWindowType that also accepts a case-insensitive name string.
Classes
BatchSpectralResult
Bases: BaseModel
Result of a batch spectral analysis request.
| ATTRIBUTE | DESCRIPTION |
|---|---|
results |
One
TYPE:
|
SpectralAlgorithm
Bases: IntEnum
Spectral estimation algorithm.
| ATTRIBUTE | DESCRIPTION |
|---|---|
PERIODOGRAM |
Single FFT over the range. Requires
|
WELCH |
Average of overlapping windowed FFTs. Requires
|
STFT |
Short-time Fourier transform. Requires
|
SpectralChannelResult
SpectralInfoResult
Bases: BaseModel
Preview of the spectral parameters a request would produce, computed without reading signal data.
| ATTRIBUTE | DESCRIPTION |
|---|---|
achieved_df_hz |
Actual frequency bin spacing, in Hz.
TYPE:
|
num_bins |
Number of frequency bins in the result.
TYPE:
|
nfft_length |
FFT length used.
TYPE:
|
achieved_time_res_sec |
Time bin spacing, in seconds.
TYPE:
|
num_time_steps |
Number of time bins in each range.
TYPE:
|
welch_num_segments |
Number of averaged segments.
TYPE:
|
welch_overlap_percent |
Achieved segment overlap, as a percentage.
TYPE:
|
variance_reduction_factor |
Variance reduction from segment averaging.
TYPE:
|
output_dimensions |
Shape of the spectral result this request would produce. |
estimated_memory_mb |
Estimated size of one range's result in MiB, at 8 bytes per value (this client returns float64 arrays). Multiply by the number of ranges.
TYPE:
|
warnings |
Warnings about the request. Currently always empty. |
errors |
Currently always empty; an invalid request raises instead. |
applied_dsp_params |
DSP filter parameters that would be applied, populated
only when the request set |
SpectralMode
Bases: IntEnum
Whether a spectral result is a single spectrum or a spectrogram.
| ATTRIBUTE | DESCRIPTION |
|---|---|
STATIC |
One spectrum per channel over the whole time range.
|
TIME_RESOLVED |
A spectrogram: one spectrum per time window.
|
SpectralQuery
Bases: BaseModel
Parameters for a spectral analysis request.
| ATTRIBUTE | DESCRIPTION |
|---|---|
ntv_chan_idxs |
Native channel indices to compute spectra for. |
ranges |
Alignment windows to compute spectra over.
TYPE:
|
f_min |
Minimum frequency to include, in Hz.
TYPE:
|
f_max |
Maximum frequency to include, in Hz.
TYPE:
|
mode |
Whether to return a single spectrum (
TYPE:
|
algorithm |
Spectral estimation algorithm.
TYPE:
|
units |
Power scale of the result.
TYPE:
|
window_type |
Windowing function applied before the FFT.
TYPE:
|
welch_config |
Welch-specific parameters. Only meaningful when
TYPE:
|
stft_config |
STFT-specific parameters. Only meaningful when
TYPE:
|
apply_dsp |
Filter through the dataset's stage-2 chain before computing spectra. Filter state carries over from the previous call only when this range starts where that one ended; otherwise the filter warms up on the data before the range.
TYPE:
|
SpectralRange
Bases: BaseModel
One alignment window over which a spectrum is computed.
| ATTRIBUTE | DESCRIPTION |
|---|---|
ref_sec |
Alignment point, in seconds of stream time.
TYPE:
|
pre_sec |
Seconds before
TYPE:
|
post_sec |
Seconds after
TYPE:
|
SpectralRangeResult
Bases: BaseModel
Spectral results for one alignment window, across channels.
| ATTRIBUTE | DESCRIPTION |
|---|---|
range_idx |
Index of the source
TYPE:
|
channels |
Per-channel spectral results.
TYPE:
|
SpectralResult
Bases: BaseModel
Result of a spectral analysis request.
| ATTRIBUTE | DESCRIPTION |
|---|---|
freq_axis |
Frequency bin centers, in Hz. |
time_axis |
Time bin centers, in seconds, relative to each range's
|
ranges |
Per-range spectral results. A range that is not fully inside the
dataset is omitted with a warning, so match results by
TYPE:
|
warnings |
Non-fatal warnings emitted while computing spectra. |
applied_dsp_params |
DSP filter parameters actually applied, populated
only when the query set |
SpectralUnit
Bases: IntEnum
Power scale of a spectral result.
| ATTRIBUTE | DESCRIPTION |
|---|---|
POWER_UV2_HZ |
Power spectral density in µV²/Hz.
|
POWER_DB_HZ |
Power spectral density in dB/Hz.
|
SpectralWindowType
Bases: IntEnum
Windowing function applied before the FFT.
| ATTRIBUTE | DESCRIPTION |
|---|---|
RECT |
Rectangular (no windowing).
|
HANN |
Hann.
|
HAMMING |
Hamming.
|
BLACKMAN |
Blackman.
|
StftConfig
Bases: BaseModel
Short-time Fourier transform parameters.
| ATTRIBUTE | DESCRIPTION |
|---|---|
window_duration_sec |
Duration of each STFT window, in seconds.
TYPE:
|
window_step_sec |
Step between consecutive STFT windows, in seconds.
TYPE:
|
WelchConfig
Bases: BaseModel
Welch-algorithm parameters.
| ATTRIBUTE | DESCRIPTION |
|---|---|
segment_duration_sec |
Duration of each averaged segment, in seconds.
TYPE:
|
overlap_frac |
Fractional overlap between segments, in
TYPE:
|