TIP
Bridge the gap between brainwaves and eye movements; combine independent data streams into a single file, and conquer clock drift for flawless multimodal experiments.
A big challenge associated with multimodal recording is synchronization. When capturing brain activity alongside eye movements, you are juggling data produced by different devices, on different operating systems, using different internal clocks.
For instance, Neon timestamps are generated from its own internal clock, while Mentalab Explore Pro timestamps EEG data on its host PC. Because these clocks operate independently, they might not be in sync to start with, and can drift apart over time. To analyze these signals together, you need a reliable way to align them. This is where Lab Streaming Layer (LSL) comes in.
This tutorial uses Neon and Mentalab Explore Pro EEG as a concrete example to explain how multimodal synchronization with LSL works in practice and how you can achieve millisecond-precision alignment in your own research.
You will need:
All devices must be on the same local network (typically the same Wi-Fi). This is essential because LSL relies on the network to exchange timing information and estimate clock offsets.
TIP
For sub-ms synchronization accuracy between LSL and Mentalab Explore Pro, use the Mentalab Explore Pro in combination with Mentalab Hypersync.
In the Neon Companion App, enable Stream over LSL. The phone begins broadcasting eye tracking data and event streams. Each sample is marked with Neon's local time.

In Explore Desktop, connect via Bluetooth and enable LSL output in settings. These samples use the PC’s clock.

Launch Lab Recorder on the PC and refresh the stream list. Select:
Explore_<Device ID>_ExG[Device Name]_Neon Gaze[Device Name]_Neon Events
When you hit Start, Lab Recorder captures the streams and the synchronization metadata simultaneously.
TIP
For the EEG streams, we only need to select the Explore_<device_id>_ExG. Markers and motion data (_Marker & _ORN) are out of the scope of the present tutorial.
A typical LSL setup comprises a recording computer running ‘LSL Lab Recorder’, and one or more experiment devices (e.g. Neon and Mentalab EEG) streaming data over the LSL network to the recording computer. In this context, LSL doesn’t sync Neon and Mentalab EEG clocks directly to each other. Instead, each device keeps its own time, and the host computer acts as a reference. LSL calculates the time differences (clock offset) between the devices and the reference, and then both data streams can be adjusted onto the same unified timeline:
.xdf file.pyxdf apply the stored offsets to map all data onto a single, unified timeline.With the technical link established and the streams converging in Lab Recorder, you can stop worrying about network lag or clock drift and focus on the experimental design. To demonstrate this, let’s apply this setup to a classic Sensory Attenuation paradigm. Head to this GitHub repository for the PsychoPy script and sample data.
This task compares how the brain processes self-generated stimuli versus external ones.
Use the provided PsychoPy script to manage stimulus delivery and markers.
Update IP: Ensure the script points to your Neon Companion’s IP address.
Run the script: When running the script and right before starting with the main experiment, a window will appear with instructions guiding the participant through the task. During the experiment, three types of information are generated:
The script sends event markers (e.g., "Sound Onset") via two paths:
PSY_MARKERS_TASK): Recorded in the .xdf file for alignment with EEG.As the participant completes the task, Lab Recorder is silently doing the heavy lifting. Pairing every brainwave and eye movement with the exact moment a stimulus was presented. The final result is a single .xdf file that contains the entire multi-layered story of the experiment.
Once the .xdf file is loaded into an analysis environment (like MNE-Python or MATLAB), the clock offsets are applied automatically. Because the markers, EEG, and pupil data now share a reference timeline, you can precisely epoch the data:
Example: "Show me the EEG voltage and pupil diameter from -200ms to +800ms relative to the 'Active Tone' marker."
Figure 1. Time-series visualization of synchronized multimodal data. The plot displays the first 40 seconds of the task, integrating preprocessed midline EEG channels (Fz, FCz, Cz, CPz) with left and right pupil diameter from the Neon eye tracker. Vertical dashed markers indicate time-aligned experimental events.
In this guide, we’ve demonstrated how to bridge the gap between neural and eye tracking data using LSL. By leveraging Neon and Mentalab Explore Pro together, you can move beyond single-stream recordings to high-precision, multimodal experiments where data is perfectly aligned on a shared timeline.
Coming soon: A dedicated Neon Player plugin for loading and visualizing multimodal .xdf files.
TIP
If you need more help or would like assistance setting up your specific experimental workflow, we are here to support you. You can reach out to us directly at info@pupil-labs.com, join the conversation on our Discord server, or visit our Support Page for more formal support options and documentation.

Undistort Video and Gaze Data
Learn how to undistort the scene camera distortions and apply it to gaze positions.

Use Neon with Pupil Capture
Use your Neon module as if you were using Pupil Core. Connect it to a laptop, and record using Pupil Capture.

Generate Scanpath Visualisations
Generate both static and dynamic scanpath visualisations using exported data from Pupil Cloud's Reference Image Mapper or Manual Mapper.