<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Samll error: slices_times = linspace(0, TR - (TR / nz), nz)  # delays<br></div><div>Otherwise I'm surprised too. What parameters do you give to SPM12 ?<br></div><div><br></div><div>B</div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>De: </b>"Christophe Pallier" <christophe@pallier.org><br><b>À: </b>"Neuroimaging analysis in Python" <neuroimaging@python.org><br><b>Envoyé: </b>Mercredi 14 Février 2018 19:57:05<br><b>Objet: </b>[Neuroimaging] slice timing check<br><div><br></div><div dir="ltr"><div>Hello,<br><div><br></div></div><div>I am trying to check various implementations of slice timing correction, including the pure python version in pypreprocess.<br><div><br></div></div><div>To this end, I have written a python script (attached) to generate a sinewave 'activation' pattern shifted along the z axis.<br><div><br></div></div><div>The result (`sinewave.nii`, included in the attached zip file) looks fine.<br><div><br></div></div><div>However, when I run the slicetiming correction with SPM (ot for that matter pypreprocess), with what I believe are the correct parameters, the delays of the various slices are not corrected as I would have expected (see asinewave.nii: I would have expected the z delays to be corrected and the image to be essentially uniform; the parameters for SPM are simply TR=1s, slice order=ascending; 40 slices)<br><div><br></div></div><div>I apologize because this is not really a Python question, but if I solve the issue, I may be able to convince colleagues that the pure python slice timing correction in pypreprocess is doing the right thing. So, basically, I hope that someone points out my mistake. <br><div><br></div></div><div>Best,<br><div><br></div></div><div><div><br>-- <br><div class="gmail_signature">--<br>Christophe Pallier <<a href="mailto:christophe@pallier.org" target="_blank" data-mce-href="mailto:christophe@pallier.org">christophe@pallier.org</a>><br>INSERM-CEA Cognitive Neuroimaging Lab, Neurospin, bat 145,<br>91191 Gif-sur-Yvette Cedex, France<br>Tel: 00 33 1 69 08 79 34<br>Personal web site: <a href="http://www.pallier.org" target="_blank" data-mce-href="http://www.pallier.org">http://www.pallier.org</a><br>Lab web site: <a href="http://www.unicog.org" target="_blank" data-mce-href="http://www.unicog.org">http://www.unicog.org</a><br></div></div></div></div><br>_______________________________________________<br>Neuroimaging mailing list<br>Neuroimaging@python.org<br>https://mail.python.org/mailman/listinfo/neuroimaging<br></blockquote><div><br></div></div></body></html>