MNE version: 1.0.3
Operating system: CentOS Linux 7 (Core)
Hi, I’m trying to use mne_connectivity.spectral_connectivity_time
, below is my code:
FREQS = [50, 100, 150, 200, 250]
INDICES = ([0, 0, 0, 0, 0], [1, 2, 3, 4, 5])
con = spectral_connectivity_time(
cond_epochs_slice,
freqs = FREQS,
indices = INDICES,
method = 'coh',
sfreq = FS,
n_jobs = 1)
I keep getting the following error:
elif indices == 'symmetric':
expected_len = ((n_nodes + 1) * n_nodes) // 2
if data_len != expected_len:
raise ValueError(f'If "indices" is "symmetric", then '
f'connectivity data should be the '
f'upper-triangular part of the matrix. There '
f'are {data_len} estimated connections. '
f'But there should be {expected_len} '
f'estimated connections.')
For some reason it looks like the argument indices
is turned into 'symmetric'
, even if I specify it as a length 2 tuple of arrays, as described in the documentation. I’ve tried simply commenting out the code above that throws the error, but the resulting Connectivity object that is returned in con
says its indices are still 'symmetric'
. I.e. if I run con.indices
the output says 'symmetric'
.
Below is the description of the Connectivity object that is returned. The documentation says that it should have shape (n_epochs, n_nodes, n_nodes, n_freqs)
.
<EpochSpectroTemporalConnectivity | n_epochs : 10, freq : [50.000000, 250.000000], time : [0.000000, 0.250000], , nave : None, nodes, n_estimated : 67, 2, ~983 kB>
On a related note, I’m passing in 5 frequencies into the argument freqs = FREQS
, but the description lists only 2 frequencies freq : [50.000000, 250.000000]
. If anyone has pointers on that that would also be much appreciated.