Print

Print


Hi,

As I think you realise, the GUI allows you to specify contrasts either via "Original EVs" or "Real EVs".  However, the former is just a convenient way to specify F-tests that are across the Real EVs.  If you flick between these settings in the contrast tab then you'll see what it is doing.  

If you want to directly create a design.fsf file that encodes basis function (FIR or otherwise) then you'll need to setup these Real EV contrasts.  These are related to the Original EV settings via pairing of the basis functions across Original EVs - effectively replacing each part of the original EV contrast matrix with a diagonal matrix.  Then you need to have F-tests combining across the different basis functions.

In terms of a loop it should look something like this pseudocode (assuming N basis functions per Original EV, and M contrasts on the original EVs):

RealCon=zeros(M*N,NEV*N)
for ncon in 1 to M
  for column in 1 to NEV
    for bnum in 1 to N
        RealCon[(ncon-1)*N + bnum,(column-1)*N+bnum] = OrigCon[ncon,column]
    end for
  end for
end for

FCon=zeros(M*N,M)
for ncon in 1 to M
   for bnum in 1 to N
      FCon[(ncon-1)*N+bnum,ncon] = 1
   end for
end for

Check this code (as I haven't tested it) against what you see in the GUI.
It also assumes that all EVs have been modelled with FIR (or the same set of basis functions).
I hope it's helpful.

All the best,
	Mark

> On 7 Aug 2017, at 16:04, Wiktor Olszowy <[log in to unmask]> wrote:
> 
> Dear FSL community,
> 
> I try to specify the Finite Impulse Response (FIR) HRF model in the FEAT design file. It is easy to change the number of basis functions and the window length [s] in the FEAT design file, but I am confused because the FEAT design file specifies the contrasts too. This means that for different FIR options I have to generate dozens of lines with the contrasts. If I was interested in only 1 set of parameters, I could use the GUI once and adjust its FEAT design file. However, I am interested in a flexible approach, where I can choose the FIR options in my script. Is there some trick apart from writing a for loop? I know it is easy to write such a for loop, but I am concerned about interfering with the FEAT design file too much.
> 
> Regards,
> 
> Wiktor Olszowy