Dear Roohi and Helmut,
if you want to add a "No convolution" option in SPM12, you just need to
edit two files as described below:
In config/spm_cfg_fmri_spec.m around l.562:
> %--------------------------------------------------------------------------
> % none None
> %--------------------------------------------------------------------------
> none = cfg_const;
> none.tag = 'none';
> none.name = 'None';
> none.val = { true };
> none.help = {'No convolution.'};
>
> %--------------------------------------------------------------------------
> % bases Basis Functions
> %--------------------------------------------------------------------------
> % [...]
> bases.values = {hrf fourier fourier_han gamma fir none};
In config/spm_run_fmri_spec.m around l.70:
> bf = char(fieldnames(job.bases));
> if strcmp(bf,'none')
> SPM.xBF.name = 'NONE';
> elseif strcmp(bf,'hrf')
I think I was initially reluctant to add the option in SPM in order to
keep the simple message that 'conditions' are convolved by basis
functions (eg HRF) while 'regressors' are not, but it's a minor point so
I'll make the change available in the next update of SPM12.
If you want to create a set of regressors modelling frequencies between
0.01 and 0.08 Hz, you can use spm_dctmtx:
N = 230;
TR = 2; % {s}
h = [0.01 0.08]; % {Hz}
n = fix(2*(N*TR)*h + 1);
X = spm_dctmtx(N);
X = X(:,n(1):n(2));
figure,imagesc(X),colormap(gray)
At last, you might also be interested in these publications:
http://dx.doi.org/10.1016/j.neuroimage.2013.12.009
http://dx.doi.org/10.1093/brain/awu027
Best regards,
Guillaume.
On 19/02/15 16:45, H. Nebl wrote:
> Dear Roohi,
>
> The realignment parameters / the rp file would be selected as "Multiple regressors" during model specification.
>
> You can specify your own regressors via "Multiple regressors" or the "Regressors" option, with one value a TR/volume, none of these regressors undergoes convolution. "Conditions" can be left empty in that case. If you want to test for a box-car function you would enter something like 0 0 0 1 1 1 0 0 0 ... . Instead of their binary approach you could also enter values reflecting sine and cosine functions of certain frequencies, downsampled to one value a TR/volume. Something like sin(2*pi*f*(0:(n-1))*TR) entered as "Value" should do it, with f corresponding to the frequency of interest in Hz, n corresponding to the no. of volumes and TR corresponding to the repetition time in s. But please check this yourself.
>
> Alternatively, you can also specify the box-car functions via onsets and durations, but then you have to turn off the convolution. https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=spm;fbddcce4.1009 is an old thread on that topic and Guillaume provides a solution, but the code seems to have been changed since then. @ Guillaume / other SPM authors: Maybe we could get a "No convolution" option for the GUI with the next update? Or maybe it's already hidden somewhere?
>
> Hope this helps for the moment,
>
> Helmut
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|