Skip to content

Commit 4e0cf4b

Browse files
committed
FIX: Reduce auto recommending MCRIBS after 3 (chronological) months
1 parent fef5aa8 commit 4e0cf4b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

nibabies/workflows/base.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
SubjectSession = tuple[str, str | None]
7474

7575

76-
AUTO_T2W_MAX_AGE = 8
76+
MCRIBS_RECOMMEND_AGE_CAP = 3
7777

7878

7979
def init_nibabies_wf(subworkflows_list: list[SubjectSession]):
@@ -332,7 +332,7 @@ def init_single_subject_wf(
332332
# Determine some session level options here, as we should have
333333
# all the required information
334334
if recon_method == 'auto':
335-
if age <= AUTO_T2W_MAX_AGE and anatomical_cache.get('t2w_aseg'):
335+
if age <= MCRIBS_RECOMMEND_AGE_CAP and anatomical_cache.get('t2w_aseg'):
336336
# do not force mcribs without a vetted segmentation
337337
recon_method = 'mcribs'
338338
elif age <= 24:
@@ -355,7 +355,12 @@ def init_single_subject_wf(
355355
elif (reference_anat := requested_anat) is None: # Both available with no preference
356356
reference_anat = (
357357
'T2w'
358-
if any((recon_method == 'none' and age <= AUTO_T2W_MAX_AGE, recon_method == 'mcribs'))
358+
if any(
359+
(
360+
recon_method is None and age <= MCRIBS_RECOMMEND_AGE_CAP,
361+
recon_method == 'mcribs',
362+
)
363+
)
359364
else 'T1w'
360365
)
361366

0 commit comments

Comments
 (0)