Fwd: dipolesimulation

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Fri Dec 3 14:58:19 CET 2004


Hi Teresa,

Let me answer your questions one by one. I'll also forward this message 
to the fieldtrip list, since other people might be interested in this 
as well.

On Thu, 2 Dec 2004, Teresa Montez wrote:
>
> To simulate CTF data with the dipolesimulation what should I use as:
>
> elec.pnt
> elec.label

This defines electrode positions (pnt) and labels. For simulation CTF 
MEG
data you do not have to specify this.

> grad.pnt
> grad.ori
> grad.tra
> grad.label

This defines a gradiometer array, as explained in the faq on the
homepage. You can define your own array with magnetometers and/or
gradiometers. But you mention that you want to simulate CTF data, so I
suggest that you use a gradiometer from one of your CTF recordings. If 
you
do

hdr = read_fcdc_header('Experiment_blabla.ds/Experiment_blabla.res4')

i.e. read the CTF res4 file which actually contains the header
information, then hdr will contain the field grad:

hdr.grad.pnt            (location of coils)
hdr.grad.ori            (orientation of coils)
hdr.grad.tra            (how to combine the coils in gradiometers)
hdr.grad.label          (labels of the gradiometers)

> Maybe add some examples to the answer you have in the FAQ section of
> the fieldtrip site.

We are aware that we have to work on the tutorials, and I'll remember 
also
to make a dipolesimulation tutorial. Right now we still have the problem
that we cannot make the tutorial datasets available since the webserver
does not allow us to put up large files, but that is also being looked
into.

> For the headmodel I am using
>
> cfg.vol.r = 5
> cfg.vol.o = [0, 0, 0]
>
> as defined in the function MEGplanar help. In the tutorial pdfs there
> is mention to some .hdm files: is it possible to send me examples?
> Maybe also for the electrodes and gradiometers.

You'll probably have plenty of CTF headmodel files yourself, search your
CTF datasets for files with the extension *.hdm. In CTF you can make 
them
with the MRIViewer, and/or by using the CTF localSpheres program. I have
attached two example files (you can look at them with any ascii editor),
but remember that a localSpheres headmodel belongs to a specific 
dataset:
the spheres and gradiometers are matched for that specific dataset and 
you
cannot use the localspheres file for another dataset/session. To 
specify a
headmodel from a file, you should use the field cfg.hdmfile, the field
cfg.vol is used to specify a headmodel that is already in matlab memory
(i.e. a manually created one).

> The relative noise should be defined as 0.1 (corresponding to 10% of
> the simulated signal)? And for the absolute noise, what are “defaults”
> values for MEG data (units)?

The "relative noise" is added to the data by computing the RMS value of
the simulated dipole activity ands then adding gaussian noise with unit
variance to each channel multiplied by cfg.relnoise times the RMS value.
The "absolute noise" is added to teh data by multiplying gausian white
noise with unit variance multiplied by cfg.absnoise. There are no 
defaults
there.

Meaningfull values depend on the size of your dipole signal, and that
depends on the size of the dipole moment. Furthermore, it all depends on
the units of the dipole, gradiometers and volume model (i.e. cm or m).
Fieldtrip is ignorant for these units, and therefore it is not feasible 
to
give a prior estimate of the size (in T or fT) of the simulated data. I
suggest that you first compute the simulated data with no noise, look at
the signals using the plain Matlab plot() function and then decide how
much noise you want to add.

> How to define a dipole that would have different strength in each 
> trial?

That is done by specifying cfg.dip.signal (as oppsed to specifying
cfg.dip.frequency/phase). This cfg.dip.signal can be a cell-array, with
each cell being a vector representing the strength of the dipole in that
specific trial. I.e.

for trl=1:Ntrials
   cfg.dip.signal{trl} = randn(1, Nsamples);
end

will make Ntrials, each having Nsamples and with a random strength for 
the
dipole.

> Thanks for your time,
> Teresa

best regards,
Robert



More information about the fieldtrip mailing list