fsaverage
tit.source.fsaverage ¶
Project existing simulation field outputs onto an fsaverage template.
Complementary to :mod:tit.source.forward: where the forward pipeline lets a
researcher reconstruct EEG sources onto fsaverage, this pipeline puts the
stimulation fields on the same grid, so source activity and TI exposure can be
compared vertexwise.
For an already-completed TI simulation it reads the pipeline's own central-surface overlays and morphs the requested scalar fields to fsaverage:
TI_max-- orientation-maximized TI envelope |E| (central overlay)TI_normal-- directional TI envelope along the cortical normalmagnitude-- combined carrier exposure |E1 + E2| on the central surface
Unlike SimNIBS's native map_to_fsavg (which only runs at simulation time and
only emits TI_max), this works post-hoc on any finished simulation and on
the derived TI_normal / magnitude quantities.
Runs under simnibs_python (reads SimNIBS meshes)::
simnibs_python -m tit.source fsavg_config.json
See Also¶
tit.source.config.FsavgMapConfig : Parameter object. tit.source.forward.prepare_forward : The companion forward pipeline.
project_subject ¶
Project one (subject, simulation) and cache the result as .npz.
Returns (subject_id, status, message) where status is one of
{"ok", "cached", "failed"} so batch runs can record and continue.
Source code in tit/source/fsaverage.py
project_fields_to_fsaverage ¶
project_fields_to_fsaverage(subjects: list[tuple[str, str]], cfg: FsavgMapConfig) -> list[tuple[str, str, str]]
Project field outputs to fsaverage for many (subject, simulation) pairs.
Parameters¶
subjects : list of (str, str)
(subject_id, simulation_name) pairs to project.
cfg : FsavgMapConfig
Field selection, fsaverage spacing, worker count, overwrite flag.
Returns¶
list of (str, str, str)
Per-pair (subject_id, status, message) results.