Contributions:LSLSource
Location
/src/contrib/SignalSource/LSLSource
Introduction
Labstreaminglayer
The Labstreaminglayer (LSL) is a system for the unified collection of measurement time series in research experiments that handles both the networking, time-synchronization, (near-) real-time access, and optionally the centralized collection, viewing and disk recording of the data. More information can be found at GitHub README and online documentation.
A list of LSL supported devices can also be found at this link.
LSLSource
The "LSLSource" source module uses Labstreaminglayer to acquire data from different hardware, such as OpenBCI, gUSBAmp, and eye trackers. This source module can automatically detect the sampling rate and the number of channels of the input signal and configure the output signal.
Steps to use LSLSource
Using LSL requires that you have both the LSL Application for your hardware installed and BCI2000, as the LSL Application streams data to the LSLSource BCI2000 source module.
1.Acquire the appropriate LSL Application for your hardware. Information on how to do this can be found on the LSL GitHub.
2.Connect your hardware to the PC with BCI2000, and the LSL Application installed. Launch the LSL Application.
3.In the LSL Application, configure the appropriate hardware parameters, such as sampling rate, number of channels, and filters, and open the connection to hardware. You can now start the LSL stream.
4.Now launch BCI2000 with LSLSource as the signal acquisition module. Click "Config" and navigate to the "Source" tab. Enter your desired sample block size and other parameters you wish to specify. Note that the "SourceCh" and "SamplingRate" parameters should be set to "auto", as these are configured in the LSL Application.
5.Click "Set Config" and start your experiment!
Parameters:LSLSource
SourceCh
The source module will automatically detect the number of channels. Set this parameter to "auto".
SampleBlockSize
Samples per channel per digitized block. This parameter determines how often per second data are collected, processed, and feedback is updated with the sampling rate. For example, at 500 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 25 times per second.
SamplingRate
The sample rate of the system. Set this parameter to "auto" as the source module can automatically detect the sampling rate. The sampling rate should be compatible with the sample block size and the computational capabilities of your computer. If your sampling rate is too high and your sample block size is too small, your PC may not be able to keep up with the data acquisition stream, causing data loss, jerky display, etc. If you are experiencing problems like this, increase the SampleBlockSize to update the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications) and increase Visualize->VisualizeSourceDecimation parameter. This will decrease the number of samples per second that are actually drawn in the Source display.
SourceChGain
The gain for each channel. If set to "auto", this parameter is 1μV. Usually EEG is on the scale of 100's of μV, while EKG is on the order of 1mV.
SourceChOffset
Offset for each channel.
ChannelNames
Names of each channel.
StreamSelectionProperty
The property used for stream selection, e.g. 'type', 'name', or 'source_id'.
StreamSelectionPropertyValue
The desired value of the StreamSelectionProperty, e.g. 'EEG'.