How to epoch continuous data correctly?

  • MNE-Python version: 0.22.1
  • operating system: Windows 10

I have 5 minutes of continuous (eventless) EEG data, and I want to run connectivity and psd_topo on the data. In order to do this, I have to epoch the data. I’ve got the two functions to work, but I don’t know a good rule of thumb for deciding how many epochs to divide the data into.

any idea of how many epochs to make so that the 5 minutes of data can be analyzed maximally?

Thank you!

  • nv

if you want to investigate very low frequencies you’ll need very long epochs.

but doing connectivity with Epochs in MNE assumes some time-locked stimulation
so I am sure it’s what you want to do.

Alex

1 Like

Alex,

Thank you for your reply. May I ask, how long do you mean by long epochs? I have them set to 50s currently, so that there are about 6 epochs of data. I know that ERP epochs are in the range of a few seconds, but is 50s sufficient for analyzing continuous data for frequency band (delta, alpha, theta, beta, and gamma) activity?

Thank you!

-nv

your lowest band is delta. If you define that as 1-4 Hz (as is typical), and say you want at least 5 cycles to get a decent estimate of energy at 1 Hz, then you would need at least 5-second-long epochs. However, I’d like to point out that there is a plot_psd_topo method for Raw objects, so you don’t actually need to epoch it first in order to get that kind of plot. There’s an example toward the end of this tutorial section.

Dan, thank you for your reply.

plot_psd_topo does seem to work well for showing channel-wise spectral distributions. However, the benefit that I’m looking for in psd_topo is that the plot serves as a much better visual for our purposes (we’re hoping to show participants their overall brain activity, and the colormap is just more easily understood than spectral distribution). Please correct me if I’m wrong but, as far as I know, plot_psd_topo can’t do that kind of plotting with the colormap and all.

I appreciate your feedback on the epoch lengths! I’ll experiment with 5- and 10-second-long epochs, then so we’ll have plenty to use.

Thanks,
-nv

I think maybe there’s confusion about the method names. plot_psd_topo() gives a spectrum for each channel, with plot axes arranged to mimic the sensor layout. plot_psd_topomap() plots colored scalp topographies at different frequencies or frequency ranges. It sounds like you want the second one of these (which indeed does not exist for Raw objects). So you would need to epoch after all.

Apologies, I was using the wrong name! Yes, plot_psd_topomap is the method to which I was referring. Thanks for your help here, Dan.
Have a good one!