<div dir="ltr"><div><div><div><div><div><div><div><div>Dear Python neuroimagers,<br><br></div>I'm brand new to NiPype, so excuse the very basic question.  <br><br></div>I am trying to use the FmriRealign4d algorithm.  <br><br></div>Based on the example <a href="http://nipy.sourceforge.net/nipype/interfaces/generated/nipype.interfaces.nipy.preprocess.html" target="_blank">here</a> I wrote the following to try to slice time correct/realign a single run:<br><br>_____________________________<br><br>from nipype.interfaces.nipy.preprocess import FmriRealign4d<br>import os<br><br>pth = "/media/truecrypt1/SocCog/tmp1/run1L2"<br><br>infile = os.path.join(pth, '4D.nii')<br><br>realigner = FmriRealign4d()<br>realigner.inputs.in_file = [infile]<br><a href="http://realigner.inputs.tr" target="_blank">realigner.inputs.tr</a> = 2.2<br>realigner.inputs.slice_order = range(0, 36, 2) + range(1, 35, 2)<br>realigner.inputs.time_interp = True<br>res = realigner.run()<br><br><br>_________________________________<br><br><br></div>(I added the explicit definition of time_interp because I got an error when I didn't.)<br><br></div><div>Here's the new error:<br><br>_________________________________________<br><br>/usr/local/lib/python2.7/dist-<div dir="ltr">packages/nipype-0.9.2-py2.7.egg/nipype/interfaces/base.py:376: UserWarning: Input slice_order requires inputs: time_interp<br>  warn(msg)<br>Traceback (most recent call last):<br>  File "/home/katie/ks_scripts/python_scripts/pimriscripts/real4d.py", line 17, in <module><br>    res = realigner.run()<br>  File "/usr/local/lib/python2.7/dist-packages/nipype-0.9.2-py2.7.egg/nipype/interfaces/base.py", line 946, in run<br>    runtime = self._run_interface(runtime)<br>  File "/usr/local/lib/python2.7/dist-packages/nipype-0.9.2-py2.7.egg/nipype/interfaces/nipy/preprocess.py", line 162, in _run_interface<br>    start=self.inputs.start)<br>TypeError: __init__() takes at least 4 arguments (7 given)<br>Interface FmriRealign4d failed to run. <br><br>Process finished with exit code 1<br><br>_______________________________________+<br><div class="yj6qo ajU"><div id=":1eq" class="ajR" tabindex="0"><img class="ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></div><br></div><div><br></div>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.<br><br></div>Thanks very much for your help.<br><br></div>Best,<br></div>Katie<br clear="all"><div><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Katie Surrence, M.S.</div><div>Research Coordinator<br>Social Cognition Laboratory<br></div>New York State Psychiatric Institute<br></div></div>
</div></div></div></div></div>