PDA

View Full Version : bst_headmodeler and ApplyGridOrient


Alexis
April 18th, 2007, 04:05
Hello,

I got an error while using bst_headmodeler.m script with option ApplyGridOrient set to '0'. The error is :

??? Undefined variable "GridOrient" or class "GridOrient".

Error in ==> bst_headmodeler at 1796
G(MEGndx,src) = Gmeg(:,k:k+2) * GridOrient{1}(:,src_ind);

So I had a look at the rest of the script, and found at several places this kind of code :

if 1%OPTIONS.ApplyGridOrient

So I wanted to know if you made the choice to not support modelisation without orientation constraints, or if this is just a bug ?

Thanks in advance

Alexis

Sylvain
April 23rd, 2007, 14:47
That's right Alexis, this option is not valid anymore. I will comment out this argument in bst_headmodeler; thank you.

If you don't want to specify a source orientation to your grid, please note that now bst_headmodeler always yield a gain matrix corresponding to 3 orthogonal dipoles per locations on top on the default one with orientations specified by normals to the local cortical surface.

this unconstrained gain matrix is stored in the ***_xyz.bin file that accompanies the ***.bin file containing the default gain matrix (ie with orientations).

Just use the read_gain routine to read this bigger matrix: it's Nsensors x 3 Nsources large. You may consequently compute your own gain with specific source orientations offline.

Cheers,

Alexis
April 24th, 2007, 03:49
Ok, Thank you Sylvain. ( And sorry if the post wasn't in the good part )

Cheers

Alexis