Help with dipole fitting

Ludwing Torres lumatobu2 at HOTMAIL.COM
Sun Jul 25 01:59:53 CEST 2010









  


Hi Paul, Thanks for the answer, I'll put in bold the new entries in this message.


Well, I am trying to compute a fordward model by now, like
this:

  

V=A*J

  

where:

  

V= a matrix of potentials measured in the scalp surface by each
electrode, for example 32 electrodes or channels and 5 seconds at 256
samples per second, (which is equal to 5*256=1280, which comes to a
32x1280 matrix, one epoch I guess, and one trial, just measure, no
events, please correct me if i'm wrong)


This sounds quite correct, I think, but AFAIK you won't compute this
directly but use some function like the ft_dipolesimulation function we
talked about last time. This does exactly what you want to do, compute
the electrode scalp potentials due to a given dipole distribution.
Spares you all the stuff you are now to consider.>>

I'll do that. Could you explain me also what an epoch stands for, please?


J= a matrix of the sources in the brain that produce the
potentials above, with its time course, which are more than the
electrodes placed there.

    Let me understand this: ¿these sources and its time course, are the
same dipole moments?

    If so, ¿The sources (dipoles) have a time component in the three
dimensions in the dipoles?

    Thus, if we consider 128 sources, ¿ are we considering 128 dipoles,
and J matrix would be 128x1280 with the time course?

    or ¿Are we considering 128 sources of 3 dimensions and J matrix
would be of 128x(1280x3)?

        I think it's rather the latter, but see below.

A= the lead field matrix. I've seen the function
compute_leadfield of FieldTrip, This uses the electrodes positions, the
dipoles (or sources) positions, and the standard volume of sphere and
conductivities to perform the computing of a leadfield matrix that has
dimensions numch x (3xnums)  where numch=nuber of channels or
electrodes (32 in this case)  and  nums=number of sources (in this
case  128)  ¿why is the number of sources multiplied by 3?  ¿ it is
because they compute the leadfield matrix to each of the cartesian
coordinates? and if so, ¿How should I take the J matrix to compute the
fordward model? ¿ should I take this each row having the time course of
the sources, in the order:  row 1:3 dipole n1 (x;y;z) ,  row 4:6 
dipole n2 (x;y;z)  , row 7:9  dipole n3  (x;y;z)  , row 10:12  dipole
n4 (x;y;z)  and so on? ¿ so, I'd have a (128x3)x1280 matrix, (128x3)
rows and 1280 columns, and not like above 128x(1280x3)?



        Please see the documentation (reference for compute_leadfield)

The forward solution is expressed as the leadfield
  matrix (Nchan*3), where each column corresponds with the potential or field
  distributions on all sensors for one of the x,y,z-orientations of the
  dipole.


This appears to be the leadfield for a dipole at a certain position.
You'd multiply the moment of the dipole you are trying to simulate with
the very matrix. At least mathematically I think you'd build the
lf-matrix for an number of dipoles as an (NchanX(Ndip*3))
matrix where every three columns represent the contribution of one
dipole to the surface potential. The first of the three columns is the
contribution of the x-moment of the dipole and same for 2nd and 3rd
column representing the y- respectively z-moment. Note that this is -
by now - only a consideration of time independent dipoles. What the 
lf-matrix does is mapping dipoles to electrodes. Nchan is the number of
electrodes. For your 128 dipole-example (which could make a problem
when fitting) the lf-matrix would be a 32x384-matrix with fixed
positions for the dipoles. Where - as I said before - every row stands
for an electrode and every triple of three cols for the contribution of
one dipole to the electrodes. If you'd want to simulate the dipoles at
a single point in time you'd build a vector 



dip = [d1x d1y d1z d2x d2y d2z ... d128x d128y d128z]'



where dnx is the x-moment of the n-th dipole and same for y and z. This
would be a column vector or matrix with a single column. If you'd make
a (384x1280)-matrix with the rows being the dipoles and the columns the
temporal change of the dipoles and multiply the lf matrix with this
you'd get a matrix 32x1280 with the rows being the electrodes and the
columns the time course. So the source matrix is not a (128x(1280*3))-
but rather a ((128*3)x1280)-matrix. 



And, once I have performed the forward model and I compute
the V matrix, ¿Which function could I use to perform the inverse
problem, i.e. , could I use a function that allows me recovering or
regain the J matrix from the A and V matrices, and compare the new J
with the old J to see if the inverse problem could be performed well?

  
Still I'd recommend the use of the dipolesimulation and dipolefitting
functions rather than using the lf directly. I think this is quite more
flexible. I don't really know how to perform the inverse solution in
this case.
Please, If you could suggest me some article or book or
paragraph that I can read to clear these doubts, or if you could clear
these to me yourselves, I would be very much thankful to you, please
I'm begging you help please. Sorry for all the possible fouls and lacks
of politeness, sincerely.Thanks for your attention.

  
See for example Michel
et al.: EEG source imaging. 



Hope this helps.



Cheers,

Paul


Ok this has been very helpful, I think I still dont understand very well the concept of dipole moment, I'll search more information about this and how to manage the dipole moments as vectors; if you could suggest me some other book to learn about what is a dipole moment (also from the point of view of linear algebra) I'll thank you too, and this will help me think about how to use the dipolefitting function.

Very Many thanks again.

-- 
Paul Czienskowski
Björnsonstr. 25
12163 Berlin

Tel.: (+49)(0)30/221609359
Handy: (+49)(0)1788378772


----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

  http://listserv.surfnet.nl/archives/fieldtrip.html

  http://www.ru.nl/fcdonders/fieldtrip/
 		 	   		  
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100724/15028d86/attachment-0002.html>


More information about the fieldtrip mailing list