Skip to content

Commit

Permalink
FIX: Reduce auto recommending MCRIBS after 3 (chronological) months
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Jan 24, 2025
1 parent fef5aa8 commit 4e0cf4b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions nibabies/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
SubjectSession = tuple[str, str | None]


AUTO_T2W_MAX_AGE = 8
MCRIBS_RECOMMEND_AGE_CAP = 3


def init_nibabies_wf(subworkflows_list: list[SubjectSession]):
Expand Down Expand Up @@ -332,7 +332,7 @@ def init_single_subject_wf(
# Determine some session level options here, as we should have
# all the required information
if recon_method == 'auto':
if age <= AUTO_T2W_MAX_AGE and anatomical_cache.get('t2w_aseg'):
if age <= MCRIBS_RECOMMEND_AGE_CAP and anatomical_cache.get('t2w_aseg'):
# do not force mcribs without a vetted segmentation
recon_method = 'mcribs'
elif age <= 24:
Expand All @@ -355,7 +355,12 @@ def init_single_subject_wf(
elif (reference_anat := requested_anat) is None: # Both available with no preference
reference_anat = (
'T2w'
if any((recon_method == 'none' and age <= AUTO_T2W_MAX_AGE, recon_method == 'mcribs'))
if any(
(
recon_method is None and age <= MCRIBS_RECOMMEND_AGE_CAP,
recon_method == 'mcribs',
)
)
else 'T1w'
)

Expand Down

0 comments on commit 4e0cf4b

Please sign in to comment.