What is a simple way to calculate a spectral connectivity for source estimates from non-epoched raw data?
While running
label_ts = mne.extract_label_time_course(sources, labels, src, mode='mean_flip',
return_generator=True)
fmin = 8.
fmax = 13.
sfreq = 256
con = mne_connectivity.spectral_connectivity_epochs(
label_ts, method='coh', sfreq=sfreq, fmin=fmin,
fmax=fmax, mt_adaptive=True)
I’m getting an error
File "/home/white/APPS/anaconda3/envs/mne/lib/python3.10/site-packages/mne_connectivity/spectral/epochs.py", line 691, in _get_and_verify_data_sizes
this_n_signals, this_n_times = this_data.shape
ValueError: not enough values to unpack (expected 2, got 1)
This error probably means that sources were calculated from non-epoched data (i.e. by mne.minimum_norm.apply_inverse_raw()).
What would be the simplest solution to this problem?
- operating system: Kubuntu 22