Skip to content

Commit d9fc034

Browse files
authored
Merge pull request #2373 from chrisfilo/fix/fwhm
Fix 3dFWHMx outputs
2 parents 6239693 + 5c8e170 commit d9fc034

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGES

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Upcoming release (0.14.1)
2-
================
2+
=========================
33

4+
* FIX: Robustly handled outputs of 3dFWHMx across different versions of AFNI (https://github.com/nipy/nipype/pull/2373)
45
* FIX: Cluster threshold in randomise + change default prefix (https://github.com/nipy/nipype/pull/2369)
56
* MAINT: Cleaning / simplify ``Node`` (https://github.com/nipy/nipype/pull/#2325)
67

nipype/interfaces/afni/utils.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1315,15 +1315,21 @@ def _list_outputs(self):
13151315
outputs['out_detrend'] = Undefined
13161316

13171317
sout = np.loadtxt(outputs['out_file']) #pylint: disable=E1101
1318+
1319+
# handle newer versions of AFNI
1320+
if sout.size == 8:
1321+
outputs['fwhm'] = tuple(sout[0, :])
1322+
else:
1323+
outputs['fwhm'] = tuple(sout)
1324+
13181325
if self._acf:
1326+
assert sout.size == 8, "Wrong number of elements in %s" % str(sout)
13191327
outputs['acf_param'] = tuple(sout[1])
1320-
sout = tuple(sout[0])
13211328

13221329
outputs['out_acf'] = op.abspath('3dFWHMx.1D')
13231330
if isinstance(self.inputs.acf, (str, bytes)):
13241331
outputs['out_acf'] = op.abspath(self.inputs.acf)
13251332

1326-
outputs['fwhm'] = tuple(sout)
13271333
return outputs
13281334

13291335

0 commit comments

Comments
 (0)