dipole time course
jan-mathijs schoffelen
j.schoffelen at PSY.GLA.AC.UK
Tue Jul 7 14:55:21 CEST 2009
Hi Floris,
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.
Cheers,
JM
On Jul 7, 2009, at 1:34 PM, Floris de Lange wrote:
> Dear Jan-Matthijs and other fieldtrippers,
>
> Thanks for your reply. I tried out your first suggestion.
> Unfortunately, the dipole time courses look considerably worse than
> what I get from picking the planar sensors that have the strongest
> signal. I've attached the results for 2 conditions in the left and
> right auditory cortex, for comparison. On the top left is (one of
> the 3 matrices of) the relevant leadfield, and on the right is the
> planar ERF. On the bottom are the time courses of the pinv'ed
> leadfield * ERF time course, which are then pca'ed. I have pasted
> the code used below. Any idea why the dipole time course looks so
> much worse?
>
> % calculate leadfields for the two dipole locations
> cfg = [];
> cfg.grad = erf{1}.grad;
> cfg.vol = vol;
> cfg.channel = {'MEG'};
> cfg.grid.pos = source.dip.pos;
> [grid] = prepare_leadfield(cfg);
>
> % multiply pseudo-inverse of leadfield with erf, then do a pca
> dip{i}{cond} = pinv(grid.leadfield{i}) * erf{cond}.avg;
> [tmp1 tmp2] = pca(dip{i}{cond});
>
> Any input appreciated,
> Best wishes,
> Floris
>
>
>
> Dear Floris,
>
> Dipolefitting uses the pseudo-inverse of the leadfield as its inverse
> operator. Using prepare_leadfield with the right input should give
> you the leadfields of the two locations of interest, pinv'ing the
> concatenated leadfields would give you the inverse operator (and
> multiplying the sensor level evoked field with the inverse operator
> gives you the dipoles' time courses (each in 3D)). The individual
> timecourses could be reduced to 1D by a pca. Alternatively, you could
> multiply each of the individual leadfields with the average
> reconstructed dipole orientation, so that you end up with a
> (concatenated across the two dipoles) forward model of 275x2,
> pinv'ing this one, and multiplying it with your sensor data directly
> gives you time courses in 1D.
>
> Cheers,
>
> JM
>
> On Jul 6, 2009, at 5:48 PM, Floris de Lange wrote:
>
> > Dear Fieldtrippers,
> >
> > I have a fairly basic Fieldtrip question; I hope you can point me
> > in the right direction.
> > I'm running a dipole model on the early auditory response (60-90 ms
> > after the click). The dipoloe fit works very well. Just for
> > completeness, these are the lines of code I used:
> >
> > cfg = [];
> > cfg.numdipoles = 2;
> > cfg.symmetry = 'y';
> > cfg.model = 'regional';
> > cfg.latency = [-0.44 -0.41];
> > cfg.vol = vol;
> > cfg.inwardshift = 0;
> > source = dipolefitting(cfg,erf{1});
> >
> > % visualize where the dipoles are
> > figure(1); clf; headmodelplot(cfg,erf{1})
> > hold on;
> > plot3([source.dip.pos(1,1)],[
> source.dip.pos(1,2)],[source.dip.pos
> > (1,3)],'ro');
> > plot3([source.dip.pos(2,1)],[source.dip.pos(2,2)],[source.dip.pos
> > (2,3)],'bo');
> >
> > I have fitted the dipole over a 30 msec window. But now, I would
> > like to plot the response of these dipoles for the whole time
> > window sampled.
> > In other words, I would like to use the coordinates obtained from
> > the dipole fitting procedure, and use them as 'virtual sensors' to
> > reduce the dimensionality of my data from 275 channel time courses
> > to 2. I don't want to use the dipole moments, because they're only
> > defined within the 30 ms that I used to calculate my dipole.
> > I suppose I have to project my data through the dipoles, but I'm
> > not sure how. Any help is greatly appreciated!
> >
> > Best wishes,
> > Floris
>
>
> --
> Floris de Lange
> http://www.florisdelange.com
> ----------------------------------
>
> 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/
>
> <flodlan_dipresults_1_1.tif><flodlan_dipresults_1_2.tif><flodlan_dipre
> sults_2_1.tif><flodlan_dipresults_2_2.tif>
----------------------------------
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/20090707/ab1154fa/attachment-0002.html>
More information about the fieldtrip
mailing list