[FieldTrip] How to run wpli connectivity analysis of beamformed source data?

Billaud, Charly (Research Student) billaudc at aston.ac.uk
Tue Feb 2 16:43:26 CET 2021


Dear community,

I have been trying to run a connectivity analysis on beamformed source data using the script below with WPLI, but this only works when the method defined for the ft_connectivityanalysis is the coherency (cfg.method = 'coh'). According to the fieldtrip website, wpli or wpli_debiased exist as methods, but these work only on frequency data (here, the freq variable). The problem is if I run the connectivity analysis on the freq rather than on the source data, I won't be able to beamform its results using ft_sourceanalysis, since it requires freq data as well. Is it therefore possible to run a connectivity analysis with WPLI while having the data beamformed on a source model?


cfg             = [];
cfg.sourcemodel = sourcemodel;
cfg.headmodel   = headmodel;
lf  = ft_prepare_leadfield(cfg, dataclean);

cfg            = [];
cfg.method     = 'mtmfft';
cfg.output     = 'fourier';
cfg.keeptrials = 'yes';
cfg.tapsmofrq  = 1;
cfg.foi    = [0.5 4];
freq           = ft_freqanalysis(cfg, dataclean);

cfg                   = [];
cfg.frequency         = freq.freq;
cfg.method            = 'pcc';
cfg.grid              = lf;
cfg.headmodel         = headmodel;
cfg.keeptrials        = 'yes';
cfg.pcc.lambda        = '10%';
cfg.pcc.projectnoise  = 'yes';
cfg.pcc.fixedori      = 'yes';
source = ft_sourceanalysis(cfg, freq);
source = ft_sourcedescriptives([], source);

cfg         = [];
cfg.method  ='coh';
cfg.complex = 'absimag';
source_conn = ft_connectivityanalysis(cfg, source);


Best regards,

Charly

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210202/26e9d5fe/attachment.htm>


More information about the fieldtrip mailing list