MultiChannelDatasetMixin#
- class torch_brain.dataset.MultiChannelDatasetMixin[source]#
Bases:
objectMixin class for
torch_brain.dataset.Datasetsubclasses containing multi-channel recordings (e.g., EEG, ECoG, EMG, sEEG, etc).- Provides:
get_channel_ids()for retrieving sorted channel IDs from recording views returned byget_recording(...).Configurable channel-ID uniquification by prepending metadata components before each channel id:
multichannel_dataset_mixin_uniquify_channel_ids_with_sessionprependssession.id(defaultFalse) andmultichannel_dataset_mixin_uniquify_channel_ids_with_subjectprependssubject.id(defaultTrue). Thissubject.iduniquification allows channels with the same name in the same subject to be treated as the same channel across sessions. If both are enabled, the prefix order issubject.id/session.id.
- get_channel_ids()[source]#
Return sorted channel IDs across recordings.
get_channel_idsaggregatesrec.channels.idfromget_recording(...). Any subject/session uniquification is applied there according tomultichannel_dataset_mixin_uniquify_channel_ids_with_subjectandmultichannel_dataset_mixin_uniquify_channel_ids_with_session.