[FieldTrip] re sLORETA
RICHARDS, JOHN
RICHARDS at mailbox.sc.edu
Tue Oct 6 14:28:33 CEST 2015
I received an excellent suggestion and some additional information from Vladimir Litvak. The NUTMEG programs have sLORETA, swLORETA, and dSPM MATLAB routines that are compatible with the FT format. They also have routines that duplicate those in FT (e.g., min norm, LCMV, beamformers)
I did the following and it appears to work. Any comments welcome.
I have fairly simple source inverse problems, eg. simple grand average ERP (and not beamformer, or dynamic EEG). The FT leadfield is a struct that has lf{nsources} elements, each element is a [nchannels p] vector, where nchannels is the number of channels, p is the number of dipole orientations, and nsources is the number of source vertices or grid points. The NM (NUTMEG) leadfield (Lp) is a matrix, [nchannels p nsources] in size.
The following is not my complete code… the LF{nsources} references are conceptual, the programming is somewhat different.
1. Convert the FT LF to the NM Lp. There is a NUTMEG nut_ftgridenutsLpvox which is intended to convert the LF to the Lp. It did not work perfectly, I had to adapt it somewhat to make the Lp matrix correctly from the Lf matrix.
2. Do the call to one of the subrouties
Eg
cfg=[];
cfg.gamma=.05
nmfilter = nut_sLORETA(Lp,data.cov,cfg)
3--the output is a [nchannel 3 sources] matrix. I used this, and the data.avg, to create the FT source output (e.g., each source.avg.mom{nsources} = inverse[nchannels p]' * data.avg;
I added the source.avg.pow, and
outsource.time=[1:size(outsource.avg.pow,2)];
outsource.inside=grid.inside;
outsource.avg.inside=grid.inside;
outsource.pos=grid.pos;
outsource.avg.pos=grid.pos;
outsource.method='average';
%dim is no of unique values in pos
outsource.dim=[size(unique(grid.pos(:,1)),1) size(unique(grid.pos(:,2)),1) size(unique(grid.pos(:,3)),1)];
4—at this point I have a complete “source” struct similar to that created by ft_sourceanalysis, but the mom and pow are generated by the NUT procedure.
I suggest someone doing a help or tutorial file for this. I also invite any suggestions from others.
John
***********************************************
John E. Richards Carolina Distinguished Professor
Department of Psychology
University of South Carolina
Columbia, SC 29208
Dept Phone: 803 777 2079
Fax: 803 777 9558
Email: richards-john at sc.edu<mailto:richards-john at sc.edu>
HTTP: jerlab.psych.sc.edu
***********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151006/17fe469d/attachment-0001.html>
More information about the fieldtrip
mailing list