[Neuroimaging] FmriRealign4d: TypeError: __init__() takes at least 4 arguments (7 given)
katiesurrence at gmail.com
Mon Aug 10 19:47:30 CEST 2015
Thanks for the heads up! Just upgrading nipype didn't work but I found a
page full of packages I was supposed to have (this one:
http://miykael.github.io/nipype-beginner-s-guide/installation.html) and I
upgraded all of them and now it works! Sorry I wrote to the wrong list.
On Mon, Aug 10, 2015 at 1:31 PM, Chris Filo Gorgolewski <
krzysztof.gorgolewski at gmail.com> wrote:
> Do you get the same error with the most up to date version of Nipype
> PS please use neurostars.org for user support next time.
> On Mon, Aug 10, 2015 at 10:26 AM, Katie Surrence <katiesurrence at gmail.com>
>> Dear Python neuroimagers,
>> I'm brand new to NiPype, so excuse the very basic question.
>> I am trying to use the FmriRealign4d algorithm.
>> Based on the example here
>> I wrote the following to try to slice time correct/realign a single run:
>> from nipype.interfaces.nipy.preprocess import FmriRealign4d
>> import os
>> pth = "/media/truecrypt1/SocCog/tmp1/run1L2"
>> infile = os.path.join(pth, '4D.nii')
>> realigner = FmriRealign4d()
>> realigner.inputs.in_file = [infile]
>> realigner.inputs.tr = 2.2
>> realigner.inputs.slice_order = range(0, 36, 2) + range(1, 35, 2)
>> realigner.inputs.time_interp = True
>> res = realigner.run()
>> (I added the explicit definition of time_interp because I got an error
>> when I didn't.)
>> Here's the new error:
>> UserWarning: Input slice_order requires inputs: time_interp
>> Traceback (most recent call last):
>> File "/home/katie/ks_scripts/python_scripts/pimriscripts/real4d.py",
>> line 17, in <module>
>> res = realigner.run()
>> line 946, in run
>> runtime = self._run_interface(runtime)
>> line 162, in _run_interface
>> TypeError: __init__() takes at least 4 arguments (7 given)
>> Interface FmriRealign4d failed to run.
>> Process finished with exit code 1
>> I tried following the error in the debugger and it's going so deep into
>> such a complicated code base it seems very unlikely I'd be able to figure
>> it out. Does anyone have any idea how to make this run? I know it's
>> highly possible I'm doing something very obvious wrong.
>> Thanks very much for your help.
>> Katie Surrence, M.S.
>> Research Coordinator
>> Social Cognition Laboratory
>> New York State Psychiatric Institute
>> Neuroimaging mailing list
>> Neuroimaging at python.org
> Neuroimaging mailing list
> Neuroimaging at python.org
Katie Surrence, M.S.
Social Cognition Laboratory
New York State Psychiatric Institute
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Neuroimaging