<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Dear Floris,<div><br></div><div>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.</div><div><br></div><div>Cheers,</div><div><br></div><div>JM  </div><div><br><div><div>On Jul 6, 2009, at 5:48 PM, Floris de Lange wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear Fieldtrippers,<br><br>I have a fairly basic Fieldtrip question; I hope you can point me in the right direction.<br>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:<br> <br>cfg = [];<br>cfg.numdipoles = 2;<br>cfg.symmetry = 'y';<br>cfg.model = 'regional';<br>cfg.latency = [-0.44 -0.41];<br>cfg.vol = vol;<br>cfg.inwardshift  = 0;<br>source = dipolefitting(cfg,erf{1});<br><br> % visualize where the dipoles are<br>figure(1); clf; headmodelplot(cfg,erf{1})<br>hold on; <br>plot3([source.dip.pos(1,1)],[source.dip.pos(1,2)],[source.dip.pos(1,3)],'ro');<br>plot3([source.dip.pos(2,1)],[source.dip.pos(2,2)],[source.dip.pos(2,3)],'bo');<br> <br clear="all">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. <br>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.<br> I suppose I have to project my data through the dipoles, but I'm not sure how. Any help is greatly appreciated!<br><br>Best wishes,<br>Floris<br><br>--<br>Floris de Lange<br><a href="http://www.florisdelange.com">http://www.florisdelange.com</a><br><p>----------------------------------</p><p>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.</p><p>  <a href="http://listserv.surfnet.nl/archives/fieldtrip.html">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p><p>  <a href="http://www.ru.nl/fcdonders/fieldtrip/">http://www.ru.nl/fcdonders/fieldtrip/</a></p> </blockquote></div><br></div></body></html><p>----------------------------------</p>
<p>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.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>