# dipole time course

jan-mathijs schoffelen j.schoffelen at PSY.GLA.AC.UK
Mon Jul 6 21:39:53 CEST 2009

```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
> 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/
>

----------------------------------
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/20090706/f831ce48/attachment-0002.html>
```