Lab Streaming Layer

The Lab Streaming Layer (LSL) is a system designed specifically for the unified collection of time-series data in research experiments. It simplifies the process of collecting and working with data streams generated by various sensors and software used in these experiments. LSL streamlines the process by handling networking, synchronization, and data access, allowing researchers to focus on designing and conducting their experiments.

LSL is implemented by a core liblsl library with interfaces developed for many programming languages. Many devices and software now integrate and support data exchange through LSL over the network. BrainAccess Board (link) software also uses LSL to synchronize the data if multiple BrainAccess devices are connected. It can also catch streams from other software, for example, used for stimuli generation. Likewise, EEG data coming from BrainAccess devices can be caught by other software for real-time processing or recording. The major features of LSL are outlined below: 

Unified data collection. LSL offers a standardized way to collect time-series data from different sensors, regardless of the manufacturer or platform. This makes it easier for researchers to integrate data from various sources into their experiments.

Networking and time synchronization. LSL streams the collected data over a local network, ensuring all devices involved are synchronized with millisecond precision. This is crucial for experiments where timing accuracy is essential. In addition to this, the data can come from different devices and computers as long as they are connected to the same local network. Hence, the experiments can be very scalable and easily expandable with additional sensors or data processing nodes.

Real-time access and recording. LSL allows researchers to access and analyze data streams in real-time. Additionally, it provides options for centralized recording of the data for later analysis.

BrainAccess-Board-LSL-usage-example

An example of the versatility of using Lab Streaming Layer (LSL). Two computers (left and right) running BrainAccees Board are used to connect and stream data from BrainAccess devices to LSL. The computer at the top, also connected to the same network, is running software for visual stimuli presentation and streams times of presentation onsets to LSL as well. The computer at the bottom, again running BrainAccess Board, collects all the streams and saves them to a file.

In typical experiments employing EEG or other bio-activity measurements, there are going to be many data sources that need to be collected and recorded. The LSL uses Stream Outlet abstraction that is essentially used to send data from various sensors. It can also be used to stream out data marking various events, for example, when some stimulus is shown on the screen or when someone presses keyboard or mouse buttons. Stream Inlet abstraction is a point, which collects the data coming from various sources. It is typically used for data recorders or real-time processing software. Follow the links below for more information on the official LSL websites:

Official Lab Streaming Layer website

Documentation for developers using LSL