neuralset.events.etypes.MneRaw

class neuralset.events.etypes.MneRaw(*, start: float, timeline: str, duration: Annotated[float, Ge(ge=0)] = 0.0, extra: dict[str, Any] = {}, filepath: Path | str = '', frequency: float = 0, offset: Annotated[float, Ge(ge=0)] = 0.0, subject: Annotated[str, BeforeValidator(func=_int_cast, json_schema_input_type=PydanticUndefined)] = '')[source][source]

Brain recording saved as MNE Raw object.

Base class for neurophysiological recordings (MEG, EEG, etc.) that can be loaded using MNE-Python.

Parameters:

subject (str) – Subject identifier (required, cannot be empty)

Notes

  • Automatically detects frequency and duration from file metadata

  • If start is "auto", auto-resolves from raw.first_samp / sfreq (use for FIF files with nonzero first_samp)

  • Guards against start=0 when raw.first_samp > 0

  • Subject ID is cast to string to handle numeric IDs from dataframes

Examples

meg = Meg(start="auto", timeline="scan1",
         filepath="data_raw.fif", subject="sub-01")
raw = meg.read()  # Returns mne.io.Raw object