neuromag data and lead fields for sensors
r.oostenveld at FCDONDERS.RU.NL
Sun Feb 5 13:55:02 CET 2006
On 4-feb-2006, at 21:47, Tolga Ozkurt wrote:
> Hello all,
> I have just downloaded Fieldtrip and trying use it with data collected
> from Neuromag 306 Vectorview system. When I used the version of
> 20060131; I had some problems even with reading data and I had to make
> some minor changes in the code mentioned in the pervious post of
> the list.
> The main problem of me is how to compute the lead field with Neuromag
> data? The fieldtrip gives me orientation values which are exactly
> same for
> the same coil. Haw can I exploit these orientation of the sensors
> for two
> planar gradiometers and one magneteometer for each coil? I will
> appreciate, if you could help. Thanks.
Let me first explain the headmodels. Fieldtrip supports different
forward models for MEG. The ones that we use the most are based on
the multisphere model, i.e. each channel has it's own sphere. We
construct the multisphere models by fitting the spheres to the head
surface. That is done using CTF software, and the result is stored in
a *.hdm file. Since recently we do have a fieldtrip function which
can replace the CTF software, and which allows fitting the spheres to
the brain surface instead of to the head surface. That function
(prepare_localspheres) is not yet in the release version, if you are
interested in beta testing, I can send it to you.
Fieldtrip also supports single sphere models. Those can also be read
from CTF *.hdm file, but are also easy to specify on the command
cfg.vol.r = 12;
cfg.vol.o = [0 0 5];
specifies a 12cm sphere with its origin in [0 0 5] (relative to the
head coordinate system).
Finally, fieldtrip also supports the use of the BEM head models that
can be constructed in the Neuromag software. That requires the mex
files which are released by Neuromag to their customers (I think in
the pd-calc toolbox), specifically the mex file "megfield" is
required. This code has been contributed by Joachim Gross, and he
tested it for the 122 channel Neuromag system. [* see below]
I suggest that for the moment, you try to get the single sphere model
to work, since that is the easiest.
Now the gradiometer array: It indeed has the position (grad.pnt) of
each coil and the orientation (grad.ori) of each coil. But
furthermore, it has the field
grad.tra, which combines the field at the two coils into one
gradiometer-channel-output. I.e. if grad.pnt=302x3 (for our 151
channel CTF), then grad.tra is 151x302. Multiplying the leadfield on
the 302 coils with the 151x302 matrix results in the 151 channel
leadfield that we need. The grad.tra is a very sparse matrix,
consisting of the concatenation of identity matrices. That is where
your question of the orientations relates to, i.e.
If grad.tra = [eye(151) eye(151)], then the orientations of the two
coils should be opposite, since the field at the two coils is added.
If grad.tra = [eye(151) -eye(151)], then the orientations of the two
coils should be the same, since the subtraction is coded in the minus
So the orientation can be coded either in the grad.ori, or in the
grad.tra. I suspect that for the Neuromag, it is coded in the
grad.tra matrix. I hope that this clarifies it. You should be able to
use the prepare_leadfield() function to compute the leadfield at many
grid locations at once. If you want to do more low-level computations
yourself, you should use the private/compute_leadfield() function.
I would appreciate it if you can report back whether it works, since
sofar I don't fully know how well FieldTrip works on Neuromag data.
In principle it should all work, and some people have used it wich
success on their data, but I guess (as obvious from the previous
mail) that there are still some small glitches that need to be fixed
in the official version. So please share your findings with us, so
that we can improve the support.
[*] I just checked, and it seems as this code is not in the current
release version any more. I will build it back in.
More information about the fieldtrip