I would like to compute the envelope correlation between beta power at one electrode (C3 in biosemi) - this would be my seed - and alpha power at the visual electrodes - multiple electrodes. From what I understand, the function envelope_correlation of MNE connectivity computes this in the same frequency band after orthoganalizing the data. How could I apply this function to achieve my goal?
Many thanks for any suggestions you might have!
I am probably the wrong person to answer this question - @adam2392 is probably more apt for this
But I think this would require a hack to do. So you can probably do the following:
raw_beta = raw.copy().filter(13,35)
raw_alpha = raw.copy().filter(8,12)
c3_idx = raw_alpha.ch_names.index('C3') #C3 may have a different name - confirm
raw_alpha._data[c3_idx,:] = raw_beta._data[c3_idx,:] #Force the beta C3 into data object
.... do the rest of the env corr channel connectivity example script ...
I would epoch first into say 10 sec chunks then concatenate using only public methods like get_data (safer than modifying private attributes). Something like this should do it:
ep_beta = mne.make_fixed_length_epochs(raw.copy().filter(13, 35).pick(["C3"]), duration=10, preload=True)
ep_alpha = mne.make_fixed_length_epochs(raw.copy().filter(8, 12).pick(["O2"]), duration=10, preload=True)
data = np.concatenate((ep_beta.get_data(), ep_alpha.get_data()), axis=1)
corrs = envelope_correlation(data, ...) # will have shape (2, 2), so you probably want [0, 1]