pyavs.load_forward_model¶
- pyavs.load_forward_model(subject_id: int, session: int | None = None, data_path: str | None = None, verbose: bool = True) mne.Forward[source]¶
Load a forward model from the dataset.
Two locations are searched, in order:
pyAVS derivatives (only when
sessionis given) — a forward recomputed withsave_forward_model():{derivatives}/sub-{id:02d}/ses-{sess:02d}/source/ sub-{id:02d}_ses-{sess:02d}_task-avs_fwd.fifThe shipped forward — one per subject, session-independent:
{root}/derivatives/freesurfer/sub-{id:02d}/bem/sub-{id:02d}-fwd.fif
The shipped forward is what the release provides; the derivatives path only exists if you recomputed one yourself, in which case it takes precedence.
- Parameters:
subject_id (int) – Subject ID
session (int, optional) – Session number. When given, a per-session forward in the pyAVS derivatives tree is preferred over the shipped one. The shipped forward does not depend on session.
data_path (str, optional) – Path to the
avs-publicroot. If None, uses the configured data path.verbose (bool, optional) – Whether to print loading information (default: True)
- Returns:
Forward solution
- Return type: