how to perform online analysis with MNE python?

Given that, I have written my code for (say) detecting eye blinks with EEG signal. How to perform real-time detection for the same with signals over LSL? Is it possible to perform online analysis on continuous data with MNE realtime since it takes signals epoch by epoch?

Bottom line
Is there a way to treat those data from the buffer as an accumulated signal and perform analysis in the same way as any other offline data raw = mne.io.read_raw(raw_data)?

Thank you so much in advance

@richard Could anyone please guide me on how to do realtime analysis with MNE python? I’m using OpenBCI Cyton Daisy Board.

Eagerly waiting for the responses.
Thank you in advance.

Hello,

In a real-time application, you will acquire data window by window (also called single epoch by single epoch).
It’s up to you to define:

  • which window size to use: 1 second? 2 seconds? 5 seconds?
  • which processing step you want to apply to each window, e.g. filter.
  • which metric you want to extract from each window.

The bottom line is that an algorithm design for offline processing might or might not be suited for online designs. For instance, many R-peak detectors (on an ECG) channels work well on long buffers with many R-peaks and don’t work well on very short buffers where you want to detect the R-peak as soon as it is measured.

As what you are trying to achieve is unclear, it’s difficult to give you more information.

Mathieu

2 Likes

Thanks for the clarification