Triggering and event synchronization via LSL
In order to precisely mark both your EEG and fNIRS data for online and offline analysis, triggering and event synchronization are crucial to any type of co-registration. Since the focus of this article is on mobile EEG-fNIRS, we recommend using software triggering through LabStreamingLayer (LSL). LSL is an open-source system for the unified collection of time series data coming from different sources connected to the same network. In our case, the data stream sources will be the EEG amplifier (the LiveAmp), the fNIRS amplifier (the NIRSport 2), and triggers coming from a stimulus presentation software (in this case PsychoPy). Refer to this blog post on bci.plus for how to view the LSL EEG and Trigger Stream.
Network creation: For LSL to receive all the data streams, the computers to which the LiveAmp and the NIRSport 2 are associated, as well as the stimulus presentation computer, need to be connected to the same network. For this, we recommend creating a private local network either via a wired ethernet connection or through an access point router which grants a stable Wi-Fi connection.
Connecting the streams to LSL: The next step is connecting the data streams in LSL. This needs to be done separately for each the EEG stream, the fNIRS stream, and for the triggers (i.e., stimulus presentation software). This connection is created differently for each device: for the LiveAmp, the connector app is needed; for the NIRSport 2, the relevant checkbox on Aurora must be checked (see Aurora manual, p. 34); for the triggers coming from the stimulus presentation software, the relevant option/line of code must be implemented.
Recording the LSL streams: Once the streams have been created, open LabRecorder, the original LSL acquisition app (LabRecorder.exe) and Aurora, and click “Update” to visualize all streams. You should be able to see the LiveAmp stream, the Aurora stream, and the Trigger Stream. As described here, LabRecorder can store the streams in a single .xdf file, which can then be analysed or converted/exported via MATLAB®/Python. Please note that in the case of fNIRS data, it is possible to record fNIRS and Trigger Stream directly into a .nirs file with Aurora. In this case, LabRecorder would be used to combine only the EEG and Trigger Stream into a single .xdf file.
Monitoring the LSL streams: There is currently no software that can display both types of signal at the same time. Monitoring the fNIRS stream can be done directly from Aurora, which can simultaneously display both fNIRS data and Trigger Stream. The EEG stream together with the Trigger Stream can be monitored with a dedicated Viewer. For more information read this blog post on bci.plus.