Envelope correlation between different frequency bands

Hi,

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 ...

That should work for you needs … I think.

–Jeff

2 Likes

The function can take in an array with a 3D shape similar to the Epochs data structure in MNE (mne_connectivity.envelope_correlation — MNE-Connectivity 0.6.0dev0 documentation).

I think upon quick glance, the soln. @jstout211 posted looks like it would work.

@larsoner might know more.

2 Likes

Thanks a lot! the solution works fine! :slight_smile:

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]
2 Likes