Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Reduce auto recommending MCRIBS after 3 (chronological) months #438

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading