Jump to content

Contributions:NeuroSpark

From BCI2000 Wiki
Revision as of 08:39, 19 May 2022 by Lijintao (talk | contribs)

Location

Versioning

Author

Jintao Li, Chen Frontier Labs

Version History

  • V1.00 - 05/17/2022

Source Code Revisions

Functional Description

This source module allows BCI2000 to receive electrophysiological data collected by NeuroSpark and streamed out by HEEG software. The source module has been tested with HEEG software version 1.00.00.9263.

Usage of HEEG Software

HEEG software is a product from Neuracle, Ltd., which streams out electrophysiological data. There are two modes of HEEG software. The first one is to connect it to the NeuroSpark and transport data collected by the device. Or you could use the software as emulator to send out data without NeuroSpark. In both way, data are transported via TCP.

1、Connect the software to NeuroSpark device

Start the HEEG software and open the device

2、Using the software as an emulator

Using the data emulator instead of the device: before opening the device

Setup the streaming data channels

Setting C1-C4 as streaming data channels

After open the device, start the data acquisition, then the TCP/IP streaming start automatically

Setting Up BCI2000

Make sure you download the executable "NeuroSpark.exe" file and put it under BCI2000/prog/ directory. Once you compile BCI2000 correctly and generate the solution, it is convenient to create a batch file to run NeuroSpark Source Module. Just copy one suitable existing batch file in BCI2000/batch. Then replace the first line beginning with "Start executable" with "Start executable NeuroSpark --local".

Usage Steps

Make sure the HEEG software start the data acquisition before you start BCI2000.

  1. Double click the batch file you just created.
  2. Click the "Config" button.
  3. Set suitable parameters. Detail about these parameters could be found below.
  4. Click "Set Config".
  5. Click "Start" to start the experiment.

Parameters

Basically the source module could config all necessary parameters automatically. The only parameter you may need to set yourself is SampleBlockSize.

SourceCh

The value should be the same as the number in HEEG software or just leave it auto.

SampleBlockSize

The value is default to 20 if you set it ‘auto’, which is also the minimum. HEEG software sends out certain number of samples per block, which is decided by sample rate, in order to ensure that BCI2000 receives these samples correctly, SampleBlockSize has to be a multiple of that. For example, if the sample rate is 2000 Hz, HEEG streams out 2 samples per channel per block, SampleBlockSize should be a multiple of 2.

SamplingRate

Enter the number of sampling rate that match HEEG software(250, 500, 1000, 2000, 4000, 8000, 16000) or leave it auto.

SourceChGain

Use 'auto', or a list of SourceCh numbers of 1.

SourceChOffset

Use 'auto', or a list of SourceCh numbers of 0.

Notes

  1. You could lower the variance in timing by setting the priority of the HEEG software to highest in the TaskManager.
  2. At present, the highest sample rate of HEEG is 2000 Hz, which means even you set sample rate higher than 2000 Hz, like 4000 Hz, it would send out data in 2000 Hz.
  3. When you set parameters 'auto', if you want to check the concrete value of the parameter in the experiment, you could use BCI2000 tool BCI2000FileInfo to open the DAT file in BCI2000/data to check.