handling unequal epoch lengths & doing connectivity analyses within trials over time

Dear MNE community,

I am currently using MNE Python to preprocess EEG data and calculate speech-to-brain connectivity. I have two problems that I have run into.
The first one concerns the fact that MNE epochs are required to be of equal length for further analyses. Since my stimuli are natural speech they are not all the same length. When I was epoching I circumvented this problem by using a for-loop and writing individual epochs into a list. But this still poses a problem now that I want to do brain-to-speech connectivity analyses.
The second issue is that connectivity can only be calculated across trials (rather than also over time within a single trial, which is what I am interested in). Mike Cohen explains the difference here.

So, my questions would be two-fold: I have seen both issues raised on Github once or twice and so I was wondering whether this is something that is still on the table to implement in the future? And I would also be interested in knowing whether anyone has dealt with either issue and, if so, how (whether e.g. customizing code worked).

I look forward to hearing your ideas and suggestions.

Best,
Chantal Oderbolz

hi Chantal,

for what you aim to do yes connectivity over time and not over epochs is
what makes the most sense. I would see with MNE-Connectivity — MNE-Connectivity 0.2 documentation
what is the plan of @adam2392 about this.

for for speech to brain stats I would look at:

https://mne.tools/dev/generated/mne.decoding.ReceptiveField.html

hope this helps
Alex

Hi,

Yes there are plans that have been talked about for implementing the time varying connectivity. These are all on GitHub. However, we need devs from the community willing to help out right now. I’ve been pretty backed up recently.

With the additions of time varying connectivity, we might also be able to do a cohesive software publication of MNE-connectivity; some extra incentive for community devs to get involved.

1 Like

Hi Alex and Adam!

Thank you both for your input, I appreciate it!
I am currently working on my own implementation of connectivity across time, but it is not up to par with what constitutes an efficient solution that the MNE community could benefit from. I would of course be willing to contribute to a further discussion on these matters.

Greetings,
Chantal

Hi @coderb

Feel free to take a look at the documentation and source-code for mne-connectivity and open a GH issue if you feel there is something you would like to contribute!