neuralset.events.etypes.Fmri

pydantic model neuralset.events.etypes.Fmri[source][source]

Functional MRI (fMRI) recording event.

Handles both volumetric NIfTI files and FreeSurfer surface data (left + right hemisphere). For surface data, filepath must be the left hemisphere (containing hemi-L); the right hemisphere is derived automatically by replacing hemi-L with hemi-R.

Parameters:
  • subject (str) – Subject identifier (required).

  • space (str) – Coordinate space, e.g. "MNI152NLin2009cAsym", "T1w", "fsaverage", "custom".

  • preproc (str) – Preprocessing pipeline: "fmriprep", "deepprep", "custom".

  • mask_filepath (str or None) – Path to a brain mask NIfTI file (volumetric only).

  • spec (dict[str, str] or None) – Variant parameters for DataFrame filtering (e.g. {"registration": "msmall", "resolution": "1.6mm"}). Auto-encoded to sorted "key=value&..." strings.

  • frequency (float) – Sampling frequency in Hz (required).

Fields:
field subject: Annotated[str, BeforeValidator(func=_int_cast, json_schema_input_type=PydanticUndefined)] [Required][source]
field space: str = 'custom'[source]
field preproc: str = 'custom'[source]
field mask_filepath: str | None = None[source]
field spec: Annotated[str, BeforeValidator(func=_coerce_spec, json_schema_input_type=PydanticUndefined)] | None = None[source]
read_mask() Any[source][source]

Read brain mask. Returns None if no mask is available.

requirements: tp.ClassVar[tuple[str, ...]] = ()[source]
type: tp.ClassVar[str] = 'Fmri'[source]