I have epoched dataset with 61 channels. I calculated spectral connectivity using following code:
fmin, fmax = 4., 9.
tmin = 0.0 # exclude the baseline period
con = spectral_connectivity_epochs(
epochs, method='coh', mode='multitaper', sfreq=sfreq, fmin=fmin, fmax=fmax,
faverage=True, tmin=tmin, mt_adaptive=False, n_jobs=1, verbose=False).get_data('dense')
and average it using the following code:
mean_con = np.mean(con)
Now I have to plot the topomap of mean_con which is a 61x61 matrix (lower triangular). I need a topomap like below:
I am using mne.viz.plot_topomap(mean_con, pos=raw.info…) but getting error that mean_con is not of same dimension as n_channels. Please help.
- MNE version: e.g. 0.24.0
- operating system: Windows 11