[FieldTrip] Fwd: ft_connectivityanalysis time elapsed

Raghavan Gopalakrishnan gopalar.ccf at gmail.com
Sun Jun 12 20:52:46 CEST 2022


 Hi all,
I have a question regarding the ft_connectivityanalysis.
Computing coherence for 33 channels takes only 2.89 seconds(example-1), where computing coherence between 2 channels takes 20 seconds (example-2).
Any idea why this might be the case? Shouldn’t Computing coherence between 2 channels take way less time than all channels?


Example-1:

freq1 =

  struct with fields:

            label: {35×1 cell}
           dimord: 'rpttap_chan_freq_time'
             freq: [1.9989 2.9983 … ]
             time: [-0.5000 -0.4900 … ]
    fourierspctrm: [48×35×44×201 double]
        cumtapcnt: [48×44 double]
        trialinfo: [48×9 double]
              cfg: [1×1 struct]

cfg =

  struct with fields:

        method: 'coh'
    channelcmb: {'eeg'  'DBS234-567'}


tic;
ccc_coh = ft_connectivityanalysis(cfg, freq1);
toc;

Elapsed time is 2.890037 seconds.

ccc_coh =

  struct with fields:

       dimord: 'chan_chan_freq_time'
    cohspctrm: [33×33×44×201 double]
         time: [-0.5000 -0.4900 … ]
         freq: [1.9989 2.9983 3.9978 … ]
          cfg: [1×1 struct]
        label: {33×1 cell}

Example-2

freq1 =

  struct with fields:

            label: {2×1 cell}
           dimord: 'rpttap_chan_freq_time'
             freq: [1.9989 2.9983 … ]
             time: [-0.5000 -0.4900 … ]
    fourierspctrm: [48×2×44×201 double]
        cumtapcnt: [48×44 double]
        trialinfo: [48×9 double]
              cfg: [1×1 struct]

cfg =

  struct with fields:

        method: 'coh'
    channelcmb: {'C4'  'DBS234-567'}

tic;
ccc_coh = ft_connectivityanalysis(cfg, freq1);
toc;

Elapsed time is 20.119044 seconds.
ccc_coh =

  struct with fields:

        label: {2×1 cell}
       dimord: 'chan_chan_freq_time'
    cohspctrm: [2×2×44×201 double]
         time: [-0.5000 -0.4900 … ]
         freq: [1.9989 2.9983 3.9978 … ]
          dof: [48 48 48 48 48 48 48 … ]
          cfg: [1×1 struct]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220612/2218bb23/attachment.htm>


More information about the fieldtrip mailing list