[FieldTrip] Applying mask into ft_connectivityplot.

卢 卓恩 luzhuoen123 at outlook.com
Wed Jul 1 19:13:25 CEST 2020


Hello all,

This is my first email to Fieldtrip Community. My name is Johnny Lu and I am a postgraduate student at the University of Edinburgh. I major in Signal Processing and Communications. Currently I am conducting a project about analysing the dynamic functional connectivity based on the EEG signals recorded from rats with epilepsy. The data is recorded by Open Ephys.

I have a problem when I consider applying the logical mask into plotting the connectivity figure in order to quantify the effect of the connectivity in a systematic way.

This is the cfg when I applied the connectivity analysis.

cfg = [];
cfg.method = 'coh';
cfg.complex = 'imag';
stat_filt = ft_connectivityanalysis(cfg, freq_filt);

And the structure of ‘stat_filt’ is shown below,

stat_filt =

  struct with fields:

     labelcmb: {496×2 cell}
       dimord: 'chancmb_freq_time'
    cohspctrm: [496×29×20000 double]
         time: [1×20000 double]
         freq: [2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30]
          cfg: [1×1 struct]

Also, I used ‘ft_connectivityplot’ to visualise the result. Here is the cfg,

cfg           = [];
cfg.parameter = 'cohspctrm';
ft_connectivityplot(cfg, stat_filt);

Some effects can be detected in the figure. In order to quantify the effects in a systematic way, I consider implementing the statistical testing to the connectivity. I followed the example on the tutorial (http://www.fieldtriptoolbox.org/workshop/oslo2019/statistics/#plotting-the-test-results) and tried to apply the testing in the similar way. I used ‘ft_freqstatistics’ and here is the cfg,

design = [1 2];
cfg = [];
cfg.channel          = 'all';
cfg.frequency        = 'all';
cfg.parameter        = 'cohspctrm';
cfg.method           = 'montecarlo';
cfg.statistic        = 'indepsamplesT';
cfg.correctm         = 'no';
cfg.correcttail = 'prob';
cfg.numrandomization = 'all';
cfg.ivar = 1;
cfg.design   = design;
cfg.alpha            = 0.025;

stat_t_freq = ft_freqstatistics(cfg, stat_filt);

And the structure of ‘stat_t_freq’ is,

stat_t_freq =

  struct with fields:

       prob: [496×29×20000 double]
    cirange: [496×29×20000 double]
       mask: [496×29×20000 logical]
       stat: [496×29×20000 double]
        ref: [496×29×20000 double]
     dimord: 'chancmb_freq_time'
       freq: [2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30]
       time: [1×20000 double]
        cfg: [1×1 struct]

Now the problem is that I have no idea about visualise the result of the statistical testing. According to the mentioned tutorial, the result of the statistical testing can be visualised by applying the logical matrix ‘mask’ into plotting the parameter which is used in the testing (for example, power spectrum). Unfortunately, the function ‘ft_connectivityplot’ does not support applying mask. If I use ‘ft_multiplotTFR’, the data is not supported by the function. Another option is using ‘ft_singleplotER’ because it supports the data from connectivity analysis and the mask as well, but the visualisation is bad compared to the figure with the colour level generated from ‘ft_connectivityplot’.

Therefore, I would like to seek for the guidance here about how to achieve the visualisation of the result from statistical testing with the connectivity parameter using 'ft_connectivityplot' or any other function.

Thank you in advance!

Best Regards,
Johnny




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200701/9de0f2a5/attachment.htm>


More information about the fieldtrip mailing list