Importing EpochsTFR into MNE-Connectivity

Is there a way to import complex-data epoch information (e.g., EpochTFR) directly from MNE to MNE-Connectivity? I’m attempting to utilize another MNE method for time frequency, e.g. multi-taper, stft, or stockwell, then to apply connectivity measures with MNE-Connectivity functions. MNE data classes seem to be an important part of the MNE-Python approach. Could you point me toward any documentation or examples importing data from other software (e.g., MNE EpochTFR) or constructing components from scratch for a data class?

I’ll be happy to include a reproducible example, but I wanted to initiate a question before I attempted to provide the most important but minimal components.

  • MNE version: e.g. 1.0.10
  • operating system: e.g. macOS 11.6.2

If my understanding is correct, you are asking if it is possible to add a TFR method to estimating the spectral connectivity. This is in principal possible if you have a proposal for a method that is not currently covered.

For example: mne-connectivity/epochs.py at da92606b2371835de9197b07bc617c3c544808bb · mne-tools/mne-connectivity · GitHub these LOC show that you just need to define a class that follows the abstract class implementation. See how the different spectral connectivity metrics are implemented.

Then, you would add an option to here: mne-connectivity/epochs.py at da92606b2371835de9197b07bc617c3c544808bb · mne-tools/mne-connectivity · GitHub.

Then when you call spectral_connectivity:

spectral_connectivity_epochs(epochs, method=<new method name>,...)

Once this works and you have maybe a link to a paper supporting this new method, it would be great to receive a PR!

I’m not following the rest of the question though.

1 Like