Contributions:How to use a Contributed Source Module

From BCI2000 Wiki
Jump to: navigation, search

For maintenance reasons, BCI2000 supports only a limited number of amplifiers in its core distribution. In addition to these fully supported amplifiers, a larger and growing number of data acquisition systems is supported in form of contributed code, written and maintained by BCI2000 users. Contributions:ADCs provides an overview of source modules currently available.

In comparison to using an amplifier from the core distribution, you will need to perform a few additional, simple steps in order to use a contributed source module.

Obtaining a binary version of a Contributed Source Module

Binary versions of contributed source modules are available in the extended binary distribution of BCI2000. Alternatively, you can build contributed source modules from the BCI2000 source code as described here.

Creating batch files

BCI2000 consists of a number of modules that need to be started up in a certain sequence. Typically, this is done using scripts (batch files) located in BCI2000/batch (see User Reference:BCI2000Launcher for a graphical alternative to batch files).

There is one such batch file for each combination of a source module, and a BCI paradigm. In order to use a contributed source module with a certain BCI paradigm, perform these steps:

  • Identify the batch file in BCI2000/batch that provides the desired paradigm using the SignalGenerator source module. For the cursor feedback paradigm, this would be CursorTask_SignalGenerator.bat.
  • Create a copy of that batch file, and rename it to reflect the name of the source module you would like to use, e.g. CursorTask_Neuroscan.bat.
  • Open the newly created file in a text editor.
  • Identify the line that refers to SignalGenerator.
  • There, replace SignalGenerator with your source module's executable name, e.g. NeuroscanClient.
  • Save the batch file, and run it to start BCI2000 in the desired configuration.
  • If the batch file is unable to properly start BCI2000, you may debug it as follows:
    • open a console/terminal window (in Windows, it's called cmd.exe);
    • use the "cd" command to navigate into the BCI2000/batch directory;
    • run the batch file from the command line -- on UNIX-type OSes, you will need to put a dot and a slash in front of the file name;
    • you will be able to read the batch file's output in the terminal window.
  • Create a separate batch file for each paradigm you intend to use.

Setting up your amplifier

After creating one or more batch files for use with your amplifier, you might create a parameter file that only contains settings specific to your amplifier and EEG setup. You can do this by starting up from one of your newly created batch files, clicking "Config", and then going to the "Source" tab. There, adjust all settings as appropriate. Then, click "Configure Save", and make sure that only those from the "Source" tab are selected. Finally, click "Save Parameters...", and save your subset of parameters under parms/amplifiers/<your_amplifier>.prm. After that, don't forget to click "Configure Save" again, and to re-select all parameters, to make sure you can save full parameter files as usual.

When you are comfortable with a text editor, you may alternatively perform the "Save" step as follows:

  • First, save the full parameter file without using "Configure Save".
  • Then, open the new parameter file in a text editor such as Windows Notepad.
  • You will see a list of parameters, with each parameter corresponding to a single line. These are sorted by tabs in the operator's config dialog where the individual parameters appear. Thus, it is simple to remove all parameter lines except the ones referring to the "Source" tab.

See also

Contributions:ADCs, BCI2000 Binaries, Programming Howto:Building BCI2000