[FieldTrip] single trials eLoreta

David Pascucci psc.dav at gmail.com
Wed Aug 23 22:57:46 CEST 2017

Dear fieldtrip experts,
I am doing single-trial connectivity in the source space with EEG, and I
moved recently to fieldtrip.
I am trying to use the eLoreta method to get single-trial estimates in the
following way:

cfg = [];
cfg.method                          = 'eloreta';
cfg.grid                                  = leadfield;
cfg.headmodel                       = headmodel;
cfg.eloreta.keepfilter              = 'yes';
cfg.eloreta.normalize               = 'yes';
cfg.eloreta.lambda                  = 0.05;
cfg.eloreta.projectnoise            = 'yes';
eLO_source                          = ft_sourceanalysis(cfg,data);

% in the above line, "data" is the results of ft_timelockanalysis
% with cfg.covariance = 'yes';

% then I put the source positions from the MNI template I
% used for the sourcemodel (see:
% http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject-
% specific_grids_that_are_equivalent_across_subjects_in_normalized_space
eLO_source.pos                      = template_grid.pos;
iPOS                                = eLO_source.pos;
iPOS(eLO_source.inside==0,:)        = NaN; % only points inside gray matter

% Then I select ROIs (here only one for simplicity) to extract single-trial
source activity:
[v,I]      = min(pdist2(iPOS, ROIs_mni , 'euclidean'));

% And I multiply the spatial filter for the EEG data in each trial
W            = eLO_source.avg.filter{I}; % filter at my ROI of interest
for tr = 1:size(data.trial,1)
       % loop over trials
     trials{tr} = W * squeeze(data.trial(tr,:,:));

My 3 questions (marked at the right of the above code) are the following:

(0, not marked above): Is this approach correct?

(1) Is there a way to select the best lambda parameter (e.g., selecting the
one that best approximates the
activity at the EEG channels level)?

(2) I am confused about the role of the covariance, since it doesn't seem
to be used when source activity
is estimated using the set of spatial filters at the single trial (my lack
of knowledge)

(3) Is the "trials{tr} = W * squeeze(data.trial(tr,:,:)); " approach
correct to get time-series of source activity in a ROI?

I hope this was clear enough, looking forward for your feedback.


David Pascucci

Postdoctoral Fellow
University of Fribourg
Department of Psychology
Rue de Faucigny 2
1700 Fribourg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170823/fb976c21/attachment-0001.html>

More information about the fieldtrip mailing list