MNE-LSL
mne-lsl bridges Lab Streaming Layer (LSL) with MNE-Python. This page explains how to use mne-lsl with Explore devices to stream live ExG data into MNE for inspection and analysis.
Quick start: connect to the Explore ExG stream
In our setup, the Explore device, via explorepy, Explore Desktop, or Explore Mobile App, is already publishing an ExG LSL stream.
You only need to attach and read:
from mne_lsl.stream import StreamLSL
stream = StreamLSL(
bufsize=5, # seconds of data to keep in memory
name="Explore_XXXX_ExG", # LSL stream name
stype="ExG"
).connect()
# Pull 1 second of the newest data
data, ts = stream.get_data(winsize=1.0) # data: (n_channels, n_samples), ts: (n_samples,)
# When done
stream.disconnect()