[FieldTrip] ft_connectivityanalysis time elapsed
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Mon Jun 13 09:37:27 CEST 2022
Hi Raghavan,
I suggest to use the matlab profiler to try and find out where most time is spent in both function calls. This will give you an indication of the cause of your observation.
Best wishes,
Jan-Mathijs
On 12 Jun 2022, at 20:52, Raghavan Gopalakrishnan via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
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]
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4ZPu7-aGQkjBBtuDHLY6i2NyB_l08l-QXcd4VXGTyCplxpf6yGNw5B_PvmPfy7PYaZZFQH76P1s5e1sN7JscTZ6fNWLQjp_jSSzSww$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220613/9fe9a106/attachment.htm>
More information about the fieldtrip
mailing list