Skip to content

config

tit.source.config

Configuration dataclasses for EEG source-forward preparation.

Defines the two typed configs consumed by :mod:tit.source:

  • :class:ForwardConfig -- parameters for rebuilding an MNE-compatible EEG forward solution (leadfield, source space, fsaverage morph) from an existing SimNIBS head model.
  • :class:FsavgMapConfig -- parameters for projecting existing simulation field outputs (TI_max, TI_normal, |E|) onto an fsaverage template.

See Also

tit.source.forward.prepare_forward : Consumes :class:ForwardConfig. tit.source.fsaverage.project_fields_to_fsaverage : Consumes :class:FsavgMapConfig.

ForwardConfig dataclass

ForwardConfig(eeg_net: str = 'GSN-HydroCel-185', fsaverage_spacing: int = 5, cpus: int = 1, overwrite: bool = False)

Parameters for rebuilding a SimNIBS/MNE EEG forward solution.

Attributes

eeg_net : str EEG cap name without the .csv suffix, as found in the subject's m2m_<id>/eeg_positions/ directory (e.g. "GSN-HydroCel-185"). fsaverage_spacing : int fsaverage subdivision factor (5, 6, or 7) for the morph target. cpus : int SimNIBS FEM workers used while computing the leadfield. overwrite : bool Recompute even when valid outputs already exist. The expensive FEM leadfield is still reused when present unless this is True.

FsavgMapConfig dataclass

FsavgMapConfig(fields: tuple[str, ...] = (lambda: VALID_FSAVG_FIELDS)(), fsaverage_spacing: int = 5, workers: int = 1, overwrite: bool = False)

Parameters for projecting simulation field outputs onto fsaverage.

Attributes

fields : tuple of str Which field quantities to project. Any of :data:VALID_FSAVG_FIELDS ("TI_max", "TI_normal", "magnitude"). fsaverage_spacing : int fsaverage subdivision factor (5, 6, or 7) to morph onto. workers : int Number of subjects projected in parallel (1 = serial). overwrite : bool Re-project even when a cached .npz already exists.