[FieldTrip] Time series of sources activation by using LCMV Beamformer

Balderston, Nicholas (NIH/NIMH) [F] nicholas.balderston at nih.gov
Mon Feb 29 16:48:29 CET 2016


Hi Antonietta,

I'm pretty new to fieldtrip, but I was able to do something similar by doing the following:

1) conducting the timelocked analysis
2) computing the lcmv for all trials
3) extracting the common filter
4) multiplying the common filter by the sensor timecourses

I haven't really figured out how to plot these timecourses just yet, but it's a work in progress. Here's the code I used, hope it helps.

% 1) conducting the timelocked analysis
disp('################################timelocked')
cfg = [];
cfg.vartrllength = 2;
cfg.covariance = 'yes';
cfg.covariancewindow = 'prestim';
cfg.keeptrials = 'yes';
cfg.channel = 'MEG';
cfg.inputfile = strcat(subject, '.alltrials.clean.mat');
cfg.outputfile = strcat(subject, '.alltrials.clean.timelocked.mat');
timelocked = ft_timelockanalysis(cfg);

% 2) computing the lcmv for all trials
disp('################################create lcmv filter')
cfg = [];
cfg.method = 'lcmv';
cfg.grid = leadfield_ctf;
cfg.vol = vol_ctf;
cfg.grad = grad;
cfg.channel = 'MEG';
cfg.lambda = '5%';
cfg.lcmv.fixedori = 'yes';
cfg.keepfilter = 'yes';
cfg.outputfile = strcat(subject, '.alltrials.clean.beamformer.filter.mat');
beamformer_avg = ft_sourceanalysis(cfg, timelocked);


% 3) extracting the common filter
disp('################################create extract common filter')
commonfilter = cell2mat(beamformer_avg.avg.filter);

beamformer_virt = [];
beamformer_virt.fsample = data.fsample;
beamformer_virt.trial = [];
beamformer_virt.time = time;
beamformer_virt.trialinfo = timelocked.trialinfo;
beamformer_virt.dimord = timelocked.dimord;

% 4) multiplying the common filter by the sensor timecourses
disp('################################create source timecourse')
for i=1:size(timelocked.trial,1)
    disp(strcat('################################computing timecourse for trial: ', int2str(i)));
    beamformer_virt.trial{i} = commonfilter*squeeze(timelocked.trial(i,:,:));
end

-nick
________________________________
From: Pelt, S. van (Stan) [stan.vanpelt at donders.ru.nl]
Sent: Monday, February 29, 2016 8:47 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer

Dear Antonietta,

In addition to the tutorial Vasan is referring to (where you can find the relevant information under the paragraph “Connectivity between MEG virtual channel and EMG”), there is also a dedicated tutorial for your question: http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors

Best,
Stan

--
Stan van Pelt, PhD
Donders Institute for Brain, Cognition and Behaviour
Radboud University
Montessorilaan 3, B.01.34
6525 HR Nijmegen, the Netherlands
tel: +31 24 3616288

From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Sreenivasan R. Nadar, Ph.D.
Sent: maandag 29 februari 2016 13:57
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Time series of sources activation by using LCMV Beamformer

Hello Antonietta,

Please find the following link for extracting source time series:
http://www.fieldtriptoolbox.org/tutorial/connectivity

Vasan

On Mon, Feb 29, 2016 at 4:31 AM, Antonietta Sorriso <antonietta.sorriso at uniparthenope.it<mailto:antonietta.sorriso at uniparthenope.it>> wrote:

Hello,
I am using fieltrip in order to obtain source reconstruction from MEG data.
I succesfully implemented a code that exploit the function ft_sourceanalysis
for performing beamformer. Unfortunately I was not able to obtain the output
I need, i.e. the time series of sources activation. In particular I only was
able to achieve the mean activation value for each source, divided for
frequency bands or not, but I found no way for computing the activation
intensity of each source for each time sample. Is it possible to achieve
such goal via fieldtrip? If yes, which function and which input parameters
should I exploit?

Thanks and best regards
--
Antonietta Sorriso

​Ph.D. Student
​Dipartimento di Ingegneria
​Laboratorio di TLC ed Elaborazione Segnali ed Immagini
​Centro Direzionale di Napoli, Isola C4, Stanze 326-327, lato Sud, piano 3
​80143, Napoli, Italia
e-mail: antonietta.sorriso at uniparthenope.it<mailto:antonietta.sorriso at uniparthenope.it>

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160229/2be2d03d/attachment.html>


More information about the fieldtrip mailing list