neuralset.events.etypes.MneRaw¶
- pydantic model neuralset.events.etypes.MneRaw[source][source]¶
Brain recording saved as MNE Raw object.
Base class for neurophysiological recordings (MEG, EEG, etc.) that can be loaded using MNE-Python. Supports chunking via
_split()inherited fromBaseSplittableEvent.- Parameters:
subject (str) – Subject identifier (required, cannot be empty)
Notes
Automatically detects frequency and duration from file metadata
If
startis"auto", auto-resolves fromraw.first_samp / sfreq(use for FIF files with nonzero first_samp)Guards against
start=0whenraw.first_samp > 0Subject ID is cast to string to handle numeric IDs from dataframes
Like Audio/Video,
read()crops the raw to[offset, offset+duration]so that only the chunk’s data is loaded into memory.
Examples
meg = Meg(start="auto", timeline="scan1", filepath="data_raw.fif", subject="sub-01") raw = meg.read() # Returns mne.io.Raw object
- field subject: Annotated[str, BeforeValidator(func=_int_cast, json_schema_input_type=PydanticUndefined)] = ''[source]¶
- read() Any[source][source]¶
Read and return the data from the file or method URI.
- Returns:
The loaded data (type depends on the specific Event subclass)
- Return type:
Any
Examples
audio_event = Audio(start=0, timeline="t1", filepath="audio.wav") audio_tensor = audio_event.read() # Returns torch.Tensor