[FieldTrip] LCMV giving conflicting results vs SAM and DICS

Charidimos Tzagarakis haristz at gmail.com
Wed Oct 23 03:02:25 CEST 2013


...sorry, forgot to add to my post that for SAM I use the option
cfg.fixedori     = 'robert';
Best,
Haris

Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych
University of Minnesota Dept of Neuroscience and Brain Sciences Center


On 22 October 2013 19:00, Charidimos Tzagarakis <haristz at gmail.com> wrote:

> Hi There,
> I have a question regarding ft_sourceanalysis: I in fact seem to be
> getting conflicting results depending on the beamformer I use .
>
>  In summary (and of course, provided I have not made an error somewhere!),
> for a given frequency band and a predefined filter LCMV seems to output
> results that look more as if they are based on the covariance matrix
> estimated on the evoked response (ie not the covariance matrix coming from
> averaging one way or the other the covariance matrices resulting from
> individual trials as is the case with the other beamformers). So in its
> "vanilla" form, when I test it against SAM and DICS, LCMV gives different
> results. When I comment out the part of the ft_sourceanalysis code that is
> executed for LCMV when a filter is input with cfg (this seems to be done to
> speed up the process), then the results are comparable for all 3
> beamformers.
>
> More in detail (apologies for the rather lenthy post):
> We are using a motor task and studying beta descynchronisation. The images
> I link to are "gradnaveraged" relative changes in beta power between a
> period during baseline and a period during "task" over 10 subjects. I first
> deform the MNI grid to individual subjects' brains so everything takes
> place in MNI space.For all 3 beamformers the leadfield and headmodels are
> calculated in the same way (except for SAM where the singleshell  model is
> unavailable and I used localspheres instead). All this was done with
> fieldtrip-20130823 but looking at fieldtrip-20131021 I see no changes in
> the code for the beamformers or ft_sourceanalysis.
>
> We used DICS (centered on an appororiately chosen frequency), SAM and LCMV
> with the same data and intervals. For the latter 2 I first bandpass filter
> the data to the beta band during ft_preprocessing. For the DICS analysis I
> use exactly the same procedure as in the relevant tutorial. For SAM and
> LCMV I do the same with the minor change that the common filter is
> calculated over a much larger interval that includes the  "baseline" and
> "task" intervals at its edges, instead of creating a dataset through
> concatenation of the "baseline" and "task" intervals compared.
> So code-wise (and per subject), for DICS this is:
>
> <freq_cmb, freq_Pre and freq_Post calculated exacly as in the tutorial>
> and then:
>
> cfg                   = [];
> cfg.frequency         = freq_cmb.freq;
> cfg.grad        = senscm;
> cfg.method            = 'dics';
> cfg.keeptrials        = 'yes';
> cfg.grid              = sourcemodel_lf;
> cfg.vol         = volfcm;
> cfg.keeptrials        = 'yes';
> cfg.dics.lambda       = '5%';
> cfg.dics.keepfilter   = 'yes';
> cfg.dics.fixedori     = 'yes';
> cfg.dics.realfilter   = 'yes';
>
> source                = ft_sourceanalysis(cfg, freq_cmb);
> with source_Pre and source_Post calculated with the above cfg *plus* using
> the filter estimated at "source".
> cfg.grid.filter  = source.avg.filter;
>
>  and for SAM and LCMV:
> cfg=[];
>
> cfg.bpfilter='yes';
> cfg.bpfreq  =[freq-fsmth freq+fsmth];
> cfg.channel=params.chan;
> datf=ft_preprocessing(cfg,dat);
> <note, tb and ta are 2 element vectors [tmin tmax]>
>
> cfg = [];
> cfg.toilim = tb;
> dataPre = ft_redefinetrial(cfg, datf);
> cfg = [];
> cfg.toilim = ta;
> dataPost = ft_redefinetrial(cfg, datf);
> cfg=[];
> cfg.toilim = [tb(1,1) ta(1,2)];
> data_cmb=ft_redefinetrial(cfg,datf); % so here I could have also done
> data_cmb=ft_appenddata(cfg,dataPre,dataPost) and set cfg.vartrllength
> = 2; further down but this would change the solution very little
>
> clear('dat');
>
>
> cfg                   = [];
> cfg.covariance        = 'yes';
> cfg.channel           = params.chan;
> cfg.covariancewindow  = 'all';
> cfg.removemean='no';
> cfg.keeptrials        ='yes';
> %keyboard
> d_cmb              = ft_timelockanalysis(cfg, data_cmb);
> d_Pre              = ft_timelockanalysis(cfg, dataPre);
> d_Post             = ft_timelockanalysis(cfg, dataPost);
>
>
> cfg                   = [];
> cfg.grad        = senscm;
> cfg.method            = 'lcmv';% (or 'sam')
> cfg.keeptrials        = 'yes';
> cfg.grid              = sourcemodel_lf;
> cfg.vol         = volfcm;
> cfg.lambda        ='5%';%relevant code added to beamformer_sam to handle
> this
> cfg.keepfilter   = 'yes';
> cfg.fixedori     = 'yes';
> cfg.projectnoise='yes';
> source                = ft_sourceanalysis(cfg, d_cmb);
>
> with source_Pre and source_Post calculated with the above cfg *plus* using
> the filter estimated at "source".
> cfg.grid.filter  = source.avg.filter;
>
>
> The results for SAM (https://db.tt/fhvEAJN0) and DICS (
> https://db.tt/nOxIDA5Y) are in fact in good agreement (and make sense
> physiologically).
> LCMV was initially quite different (https://db.tt/LXCBivfc) and in fact
> similar to what you'd get if using the covariance matrix of the ERP
> average, ie:
> data_cmb              = ft_timelockanalysis([], data_cmb);
> dataPre              = ft_timelockanalysis([], dataPre);
> dataPost             = ft_timelockanalysis([], dataPost);
> and then (as above)
> cfg                   = [];
> cfg.covariance        = 'yes';
> cfg.channel           = params.chan;
> cfg.covariancewindow  = 'all';
> cfg.removemean='no';
> cfg.keeptrials        ='yes';
> %keyboard
> d_cmb              = ft_timelockanalysis(cfg, data_cmb);
> d_Pre              = ft_timelockanalysis(cfg, dataPre);
> d_Post             = ft_timelockanalysis(cfg, dataPost);
>
> I in fact tried this with SAM (https://db.tt/Djy54qgs) and the result is
> similar to LCMV above.
>
> This is however not what we wanted. Going through the code in
> ft_sourceanalysis I see there is a part (only for LCMV and when a filter is
> provided) where the data and covariance matrix are treated differently. I
> can't say I fully understand the algorithm there but when I commented out
> that part my LCMV results are in very good agreement with DICS and SAM (
> https://db.tt/aNz11ntb).
>
> I would as always be grateful for your feedback and opinions. Am I
> committing an error somewhere? - should the code behave differently there?
> With Thanks and Best Wishes,
> Haris
>
> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych
> University of Minnesota Dept of Neuroscience and Brain Sciences Center
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131022/c82e281c/attachment-0002.html>


More information about the fieldtrip mailing list