mne_rt.modalities.ModalityMixin#
- class mne_rt.modalities.ModalityMixin[source]#
Bases:
objectFeature-extraction engine for all MNE-RT NF modalities.
ModalityMixinis mixed intoRTStreamand provides the prep / compute pair for every modality:Prep (
_<modality>_prep()) — runs once before the main loop. Returns adictof pre-computed artefacts (filter coefficients, index arrays, connectivity indices, …) that are passed as keyword arguments to the compute step.Compute (
_<modality>(data, **prep_kwargs)) — runs every window inside a thread-pool worker. Decorated withtimed()so it returns(value, elapsed_seconds).
Supported modalities (20 total)
Sensor-space power & time-domain
sensor_power,band_ratio,erd_ers,laterality,laterality_erd_ers,hjorth,spectral_centroid,argmax_freq,individual_peak_power,entropy,instantaneous_phase,scp,peak_alpha_freqSensor-space connectivity & graph
sensor_connectivity,connectivity_ratio,cfc_sensor,sensor_graphSource-space
source_power,source_connectivity,source_graphNotes
All methods are private (single-underscore prefix) and are called internally by
record_main(). To extend MNE-RT with a custom modality, sub-classRTStreamand add a matching_<name>_prep/_<name>pair following the same pattern.- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)