diff --git a/nibabies/tests/test_config.py b/nibabies/tests/test_config.py index d0003e51..13e0f1a2 100644 --- a/nibabies/tests/test_config.py +++ b/nibabies/tests/test_config.py @@ -94,13 +94,14 @@ def test_config_spaces(): assert [str(s) for s in spaces.get_standard(full_spec=True)] == [ 'MNIInfant:cohort-1:res-native', # Default output space 'MNI152NLin6Asym:res-2', + 'MNIInfant:cohort-1:res-2', # CIFTI: MNIInfant (2x2x2) -> MNI152NLin6Asym (2x2x2) ] assert [ format_reference((s.fullname, s.spec)) for s in spaces.references if s.standard and s.dim == 3 - ] == ['MNIInfant_cohort-1_res-native', 'MNI152NLin6Asym_res-2', 'MNIInfant_cohort-1'] + ] == ['MNIInfant_cohort-1_res-native', 'MNI152NLin6Asym_res-2', 'MNIInfant_cohort-1_res-2'] _reset_config() diff --git a/nibabies/workflows/base.py b/nibabies/workflows/base.py index 14c83e1f..a195fb78 100644 --- a/nibabies/workflows/base.py +++ b/nibabies/workflows/base.py @@ -840,7 +840,7 @@ def init_workflow_spaces(execution_spaces: SpatialReferences, age_months: int): spaces.add(Reference('MNI152NLin6Asym', {'res': vol_res})) # Ensure a non-native version of MNIInfant is added as a target cohort = cohort_by_months('MNIInfant', age_months) - spaces.add(Reference('MNIInfant', {'cohort': cohort})) + spaces.add(Reference('MNIInfant', {'cohort': cohort, 'res': 2})) return spaces @@ -955,10 +955,10 @@ def get_MNIInfant_key(spaces: SpatialReferences) -> str: key = None for space in spaces.references: # str formats as : - if 'MNIInfant' in str(space) and 'res-native' not in str(space): + if 'MNIInfant' in str(space) and 'res-2' in str(space): key = str(space) break if key is None: - raise KeyError(f'MNIInfant not found in SpatialReferences: {spaces}') + raise KeyError(f'MNIInfant (resolution 2x2x2) not found in SpatialReferences: {spaces}') return key