Skip to content
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

Anatomical spatial: 3dFWHMx ValueError #116

Open
sgiavasis opened this issue Nov 9, 2017 · 0 comments
Open

Anatomical spatial: 3dFWHMx ValueError #116

sgiavasis opened this issue Nov 9, 2017 · 0 comments

Comments

@sgiavasis
Copy link
Contributor

A QAP user was getting this error when running anatomical spatial:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/plugins/multiproc.py", line 49, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 394, in run
self._run_interface()
File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 504, in _run_interface
self._result = self._run_command(execute)
File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py", line 630, in _run_command
result = self._interface.run()
File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1043, in run
runtime = self._run_wrapper(runtime)
File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1000, in _run_wrapper
runtime = self._run_interface(runtime)
File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/utility.py", line 499, in _run_interface
out = function_handle(**args)
File "", line 97, in qap_anatomical_spatial
File "/home/pbosco/.local/lib/python2.7/site-packages/qap/spatial_qc.py", line 351, in fwhm
vals = vals / pixdim
ValueError: operands could not be broadcast together with shapes (8,) (4,)
Interface Function failed to run.

He proposed this fix in spatial_qc.py, as 3dFWHMx now produces 8 values instead of 4:

vals_full = np.array(retcode.split(), dtype=np.float)
ind_pos = np.array([4,5,6,7])
vals = vals_full[ind_pos]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant