paths
tit.paths ¶
TI-Toolbox Path Management Centralized path management for the entire TI-Toolbox codebase.
Usage
from tit.paths import PathManager, get_path_manager
pm = get_path_manager() subjects = pm.list_simnibs_subjects() m2m_dir = pm.m2m("001") sim_dir = pm.simulation("001", "montage1")
PathManager ¶
PathManager(project_dir: str | None = None)
Centralized BIDS-compliant path management for TI-Toolbox.
Source code in tit/paths.py
project_dir
property
writable
¶
project_dir: str | None
Get/set the project directory. Auto-detects from environment if unset.
ensure ¶
list_simnibs_subjects ¶
List subject IDs (without 'sub-' prefix) that have an m2m folder.
Source code in tit/paths.py
list_simulations ¶
List simulation folder names for a subject.
Source code in tit/paths.py
list_eeg_caps ¶
List EEG cap CSV files for a subject.
Source code in tit/paths.py
list_flex_search_runs ¶
List flex-search run folders that contain flex_meta.json or electrode_positions.json.
Source code in tit/paths.py
spherical_analysis_name
staticmethod
¶
Return folder name for a spherical analysis.
Source code in tit/paths.py
cortical_analysis_name
classmethod
¶
cortical_analysis_name(*, whole_head: bool, region: str | None, atlas_name: str | None = None, atlas_path: str | None = None) -> str
Return folder name for a cortical analysis.
Source code in tit/paths.py
analysis_output_dir ¶
analysis_output_dir(*, sid: str, sim: str, space: str, analysis_type: str, tissue_type: str | None = None, coordinates=None, radius=None, coordinate_space: str = 'subject', whole_head: bool = False, region: str | None = None, atlas_name: str | None = None, atlas_path: str | None = None) -> str
Return analysis output directory path (does not create it).
Source code in tit/paths.py
get_path_manager ¶
get_path_manager(project_dir: str | None = None) -> PathManager
Return the global PathManager singleton.
Source code in tit/paths.py
reset_path_manager ¶
Reset the singleton so the next call to get_path_manager creates a fresh instance.