Hey Bob!
Noticed that too when trying to disable orth for parametric designs. It looks like an oversight given that the 2nd orth step in spm_fMRI_design will have no effect on parametrics that are already orthogonal. To venture a guess, it makes practical sense when writing spm_get_ons to orthogonalize the parametric regressors right away (makes the code more comprehensible) even if it's redundant with the orthogonalization in spm_fMRI_design which is the more essential step since, for each condition, we want to orthogonalize any basis functions or FIR timebins after convolution (something that would never happen within spm_get_ons)
But with regards to (2). Yeah disable both and you will be aces. One way have your cake and eat it too is to set a global variable (disable_orth) and then put a check in get_ons and fmri design, that way everyone can keep using the same stock spm files without enforcing orth or no orth for everyone. Like this pseudo-code:
global disable_orth
if disable_orth == 0
orth me
else
don't orth me bro
end
Note that this will break your ability to have unorth parametrics and orthogonalized basis functions within the same design.
Cheers!
On Wed, 4 Sep 2013 12:06:15 -0700, Bob Spunt <[log in to unmask]> wrote:
>Dear experts -
>
>I've searched the list and played around with the code and have
>reached the point where I feel I should just toss this out to the
>experts. By default in SPM8, spm_fMRI_design.m applies within-trial
>serial orthogonalization twice, both before and after convolution.
>Before, it's via a call to spm_get_ons (which calls spm_orth at around
>line 228); after, it loops over the trials and again calls spm_orth.
>(I've pasted the relevant chunk of spm_fMRI_design.m below.) I would
>be grateful for comments on the following two questions:
>
>1. Why orthogonalize twice?
>
>2. If one wants to skip the default serial orthogonalization so that
>all parametric effects explain only unique variance, both of the calls
>to spm_orth must be skipped, correct?
>
>
>Thanks in advance!
>
>Relevant code from spm_fMRI_design.m below:
>
>% Get inputs, neuronal causes or stimulus functions U
>%------------------------------------------------------------------
>U = spm_get_ons(SPM,s);
>
>% Convolve stimulus functions with basis functions
>%------------------------------------------------------------------
>[X,Xn,Fc] = spm_Volterra(U,bf,V);
>
>% Resample regressors at acquisition times (32 bin offset)
>%------------------------------------------------------------------
>try
> X = X((0:(k - 1))*fMRI_T + fMRI_T0 + 32,:);
>end
>
>% and orthogonalise (within trial type)
>%------------------------------------------------------------------
>for i = 1:length(Fc)
> X(:,Fc(i).i) = spm_orth(X(:,Fc(i).i));
>end
|