Print

Print


Hi Catie,

I hope this helps....

This 32 offset value comes from spm_get_ons.m.
The stimulus function or box-car function has a length of nscans * 
microtime resolution (usually the number of slices) + 32.
If you plot the field u in the U structure, you will realize that there 
is an offset of 32.
just do figure, plot(U.u) and zoom

This value of 32 is the length of the canonical hrf in seconds, which is 
computed in spm_get_bf.
Also note that the length of bf is 32 *  TR/microtime resolution, where 
TR/microtime resolution is your time between two matlab points.

In the case you are not using the any of the canonical hrf choices (hrf  
or hrf + temporal derivative or hrf + temporal and dispersion 
derivative) then the default value of the window for your basis 
functions is 32 (see spm_get_bf.m), unless you input another value. In 
that case, I am not really sure whether this 32 offset is still 
appropiate or it must be changed to SPM.xBF.length.

Then, your set of basis functions (bf) is convolved in spm_volterra with 
your stimulus function (U.u), and the output of convolution has a length 
of length(U.u) + length(bf) -1, so you must pad zeros before your 
stimulus function. According to matlab, there is no need to pad zeros to 
your signal since convolution is done in frequency domain. But i am not 
really sure if this padding is crucial for some some other spm files 
when plotting results. Any suggestions?

Then downsampling is carried out and these signals in X are used to 
build the design matrix. So in my opinion, this is not a minor question 
since the downsampling is crucial for event related fmri and, especially 
when your TR is large. Note that there is another offset of T0 which is 
your microtime onset, and according to the SPM5 manual this must be set 
equal to the time point of your reference slice. So this is clearly 
related to the slice timing problem.

Cesar Caballero

Phd Student
Computer Science School/SPMMRC
University of Nottingham

Catie Chang wrote:
> Hi -
>
> This is a very very minor question, but I was just noticing that in
> spm_fMRI_design.m (in SPM5), a 32-bin offset is used when resampling
> the regressors at acquisition times. I was wondering where the 32
> comes from.
>
> Thanks :)
> catie


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.