File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -697,16 +697,17 @@ def init_spaces(checkpoint=True):
697
697
if checkpoint and not spaces .is_cached ():
698
698
spaces .checkpoint ()
699
699
700
- if workflow .age_months is not None :
700
+ # NiBabies' default volumetric space is MNIInfant
701
+ # However, if age is not provided, do not add a default template as we cannot
702
+ # make an assumption about cohort.
703
+ if (
704
+ not any (s .space == 'MNIInfant' for s in spaces .references )
705
+ and workflow .age_months is not None
706
+ ):
701
707
from .utils .misc import cohort_by_months
702
708
703
- # cohort workaround
704
- if any (
705
- "MNIInfant" in space .split (":" )[0 ]
706
- for space in spaces .get_spaces (nonstandard = False , dim = (3 ,))
707
- ):
708
- cohort = cohort_by_months ("MNIInfant" , workflow .age_months )
709
- spaces .add (Reference ("MNIInfant" , {"cohort" : cohort }))
709
+ cohort = cohort_by_months ("MNIInfant" , workflow .age_months )
710
+ spaces .add (Reference , {"cohort" : cohort })
710
711
711
712
# Ensure user-defined spatial references for outputs are correctly parsed.
712
713
# Certain options require normalization to a space not explicitly defined by users.
You can’t perform that action at this time.
0 commit comments