Skip to content

Fix 3dFWHMx outputs #2373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Upcoming release (0.14.1)
================
=========================

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

Expand Down
10 changes: 8 additions & 2 deletions nipype/interfaces/afni/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,15 +1315,21 @@ def _list_outputs(self):
outputs['out_detrend'] = Undefined

sout = np.loadtxt(outputs['out_file']) #pylint: disable=E1101

# handle newer versions of AFNI
if sout.size == 8:
outputs['fwhm'] = tuple(sout[0, :])
else:
outputs['fwhm'] = tuple(sout)

if self._acf:
assert sout.size == 8, "Wrong number of elements in %s" % str(sout)
outputs['acf_param'] = tuple(sout[1])
sout = tuple(sout[0])

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

outputs['fwhm'] = tuple(sout)
return outputs


Expand Down