Jump to content

User Reference:BCI2000Certification: Difference between revisions

From BCI2000 Wiki
Awilson (talk | contribs)
No edit summary
Awilson (talk | contribs)
No edit summary
Line 99: Line 99:
:A list of state change values that should be detected by the analysis. For example, if values <code>4 11</code> are used, then the analysis tool will examine when the StimulusCode state changes to either 4 or 11, and then examine when the Video Channel changes.
:A list of state change values that should be detected by the analysis. For example, if values <code>4 11</code> are used, then the analysis tool will examine when the StimulusCode state changes to either 4 or 11, and then examine when the Video Channel changes.


====3. Global Options====
====3. Global Settings====
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.
 
;Window Left, Top
:The position of the left and and top sides of the application window. If using multiple monitors, this position should take this into account. For example, if the application window is to the right of the main monitor, and the main monitor has a resolution of 1280x1024 pixels, then <code>Window Left</code> should be set to 1280, and <code>Window Top</code> to 0.
 
;Window Width, Height
:The width and height of the application window.
 
;Global Signal Source
:The executable that should be used by all applications. This program should be located in the <code>BCI2000/prog</code> folder.
 
;Data Save Directory
:The directory where all of the data should be saved during the task. This will appear in <code>BCI2000/tools/BCI2000Certification/</code>. '''NOTE that if data already exists in this directory, additional data will be saved to it!''' To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.
====4. Controls====
====4. Controls====
This panel handles starting and stopping the procedure, and running the analysis.
;Start
:Starts the selected tasks.
;Cancel
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.
;Analysis
:Start the analysis tool. This uses the directory entered in the '''Data Save Directory''' setting. See the documentation for the analysis tool for more information on the analysis procedure.

Revision as of 16:46, 8 July 2009

Introduction

BCI2000 v2.0 and higher includes a certification procedure that can determine whether a computer system is capable of running all or some BCI2000 applications. Because BCI2000 does not have a standardized hardware configuration, i.e., it can run on potentially any PC, this testing procedure is capable of running on any PC with BCI2000, with the results reporting which standard BCI2000 applications meet the minimum timing requirements. Different configurations are included in the certification procedure to test a range of likely setups for a given application, in which timing characteristics such as the sampling rate, inter-stimulus intervals, and stimulus duration, and other parameters, such as the number and size of the stimuli, are changed for each configuration.

This document serves as the instruction manual for using the certification procedure, and describes how the procedure works to determine the timing characteristics of the BCI2000 system. The primary use for the certification procedure is to determine if the PC configuration used with BCI2000 is capable of running the core BCI2000 system, which is comprised of:

  • Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.
  • The AR, P3, FFT, and Matlab signal processing modules.
  • The CursorTask, P3Speller, and StimulusPresentation application modules.

Additionally, due to the extensibility of BCI2000, researchers who develop custom algorithms and applications, or use amplifiers not made by g.tec, can use the certification procedure to determine whether their custom modules are capable of running on a particular PC configuration.

The certification procedure works by comparing the differences in time of when BCI2000 expects an event to occur to when that event actually occurred. These events include a change in the display, an audio output through the system speakers, or an EEG sample being stored in the amplifier buffer. The times at which such events occur are recorded with the amplifier and stored in a data file. Changes in the display are found using an optical sensor in combination with the g.TRIGbox. The g.TRIGbox is a signal conditioner that generates trigger pulses for various sensors or input signals. When the sensor exceeds a threshold, the g.TRIGbox outputs a digital signal which is recorded on the amplifier. A similar procedure is used for audio detection: the sound output from the PC is input to the g.TRIGbox, and when the volume exceeds threshold, a high digital signal is output and recorded by the amplifier. This information can be used because BCI2000 stores a time-stamp for every event during an experiment. The difference between a time-stamp value and the time that the recorded event changes values are compared to find the latency for that particular event.

These latencies can be affected by many external influences, including hardware deficiencies (such as low RAM, slow CPU speed, or a video card of low quality), and other software running in the background while the experiment is being run.

This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.

Compiling the BCI2000Certification Programs

The BCI2000Certification procedure actually consists of two separate programs, including a graphical user interface that simplifies the task of selecting and starting tests, and a program that performs the data analysis and returns results. These programs are not compiled automatically with the other BCI2000 programs, and must therefore be compiled manually.

