@@ -573,7 +573,12 @@ def build_workflow(opts, retval):
573
573
* Run identifier: {uuid}.
574
574
""" .format
575
575
576
- output_spaces = opts .output_space or []
576
+ # Reduce to unique space identifiers
577
+ output_spaces = sorted (set (opts .output_space ))
578
+
579
+ # If FS is not run, drop all fs* output spaces
580
+ if not opts .run_reconall :
581
+ output_spaces = [item for item in output_spaces if not item .startswith ('fs' )]
577
582
578
583
# Validity of some inputs
579
584
# ERROR check if use_aroma was specified, but the correct template was not
@@ -586,14 +591,19 @@ def build_workflow(opts, retval):
586
591
'spaces (option "--output-space").'
587
592
)
588
593
589
- if opts .cifti_output and (opts .template != 'MNI152NLin2009cAsym' or
590
- 'template' not in output_spaces ):
591
- output_spaces .append ('template' )
592
- logger .warning (
593
- 'Option "--cifti-output" requires functional images to be resampled to MNI space. '
594
- 'The argument "template" has been automatically added to the list of output '
595
- 'spaces (option "--output-space").'
596
- )
594
+ if opts .cifti_output :
595
+ if 'template' not in output_spaces :
596
+ output_spaces .append ('template' )
597
+ logger .warning (
598
+ 'Option "--cifti-output" requires functional images to be resampled to MNI '
599
+ 'space. The argument "template" has been automatically added to the list of '
600
+ 'output spaces (option "--output-space").' )
601
+ if not [s for s in output_spaces if s in ('fsaverage5' , 'fsaverage6' )]:
602
+ output_spaces = sorted (output_spaces + ['fsaverage5' ])
603
+ logger .warning (
604
+ 'Option "--cifti-output" requires functional images to be resampled to fsaverage '
605
+ 'space. The argument "fsaverage5" has been automatically added to the list of '
606
+ 'output spaces (option "--output-space").' )
597
607
598
608
# Check output_space
599
609
if 'template' not in output_spaces and (opts .use_syn_sdc or opts .force_syn ):
0 commit comments