surfer_settings
tit.surfer_settings ¶
User-wide reconstruction resource preferences, shared by plans and runners.
QSIPrepPreferences ¶
Bases: BaseModel
User defaults for processing, separate from resource allocation.
QSIReconPreferences ¶
Bases: BaseModel
User defaults for reconstruction, separate from resource allocation.
get_container_resource_limits ¶
Load container probes only while resolving resources, never on route import.
available_threads ¶
available_threads() -> int
CPUs a reconstruction may use: the user's global CPU limit (container quotas and
affinity included), see :func:tit.cpu.cpu_limit.
Source code in tit/surfer_settings.py
normalize_freesurfer_license ¶
Return the license text ready to write, or raise ValueError.
A FreeSurfer license.txt is the registrant's email, a number and two
key lines. Only the shape is checked (FreeSurfer itself validates the
key): non-empty, small, plain text, first line an email address.
Source code in tit/surfer_settings.py
save_freesurfer_license ¶
Atomically store the user's license, readable by the owner only.
Source code in tit/surfer_settings.py
freesurfer_license_status ¶
What preflight and the Settings page report about the license.
Source code in tit/surfer_settings.py
save_preferences ¶
Atomically replace validated user preferences.
Source code in tit/surfer_settings.py
effective_threads ¶
Explicit value, else env override, else preference, else the whole CPU limit -- each clamped to the global CPU limit so no job claims more than the scheduler can admit.
Source code in tit/surfer_settings.py
resolve_job_threads ¶
Snapshot defaults so queued jobs keep the CPU reservation they were planned with.