To do so:

  1. Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)
  2. In File, select Open Project...
  3. Navigate to BCI2000/src/core/Tools/BCI2000Certification
  4. Select BCI2000CertGroup.bpg
  5. If Borland 6 is not used, then the projects will be updated to the most recent version.
  6. Right-click the topmost project in the group, and select Make All From Here to compile the programs.

Using the BCI2000Certification Procedure

Starting the User Interface

  1. The compiled programs can be found in BCI2000/tools/BCI2000Certification.
  2. Navigate to this folder, and double-click the BCI2000Certification.exe file.
  3. The certification tool opens, as below.

This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.

The BCI2000Certification user interface.

Loading Configuration Files

The BCI2000 certification procedure uses different combinations of BCI2000 parameter fragments to control the tests. While it is possible to edit these by hand, in most circumstances it is simpler to use the graphical user interface provided.

  1. In the BCI2000Certification tool, select File->Open *.ini
  2. Load the file named BCI2000Certification_32ch_100ms.ini if using a 32-channel system, or BCI2000Certification_16ch_100ms.ini if using 16 channels. (This tutorial assumes a 32-channel system).
  3. All 100 tests in this configuration are loaded into the GUI.

User Interface Components

This section describes each user interface component, referring to the figure below.

The BCI2000Certification user interface components.

1. Task List

The task list shows all tasks that have been loaded from the configuration file, or created within the GUI. To run a specific test, it should have a check mark next to it. In order to select or deselect all tasks, press the Select All check box at the bottom of the list.

It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the + button. A new task is created a the bottom of the list; the task details must be filled in (described next). It is often easier to copy a similar task than to create a new one from scratch. To do so, select the desired task, and press Copy. The new task should be renamed appropriately. To remove a task, select a task and press the - button.

2. Task Details

The right side of the GUI displays the details of the currently selected task. Each option is described here.

Task Name
The name of the task. This must not contain any spaces, and must be unique.
Signal Source
The amplifier that should be used, if different from the amplifier set in the global options. Generally, this should not need to be used, since all tasks should use the same amplifier.
Signal Processing
The signal processing module that should be started and used for the given task. This should usually be either ARSignalProcessing, P3SignalProcessing, or DummySignalProcessing, depending on the specific application.
Parameters
A list of the parameter fragments that should be used for this task. Typically, at least two parameter files are required. The first should be the amplifier-specific fragment that configures the amplifier for the correct number of channels. The second should be the application-specific fragment that configures how the application appears on the screen. Parameter files can be added and removed with the + and - buttons, respectively. All files should be placed in the BCI2000/tools/BCI2000Certification/parms folder.
Sample Rate
The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.
Sample Block Size
The sample block size (in samples). In the provided parameter files, the sample block size is always equal to 100ms, regardless of the sampling rate.
Amp Channel
This is the analog channel that will contain the amplifier digital output (i.e., the digital output recorded back in on an analog channel). This signifies the onset of acquisition of a block. This value should be between 1 and the number of channels.
Digital Amp Channel
This is the digital channel that contains the amplifier digital output (i.e., the digital output recorded back in on a different digital input channel).
Video Channel
The recorded channel containing video event markers.
(Video) State
The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.
(Video) State Values
A list of state change values that should be detected by the analysis. For example, if values 4 11 are used, then the analysis tool will examine when the StimulusCode state changes to either 4 or 11, and then examine when the Video Channel changes.
Audio Channel
The recorded channel containing audio event markers.
(Audio) State
The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.
(Audio) State Values
A list of state change values that should be detected by the analysis. For example, if values 4 11 are used, then the analysis tool will examine when the StimulusCode state changes to either 4 or 11, and then examine when the Video Channel changes.

3. Global Settings

As the name suggests, the options under Global Settings are applied to all tasks, and are described here.

Window Left, Top
The position of the left and and top sides of the application window. If using multiple monitors, this position should take this into account. For example, if the application window is to the right of the main monitor, and the main monitor has a resolution of 1280x1024 pixels, then Window Left should be set to 1280, and Window Top to 0.
Window Width, Height
The width and height of the application window.
Global Signal Source
The executable that should be used by all applications. This program should be located in the BCI2000/prog folder.
Data Save Directory
The directory where all of the data should be saved during the task. This will appear in BCI2000/tools/BCI2000Certification/. NOTE that if data already exists in this directory, additional data will be saved to it! To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.

4. Controls

This panel handles starting and stopping the procedure, and running the analysis.

Start
Starts the selected tasks.
Cancel
Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.
Analysis
Start the analysis tool. This uses the directory entered in the Data Save Directory setting. See the documentation for the analysis tool for more information on the analysis procedure.