[FieldTrip] Reference to non-existent field 'mom' in ft_connectivityanalysis
Elene Beitia Loinaz
elene.beitia at alumni.mondragon.edu
Thu May 16 11:26:10 CEST 2019
Dear community,
We also have problemns using *ft_connectivityanalysis. *
In our code, the sourceanalysis have been performed using eloreta method.
cfg = [];
cfg.method = 'eloreta';
cfg.grid = leadfield;
cfg.projectnoise = 'yes';
cfg.keepfilter = 'yes';
cfg.headmodel = vol;
cfg.channel = 'all';
cfg.senstype = 'eeg';
cfg.datatype = 'freq';
cfg.grid.xgrid = [-90 : 5 : 90];
cfg.grid.ygrid = [-115: 5 : 85];
cfg.grid.zgrid = [-70 : 5 : 100];
source =
ft_sourceanalysis(cfg, data_Fourier);
When implementing the connectivity analysis function we obtain errors due
to the fact that 'mom' is too big, since we are considering all electrodes
location instead of ROI`s.
We have seen that connectivity also can be done using frequency data
instead source, like this we do not have erros but we do not understand the
theorical differences.
cfg = [];
cfg.output = 'fourier';
cfg.channel = 'all';
cfg.method = 'mtmfft';
cfg.taper = 'hanning';
cfg.foilim = [8 12];
cfg.feedback = 'no';
data_Fourier = ft_freqanalysis(cfg,
data);
cfg = [];
cfg.method ='coh';
cfg.complex = 'absimag';
source_conn = ft_connectivityanalysis(cfg,
data_Fourier);
Could someone help us with this issue?
Thank to all.
Hau idatzi du Davide Sometti (davide.sometti-1 at studenti.unitn.it)
erabiltzaileak (2019 mai. 15, az. (12:28)):
> Thanks a lot for the answers.
>
> Best,
> Davide S.
>
>
> Il giorno mer 15 mag 2019 alle ore 11:56 Schoffelen, J.M. (Jan Mathijs) <
> jan.schoffelen at donders.ru.nl> ha scritto:
>
>> Hi all,
>>
>> Allow me to correct Eelke’s statement a bit: *in the context of what
>> Davide wants to do* ft_connectivityanalysis requires single trial input.
>> This is not true in general.
>>
>> Best wishes,
>> Jan-Mathijs
>>
>>
>> On 15 May 2019, at 10:49, Eelke Spaak <e.spaak at donders.ru.nl> wrote:
>>
>> Dear Davide,
>>
>> ft_connectivityanalysis requires individual trials, and the
>> combination of 'fourier' - 'pcc' is the only combination there that
>> results in individual trial estimates. Internally, I think the 'pcc'
>> beamformer basically computes the exact same filters as DICS, it just
>> has a somewhat different (i.e. more flexible) approach to data
>> bookkeeping, allowing straightforward filtering of individual trials.
>>
>> Best,
>> Eelke
>>
>> On Tue, 14 May 2019 at 15:27, Davide Sometti
>> <davide.sometti-1 at studenti.unitn.it> wrote:
>>
>>
>> Dear community,
>>
>> I’m trying to perform connectivity analysis (Matlab 2018b, FieldTrip
>> 2018-12-11), in order to obtain the absolute part of the imaginary
>> coherence. Here are the steps that I’ve used in order to perform it.
>>
>> 1- First I performed the frequency analysis, on the single condition
>> (not showed), and on all the conditions together
>>
>> cfg = [];
>>
>> cfg.channel = chn;
>>
>> cfg.method = 'mtmfft';
>>
>> cfg.output = 'powandcsd';
>>
>> cfg.taper = 'dpss';
>>
>> cfg.keeptrials ='no';
>>
>> cfg.keeptapers ='no';
>>
>> cfg.tapsmofrq = 3;
>>
>> cfg.foi = [6; 11; 16; 21; 26; 40];
>>
>> data_freq_all = ft_freqanalysis(cfg, data_reject_all);
>>
>>
>>
>> 2- I computed the beamformer filters based on the entire data
>>
>> cfg=[];
>>
>> cfg.method='dics';
>>
>> cfg.frequency=6;
>>
>> cfg.grid=lf;
>>
>> cfg.grid.pos=pos;
>>
>> cfg.grid.tri=tri;
>>
>> cfg.headmodel=hdm;
>>
>> cfg.senstype = 'meg';
>>
>> cfg.dics.projectnoise = 'yes';
>>
>> cfg.dics.lambda = '5%';
>>
>> cfg.dics.keepfilter = 'yes';
>>
>> cfg.dics.realfilter = 'yes';
>>
>> cfg.dics.keepcsd = 'yes';
>>
>> cfg.dics.keepmom = 'yes';
>>
>> cfg.dics.fixedori = 'yes';
>>
>> sourceAll = ft_sourceanalysis(cfg,data_all);
>>
>>
>>
>> 3- I've then performed the source analysis on each of the four
>> conditions, using the precomputed filter
>>
>> cfg.grid.filter=sourceAll.avg.filter;
>>
>>
>>
>> source_pre_incl=ft_sourceanalysis(cfg,data_pre_incl);
>>
>> source_pre_excl=ft_sourceanalysis(cfg,data_pre_excl);
>>
>> source_post_incl=ft_sourceanalysis(cfg,data_post_incl);
>>
>> source_post_excl=ft_sourceanalysis(cfg,data_post_excl);
>>
>>
>>
>> 4- Finally I’ve performed the connectivity analysis
>>
>>
>>
>>
>>
>> cfg=[];
>>
>> cfg.method ='coh';
>>
>> cfg.complex = 'absimag';
>>
>> source_conn = ft_connectivityanalysis(cfg, source_pre_incl);
>>
>>
>>
>> When I try to run the connectivity analysis I get this error, and I
>> cannot go further in the analysis.
>>
>>
>>
>> Reference to non-existent field 'mom'.
>>
>>
>>
>> Error in univariate2bivariate (line 225)
>>
>> sizmom = size(data.mom{data.inside(1)});
>>
>>
>>
>> Error in ft_connectivityanalysis (line 449)
>>
>> [data, powindx, hasrpt] = univariate2bivariate(data, 'mom',
>> 'crsspctrm', dtype, 'cmb', cfg.refindx, 'keeprpt', 0);
>>
>>
>>
>>
>>
>> I’ve tried different solution, changing output for the frequency analysis
>> and method for the beamforming, like follow:
>>
>>
>>
>> 'fourier' - 'pcc'
>>
>> 'powandcsd' - 'pcc'
>>
>> 'fourier' - 'dics'
>>
>> The combination fourier and pcc was the only one that worked, among the
>> 4, the others always gave me the same error, as above. I’m wondering why
>> even if I’ve specified cfg.keepmom=’yes’, this one is not present in the
>> structure after the source analysis.
>>
>> Anyone that could help me?
>>
>> Davide S.
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190516/2ef6646b/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list