[FieldTrip] Dipole time course

Rojas, Don Don.Rojas at ucdenver.edu
Thu Mar 31 17:57:41 CEST 2011


Mehmet et al.

As a follow up to this, once you have the orientation info from the dipole, the source space projection you wish to achieve to derive the timecourse can be done as follows (or at least something similar to this), assuming you have the fieldtrip data (data) the source, and the volume conductor (vol):

L    = ft_compute_leadfield(source.dip.pos, data.grad,vol); % leadfields
Li   = pinv(L); % pseudoinverse of L
Qn = double(orientation_vector)/norm(orientation_vector); % normed orientation vector
W   = dot(Li,Qn); % weights for projection to source space
waveform = dot(data,repmat(W',1,length(data))); % source waveform

where the orientation_vector is a 1 x 3 vector of qx, qy and qz. This can be had from one of your sources from source.dip.mom, or from the suggestion of Jan-Mathijs. I don't know if the data you have is an average that you want to project into source space or individual trials. If you want to do this with the individual trials, you'd just need to do the last piece of code above as a for loop through your trials - you don't have to recompute the weights (W) used for the projection.

Best,

Don

On Mar 31, 2011, at 1:38 AM, jan-mathijs schoffelen wrote:

Hi Mehmet,

I forward this to the mailing list, so that people can participate in the thread.

I do not fully understand where the orientation information in the vol comes from. The description of the volume conductor is namely a geometrical object, containing either a (set of) triangulated surface(s), to describe compartment boundaries, or the description of a (set of) sphere(s), with an origin and a radius.
The outcome of the dipolefitting algorithm gives you a field, called dip.mom, describing the dipole moment as a function of time. At each time point, the three numbers reflect the instantaneous orientation of the dipole. Since you are working with MEG, I assume that the orientation of this dipole is actually defined on a plane, because we routinely suppress the component with the most radial orientation from the leadfield. One way of reducing the dimension is to check whether there is a single dominant orientation over time. This can be achieved by doing a pca (or svd) of dip.mom. The ratio of the first two singular values specifies how well the dipole can be approximated as one having a fixed orientation. The left singular vectors give you the projection vectors, and thus specify the orientation. In other words [u,s,v] = svd(dip.mom). if s(1,1) >> s(2,2), one could justify to use u(:,1) as the 'orientation' of the corresponding dipole.

Best,

Jan-Mathijs





Begin forwarded message:

From: Mehmet-Akif Coskun <mcoskun at mail.uh.edu<mailto:mcoskun at mail.uh.edu>>
Date: March 31, 2011 8:57:30 AM GMT+02:00
To: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>
Subject: Dipole time course


Hi Jan,

Thanks for all your help. I am really close to get the dipole time courses. Everything looks fine in terms of reading data, preprocessing, creating headmodel and fitting a dipole. The last part is to obtain a dipole time course.


I actually read through the previous emails in discussion list and followed the advices. I used the code below to obtain the leadfield and then project the pinv'ed leadfield onto ERF to get the dipole course. But the leadfield is 3D so i get 3 time courses.

% prepare leadfield cfg=[]; cfg.grad= hdr.grad; cfg.vol=vol; cfg.channel='MEG'; cfg.grid.pos=dipM50.dip.pos;

[grid_ft_segment2]=ft_prepare_leadfield(cfg);


In the email below, you suggested to an other user to multiply the 3D leadfields with the orientation estimated by the dipole fit. I checked the outcome of the dipole but there wasn't any orientation information. However, i checked the vol structure which has the orientation and multiply 3D leadfields with vol.ori and then project 1d leadfield onto ERF. I got a nice looking time course. I just wonder whether what i did is meaningful.


Thanks

Mehmet


P.S= Below is your previous email

I suspect that the 'orientation' onto which the pca projects the dipoles is not optimal. Perhaps you might want to try the other way, i.e. compute the leadfields in 1D, either by specifying something in cfg.grid.mom (or ori, I keep forgetting) before calling prepare_leadfield, or by postmultiplying the 3D leadfields with the orientation as estimated by the dipole fit.

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl<mailto:J.Schoffelen at donders.ru.nl>
Telephone: 0031-24-3614793

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-----------------------
Don Rojas, Ph.D.
Associate Professor of Psychiatry
U. of Colorado Denver Anschutz Medical Campus
Director, UCD Magnetoencephalography Lab
13001 E. 17th Pl F546
Aurora, CO 80045
303-724-4994

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110331/9b039ddf/attachment-0001.html>


More information about the fieldtrip mailing list