Skip to content

Commit b653c86

Browse files
committed
RF: Revert MNI152NLin2009cAsym to default BOLD outputs
1 parent f682c9e commit b653c86

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

fmriprep/cli/run.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_parser():
129129
'option is not enabled, standard EPI-T1 coregistration is performed '
130130
'using the middle echo.')
131131
g_conf.add_argument(
132-
'--output-spaces', nargs='+', action=OutputReferencesAction, default=SpatialReferences(),
132+
'--output-spaces', nargs='*', action=OutputReferencesAction, default=SpatialReferences(),
133133
help="""\
134134
Standard and non-standard spaces to resample anatomical and functional images to. \
135135
Standard spaces may be specified by the form \
@@ -138,8 +138,8 @@ def get_parser():
138138
colon-separated parameters. \
139139
Non-standard spaces imply specific orientations and sampling grids. \
140140
Important to note, the ``res-*`` modifier does not define the resolution used for \
141-
the spatial normalization.
142-
For further details, please check out \
141+
the spatial normalization. To generate no BOLD outputs, use this option without specifying \
142+
any spatial references. For further details, please check out \
143143
https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (currentv.base_version
144144
if is_release else 'latest'))
145145

@@ -718,7 +718,14 @@ def parse_spaces(opts):
718718
719719
"""
720720
spaces = opts.output_spaces
721-
spaces.checkpoint()
721+
if not spaces.references and not spaces.is_cached():
722+
warnings.warn(
723+
"No output spaces have been set - fMRIPrep will add `MNI152NLin2009cAsym` by default."
724+
)
725+
spaces.add('MNI152NLin2009cAsym')
726+
727+
if not spaces.is_cached(): # spaces may be already checkpointed if users want no BOLD outputs
728+
spaces.checkpoint()
722729

723730
if opts.use_aroma:
724731
# Make sure there's a normalization to FSL for AROMA to use.
@@ -730,15 +737,7 @@ def parse_spaces(opts):
730737
spaces.add(('fsaverage', {'den': '164k'}))
731738
spaces.add(('MNI152NLin6Asym', {'res': vol_res}))
732739

733-
# These arguments implicitly signal expected output
734-
if not spaces.references:
735-
warnings.warn(
736-
"fMRIPrep will not generate preprocessed derivatives because "
737-
"none of `--output-spaces`, `--use-aroma`, or `--cifti-output` "
738-
"were set."
739-
)
740-
741-
# Add the default standard space (required by several sub-workflows)
740+
# Add the default standard space if not already present (required by several sub-workflows)
742741
if "MNI152NLin2009cAsym" not in spaces.get_spaces(nonstandard=False, dim=(3,)):
743742
spaces.add("MNI152NLin2009cAsym")
744743
return spaces

0 commit comments

Comments
 (0)