Welcome Guest, you are in: Login

ScrewTurn Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

LSL Signal Element

RSS
Modified on 2017/09/26 15:14 by Administrator Categorized as Elements, Signal Acquisition
Element Icon LSL Signal Element
Info
Category: Signal Acquisition AddIn: Signal Processing
Creator: OkazoLab Team Scope: Global
Owns Snippets: no Usage:

Element's actions aligned with epochs of the experiment

EpochActions
Experiment OnsetThe element starts data acquisition and buffering.
Control Loop stepThe element buffers newly received data
Experiment OffsetThe element stops data acquisition and buffering.

Properties

Generic Properties

NameDescriptionConstraintsValue TypeUpon Runtime Change
LSL Settings
Stream TypeDefines a type of the LSL stream for acquisition. The proper type is required for auto-detection of active LSL streamsString 
LSL StreamDefines the LSL stream for online acquisition. You must have the LSL stream running, when you set this property for the first time. Note that the channel configuration of the element is updated upon changing this propertyString 
Channel Configuration
Actual Sampling RateReturns the actual (or, expected) sampling rate of the LSL streamDouble 
Sample Type Returns an original value type of samples in the LSL stream. The property is merely informative- regardless of the original value type, the LSL Signal element convents samples in the double numbersString 
Chunk SizeDefines the sample chuck size (in ms) during signal acquisition. Larger chunks can increase a latency of the sample delivery but decrease a processor loadInt32 

+=== Properties inherited from the base signal element === Inherited properties of the Signal Provider Element
Channel Configuration
Selected ChannelsDefines what signal channels are selected for acquisition within EventIDE. Selected channels are registered in the EventIDE signal pool at runtime and become available for the signal analysis elements.IList
Selected Channel CountIndicates how many signal channels are currently selected for acquisition.Int32
Total Channel CountIndicates how many signal channels are available for acquisition in the total.Int32
Buffer SizeDefines the size (in samples) of a circular buffer that stores incoming signal data.Int32
Signal Generator
Signal SourceDefines a source for the signal. The emulated rhythmes can be used for offline validation of the chosen analysis settingsenum
Emulated Sampling RateDefines the emulation sampling rate (samples per second), when data is generated or streamed from a file.Int32
Primary FrequencyDefines the frequency of the primary rhythm in the generated signal, in Hz. Assign the zero to exclude the primary frequency from the generated signal.Double
Secondary FrequencyDefines the frequency of the secondary rhythm in the generated signal, in Hz. The secondary frequency magnitude is a half of the primary frequency magnitude. Assign the zero to exclude the secondary frequency from the generated signal.Double
Noise LevelDefines the noise level (in % to the norm magnitude of the primary frequency). The noise is added to the generated signal. Assign the zero the exclude the noise from the generated signal.Double
External DatafileOpens the dialog for selecting a data file containing a stream of double numbers representing a signal. If a file name without a path is defined, the data file will be picked up in the location of the experiment file.String

+=== Properties inherited from clElement === Inherited properties of clElement
NameDescriptionConstraintsValue TypeUpon Change
Control
Is EnabledIf set to false the element is completely omitted when the experiment is run.Boolean
TitleTitle of the element.String



LSL Signal element reads and buffers continuous online signals sent via Lab streaming layer (LSL) protocol.


Description

The lab streaming layer (LSL) is a protocol for the unified collection of measurement time series in research experiments that handles both the networking, time-synchronization, (near-) real-time access as well as optionally the centralized collection, viewing and disk recording of the data. You can find more details on the LSL project site. The LSL protocol was developed in Swartz Center for Computational Neuroscience, UCSD.

The LSL Signal element automatically detects active LSL streams that are carried by external hardware or software on the same computer or in a network. The LSL stream can incorporate multipe channels, which will be treated as separate signals by the LSL Signal element. The element allows you to select one or more channels for acquisition. 

Note that the LSL protocol can transfer data in wide range of formats. The LSL Signal element can only resolve signals, which carry numerical samples (double, float or integer). 

The current version of the LSL Signal element ignores time stamps of received samples. 

Practical Use

Configuring the element

In order to use LSL signals in your experiment, you need to perform an one-time configuration of the LSL Signal element:

  1. Add the LSL Signal element to any event in your experiment. The element is global and will work during the entire experiment run
  2. Make sure that the source LSL stream is running on your system. For example, you may need to start recording on your LSL-compatible EEG amplifier or run software that writes to a LSL stream
  3. Select the LSL Signal element in GUI to access its properties in the Property panel
  4. Set the Stream Type property to the type of the source LSL stream. You can select the most common LSL stream types from a drop-down list
  5. Open the drop-down list on the LSL Stream property. The list should show currently active LSL streams detected in your system. Select the source stream. If you know a name of the source stream in advance, you can also type it directly.
  6. Once the stream is selected, the element will automatically retrieve the channel configuration in it and updates the corresponding properties: Actual Sampling Rate, Sample Type, etc.
  7. Finally, open an editor on the Selected Channels property and select channels for online acquisition. The selected channels can be then accessed by the signal processing elements.

Testing the element with a simulated signal

If you have no LSL stream available at the moment, you can test the element in the signal simulation mode or, with a data file containing a signal stream:

  1. Browse properties of the OpenViBE Signal element down to the Signal Generator group.
  2. Via the 'Signal Source' property, select either Oscillatory generator or External file options.
  3. If you have selected the Oscillatory generator mode, choose parameters of the generated signal with the following properties: Primary Frequency,Secondary Frequency,Noise Level.
  4. If you have selected the External file mode, define a path to the signal file. If path is made just of file name, the file will be loaded at location of your experiment. The signal file must be in the binary format, with each sample represented by double value (8 bytes or 64-bits).
  5. Define the emulated sample rate, in samples per second, via the corresponding property.

 
  Name Size
- LSLIcon.png 4.03 KB

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.