[FieldTrip] LCMV beamformer source reconstruction

Alistair Vardy - 3ME A.N.Vardy at tudelft.nl
Thu Oct 25 22:40:17 CEST 2012

Hi all,

I trying to reconstruct the activity in a source using the LCMV beamformer with EEG data. My code follows several examples that stop at the source localization. Unfortunately, I am unable to reconstruct the source.

The data is a series of 198 button presses, self-paced. The two time locked data sets are pre- and post-event windows. The data is filtered in the beta band (13-30 Hz). There are 128 EEG channels, three of which are excluded due to excessive noise. The data was re-referenced to the common average. The source that provides the normalized difference in power between the two time windows has a field avg with subfields, filter, noise, pow, and mom:

sourceDiff =

        dim: [17 13 14]
       time: [1x819 double]
        pos: [3094x3 double]
     inside: [1x1567 double]
    outside: [1x1527 double]
     method: 'average'
        avg: [1x1 struct]
        cfg: [1x1 struct]


ans =

       pow: [1x3094 double]
       mom: {1x3094 cell}
     noise: [1x3094 double]
    filter: {1x3094 cell}

The moment entries are sized  3 x 819, the filter 3 x 65.

I hope someone can help me with the code required to reconstruct the source at the voxel with the largest power during the entire duration of each trial. The code used to determine the source is below. MRI, head model and leadfield were computed as well but are not included in the code below.

Kind regards,


channel         = {'EEG', '-AFF1', '-AFZ', '-AF1'};

cfg1                 = [];
cfg1.keeptrials      = 'yes';
cfg1.covariance      = 'yes';
cfg1.channel         = channel;
dataPre             = ft_redefinetrial(cfg1, data1FIC);
timelock1           = ft_timelockanalysis(cfg1, dataPre);

cfg2                 = [];
cfg2.keeptrials      = 'yes';
cfg2.covariance      = 'yes';
cfg2.channel         = channel;
dataPost            = ft_redefinetrial(cfg2, data2FIC);
timelock2           = ft_timelockanalysis(cfg2, dataPost);

%% Source analysis
cfg = [];
cfg.grid = grid;
cfg.hdmfile = volname;
cfg.elec = sens;
cfg.vol = vol;
cfg.method = 'lcmv';
cfg.channel = channel;
cfg.lcmv.keeptrials = 'yes';
% cfg.lcmv.projectnoise = 'yes';
cfg.lmvc.lambda     = '5%';
cfg.lcmv.keepfilter = 'yes';
[source1] = ft_sourceanalysis(cfg, timelock1);
[source2] = ft_sourceanalysis(cfg, timelock2);

sourceDiff = source2;
sourceDiff.avg.pow = (source2.avg.pow - source1.avg.pow) ./ source1.avg.pow;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121025/9130934b/attachment-0001.html>

More information about the fieldtrip mailing list