# Lab Streaming Layer 数据流简介

**lab streaming layer（LSL）**&#x662F;用于研究的实验测量时间序列的统一收集，处理双方的网络，时间同步，实时访问设备系统以及可选的数据采集，可视化视图和保存记录数据。

**LSL**由核心库和一套建立在库的顶部工具。

核心传输库是[liblsl](https://github.com/labstreaminglayer/liblsl/)及其语言接口（[C](https://github.com/sccn/liblsl/)，[C ++](https://github.com/sccn/liblsl/)，[Python](https://github.com/labstreaminglayer/liblsl-Python/)，[Java](https://github.com/labstreaminglayer/liblsl-Java/)，[C＃](https://github.com/labstreaminglayer/liblsl-Csharp/)，[MATLAB](https://github.com/labstreaminglayer/liblsl-Matlab/)）。该库是通用和跨平台的（操作系统支持：Win / Linux / MacOS / [Android](https://github.com/labstreaminglayer/liblsl-Android/) / iOS；体系结构支持：x86 / amd64 / arm）。

实时数据流的采集将有利于脑机接口(BCI)的运用和数据的开发。

![](https://tva1.sinaimg.cn/large/00831rSTgy1gdbn5bnoptj30t40hadhb.jpg)

LSL的简介，我在很早的时候，在微信公众号BrainTechnology上介绍过几篇如何使用lsl来读取EEG/fNIRS设备的数据过程。

LSL[**连接EEG设备**](https://mp.weixin.qq.com/s/Vii_M3jCSr6EFE0OzFzJ3w)

LSL[**连接fNIRS设备**](https://mp.weixin.qq.com/s/WCG8OlIjPvVbxBfDaHIGXw)

## 当前可查阅到的学习资源

GitHub [**labstreaminglayer**](https://github.com/sccn/labstreaminglayer)

LSL[**文档教程**](https://labstreaminglayer.readthedocs.io/index.html)

[**在MATLAB中接收数据流**](https://github.com/sccn/labstreaminglayer/wiki/Tutorial-4-a.-Receive-Data-streams-in-MATLAB)

[**liblsl-python**](https://github.com/labstreaminglayer/liblsl-Python/tree/master/pylsl/examples)在Python中可以使用pip install pylsl使用

[**liblsl-matlab**](https://github.com/labstreaminglayer/liblsl-Matlab/)在matlab中使用一定要注意使用目录路径

对于开发人员可以通过安装LSL来构建所需要的环境，可参考[**该网址**](https://labstreaminglayer.readthedocs.io/dev/build_env.html)以及github上的[**安装教程**](https://github.com/sccn/labstreaminglayer/wiki/INSTALL)

## 支持的设备和工具

所有app支持旧版本的[**安装包文件**](ftp://sccn.ucsd.edu/pub/software/LSL/Apps/)

LSL最初是为了促进涉及多模态数据采集的实验而开发的，包括大脑动力学（主要是EEG），生理学（EOG，EMG，心率，呼吸，皮肤电导率等），行为数据（动作捕捉，眼动跟踪，触摸交互，面部表情等），最后是程序状态（例如事件标记）。

### 支持的EEG硬件

目前市场上的大多数EEG系统都与LSL兼容。

* 下列设备通过供应商提供的软件支持LSL：
* [ANT eego sports](https://www.ant-neuro.com/products/eego_sports)
* [Cognionics (all headsets)](http://www.cognionics.com/)
* [EB Neuro BE Plus LTM](http://www.ebneuro.biz/en/neurology/ebneuro/galileo-suite/be-plus-ltm)
* * [InteraXon Muse](http://www.choosemuse.com/)

    [MU-01 - Muse - Released 2014 Example with Matlab](https://labstreaminglayer.readthedocs.io/info/matlab_example_with_muse.html)[MU-02 - Muse - Released 2016](https://github.com/alexandrebarachant/muse-lsl)[MU-03 - Muse 2 - Released 2018](https://github.com/alexandrebarachant/muse-lsl)
* [mBrainTrain SMARTING](http://www.mbraintrain.com/smarting/)
* neuroelectrics [(Enobio](http://www.neuroelectrics.com/products/enobio/), [StarStim](https://www.neuroelectrics.com/solutions/starstim)) via [NIC2](https://www.neuroelectrics.com/solution/software-integrations/nic2).
* [OpenBCI (all headsets)](http://docs.openbci.com/software/06-labstreaminglayer)

**LSL发行版中包含的程序支持以下系统（标有（u）的未试用系统）：**

* [ABM B-Alert X4/X10/X24 wireless](https://github.com/labstreaminglayer/App-BAlert) (u)
* [BioSemi Active II Mk1 and Mk2](https://github.com/labstreaminglayer/App-BioSemi)
* [Blackrock Cerebus/NSP](https://github.com/labstreaminglayer/App-BlackrockTimestamps) (timestamps only)
* [Brain Products ActiChamp series](https://github.com/labstreaminglayer/App-BrainProducts)
* [Brain Products BrainAmp series](https://github.com/labstreaminglayer/App-BrainProducts)
* [BrainVision RDA client](https://github.com/brain-products/LSL-BrainVisionRDA/releases)
* [Brain Products LiveAmp](https://github.com/labstreaminglayer/App-BrainProducts/releases)
* [Cognionics dry/wireless](https://github.com/labstreaminglayer/App-Cognionics)
* [EGI AmpServer](https://github.com/labstreaminglayer/App-EGIAmpServer)
* [Enobio dry/wireless](https://github.com/labstreaminglayer/App-Enobio) (u)
* [g.Tec g.USBamp](https://github.com/labstreaminglayer/App-g.Tec/tree/master/g.USBamp) (buggy at high sampling rates)
* [g.Tec g.NEEDaccess](https://github.com/labstreaminglayer/App-g.Tec/tree/master/g.NEEDaccess) (including g.USBamp, g.HIamp, g.Nautilus)
* [MINDO dry/wireless](https://github.com/labstreaminglayer/App-MINDO)
* [Neuroscan Synamp II and Synamp Wireless](https://github.com/labstreaminglayer/App-Neuroscan) (u)

### 支持眼动追踪硬件

**LSL当前支持几种眼动跟踪系统，这些系统已包含在发行版中（标有（u）的未调试系统）：**

* Eye Tribe Tracker Pro
* [SMI iViewX](https://github.com/labstreaminglayer/App-SMIEyetracker)
* [SMI Eye Tracking Glasses](https://github.com/labstreaminglayer/App-SMIEyetracker)
* [SR Research Eyelink](https://github.com/labstreaminglayer/App-EyeLink)
* Tobii Eye trackers

  [Tobii Pro](https://github.com/labstreaminglayer/App-TobiiPro)

  [Tobii StreamEngine (consumer devices)](https://github.com/labstreaminglayer/App-TobiiStreamEngine)

  [Tobii other (older app)](https://github.com/labstreaminglayer/App-Tobii) (u)
* Custom 2-camera eye trackers (with some hacking)
* [Pupil-Labs](https://github.com/labstreaminglayer/App-PupilLabs)

### 支持人机界面的硬件

* LSL支持多种Windows兼容的输入硬件，该发行版随附了这些硬件：
* [Input devices (keyboards, trackballs, presenters, etc.)](https://github.com/labstreaminglayer/App-Input)
* [DirectX-compatible joysticks, wheels, gamepads and other controllers](https://github.com/labstreaminglayer/App-GameController)
* [Nintendo Wiimote and official expansions](https://github.com/labstreaminglayer/App-Wiimote)

### 支持的动作捕捉硬件

LSL当前支持几种运动捕捉系统，这些系统已包含在发行版中。这些是：

* [AMTI force plates with serial I/O](https://github.com/labstreaminglayer/App-AMTIForcePlate)
* [PhaseSpace](https://github.com/labstreaminglayer/App-PhaseSpace)
* [Microsoft Kinect](https://github.com/labstreaminglayer/App-KinectMocap)
* [NaturalPoint OptiTrack](https://github.com/labstreaminglayer/App-OptiTrack) (some versions)
* [OpenVR](https://github.com/labstreaminglayer/App-OpenVR)
* [Qualisys](https://github.com/qualisys/qualisys_lsl_app)

### 支持硬件刺激

* 以下刺激设备（TMS，TDCS / TACS）具有LSL支持：

  [Soterix Medical MXN-33经颅电刺激仪](https://soterixmedical.com/research/hd/mxn-33)

### 支持的刺激呈现软件

* [Neurobehavioral Systems Presentation](https://www.neurobs.com/)
* [iMotions](https://www.imotions.com/)
* Psychopy (using LSL for Python)
* PsychToolbox (using LSL for MATLAB)
* Unity (using LSL for C#)
* [Simulation and Neuroscience Application Platform (SNAP)](https://github.com/sccn/SNAP)
* [Reiz](https://github.com/pyreiz/pyreiz)

同时推荐你查阅我之前写的使用LSL发送标记给nirs设备。

[**Psychopy通过LAN网线触发marker连接NIRX设备**](https://mp.weixin.qq.com/s/PDkFdW28SuozTyIWDy3-GA)

### 谢谢大家观看，如有帮助，来个喜欢或者关注吧！

本文作者：Chen Rui


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.7988888.xyz/stimulus-softwares-ci-ji-ruan-jian/lab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
