Torben,
> I think Markos regressors will correspond to the less known "spin
> future” regressors :-)
"But master Yoda said I should be mindful of the future?"
"But not at the expense of the moment!"
Thanks for picking this up, was obviously typing too fast to think :)
Marko
PS: corrected line for the records
temp = [temp [zeros(1, size(temp,2)); temp(1:end-1,:)] [zeros(1,
size(temp,2)); temp(1:end-1,:)].^2 temp.^2];
I typically use something like the following:
>
>
> %load the motion parameters into a nvols x 6 matrix:
> m=load('rp_fF3384-0015-00001-000001.txt’); %insert your filename here
>
> % Define the spin history values as the movement parameters from the
> previous volume, and insert zeros for the first one:
> mh=[zeros(1,6); m(1:end-1,:)];
>
> % Create a matrix with the 24 Friston regressors
> R=[m m.^2 mh mh.^2];
> save(‘motionregs.txt’,'R','-ascii')
>
>
>
> Best
> Torben
>
>
>
>> Den Uge:12 18/03/2015 kl. 08.41 skrev Marko Wilke
>> <[log in to unmask]
>> <mailto:[log in to unmask]>>:
>>
>> Hello,
>>
>> alternatively, you could simply paste the following into Matlab
>>
>> % === start ===
>> rps = spm_select(Inf, 'any', 'Select realignment parameter files',
>> [], pwd, '^rp.*.txt');
>> for i = 1:size(rps,1)
>>
>> [p, nm, ~,~] = spm_fileparts(rps(i,:));
>> temp = load(rps(i,:));
>> temp = [temp [temp(2:end,:); mean(temp)] [temp(2:end,:);
>> mean(temp)].^2 temp.^2];
>> outfile = [p filesep nm '_volt.txt'];
>> eval(['save ' outfile ' temp ''-ascii'';'])
>> end;
>> % === end ===
>>
>> which, if you avoided line breaks, will write out ..._volt.txt files
>> containing the original and the shifted and respective squared
>> versions. Of course, you could also use the motion fingerprint instead
>> but that is another story ;)
>>
>> Cheers,
>> Marko
>>
>> YAN Chao-Gan wrote:
>>> Hi Christian,
>>>
>>> You can try DPARSF (http://rfmri.org/DPARSF), a SPM extension. DPARSF
>>> has integrated the preprocessing procedures.
>>>
>>> Best,
>>>
>>> Chao-Gan
>>>
>>> On Tue, Mar 17, 2015 at 2:52 PM, Christian La <[log in to unmask]
>>> <mailto:[log in to unmask]>
>>> <mailto:[log in to unmask]>> wrote:
>>>
>>> Hi,
>>>
>>> is there an easy way to implement Friston 24-parameter motion
>>> correction in SPM?
>>>
>>> bests,
>>> Christian
>>>
>>> --
>>> Christian La
>>> /Graduate Student/
>>> Neuroscience Training Program
>>> University of Wisconsin, Madison
>>> Madison, USA
>>>
>>>
>>
>> --
>> ____________________________________________________
>> PD Dr. med. Marko Wilke
>> Facharzt für Kinder- und Jugendmedizin
>> Leiter, Experimentelle Pädiatrische Neurobildgebung
>> Universitäts-Kinderklinik
>> Abt. III (Neuropädiatrie)
>>
>> Marko Wilke, MD, PhD
>> Pediatrician
>> Head, Experimental Pediatric Neuroimaging
>> University Children's Hospital
>> Dept. III (Pediatric Neurology)
>>
>> Hoppe-Seyler-Str. 1
>> D - 72076 Tübingen, Germany
>> Tel. +49 7071 29-83416
>> Fax +49 7071 29-5473
>> [log in to unmask] <mailto:[log in to unmask]>
>>
>> http://www.medizin.uni-tuebingen.de/kinder/epn/
>> ____________________________________________________
>
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|