sage.core.base_classes
Filename : base_classes.py Description : Short description of the file
Created on 2026-02-24 16:15:51
__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]
GitHub Repository: NULL
Documentation: NULL
Classes
Thin wrapper around a raw data configuration object that adds |
|
Thin wrapper around a raw training/pipeline configuration object. |
Module Contents
- class BaseDataConfig(data_cfg)[source]
Thin wrapper around a raw data configuration object that adds lazily-computed, cached derived quantities.
BaseDataConfigforwards all attribute lookups to the underlyingdata_cfgobject via__getattr__, so any field present on the original config is transparently accessible. Additional temporal and frequency-domain quantities that depend onsample_rate,sample_length_in_s, andpadding_length_in_sare computed on first access and cached viafunctools.cached_property().- Parameters:
data_cfg (object) – Raw data configuration (e.g. a dataclass or namespace) that must expose at least
sample_rate,sample_length_in_s, andpadding_length_in_s.Properties (Cached)
-----------------
nsamples_in_td (int) – Number of samples in a single analysis window (TD).
nsamples_in_fd (int) – Number of real-FFT frequency bins for a single window.
padding_nsamples (int) – Number of padding samples on each edge.
padded_length_in_s (float) – Total duration including both padding edges (seconds).
padded_length_in_nsamples (int) – Total sample count including both padding edges.
padded_delta_f (float) – Frequency resolution of the padded segment (Hz).
delta_f (float) – Frequency resolution without padding (Hz).
- property nsamples_in_fd[source]
Number of positive-frequency bins from a real-FFT of the analysis window.
- property padded_length_in_s[source]
Total segment duration including both-sided whitening padding (seconds).
- class BaseConfig(cfg)[source]
Thin wrapper around a raw training/pipeline configuration object.
Forwards all attribute lookups to the underlying
cfgobject via__getattr__, providing a uniform interface for pipeline components that receive aBaseConfiginstead of the raw config directly.- Parameters:
cfg (object) – Raw pipeline configuration (e.g. a dataclass or namespace).