<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Awilson</id>
	<title>BCI2000 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Awilson"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php/Special:Contributions/Awilson"/>
	<updated>2026-06-30T07:47:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6182</id>
		<title>Contributions:WebcamLogger</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6182"/>
		<updated>2011-07-06T15:34:55Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
A filter that records video recorded from a webcam to an avi file, and stores the frame number in a State variable.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/WebcamLogger&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Adam Wilson (adam.wilson@uc.edu)&lt;br /&gt;
===Version History===&lt;br /&gt;
07/06/11 - Full commit with support for MSVC and MinGW.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Add geometry decimation (e.g., save other than 320x240).&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
For many experiments, visual information about how a subject is behaving during an experiment is desired. This extension acquires video from most webcams, and writes to an AVI video file. It also records the current frame number as a state variable, so that the video can be synchronized with brain data with a resolution of the block size. Other options include the ability to overlay the date and time directly on the video (useful for long-term monitoring), and time decimation (i.e., save every Nth frame).&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_WEBCAMLOGGER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--LogWebcam=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The webcam should be installed and configured per the device instructions. The Webcam logger uses the OpenCV (version 2.2) library for display and saving; supported webcams can be found at: [http://opencv.willowgarage.com/wiki/Welcome/OS].&lt;br /&gt;
&lt;br /&gt;
Camera options are found in the &#039;&#039;Source&#039;&#039; tab of the Configuration window.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The Webcam logger is configured in the &#039;&#039;Source&#039;&#039; tab within the WebcamLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogWebcam&amp;lt;/code&amp;gt;   - Enables/Disables logging of Webcam states&lt;br /&gt;
*&amp;lt;code&amp;gt;CameraNumber&amp;lt;/code&amp;gt; - the webcam number for systems with multiple cameras, 0 for the default camera&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDecimation&amp;lt;/code&amp;gt;  - The decimation factor for saving and viewing video; the logger saves/displays every Nth frame.&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDateTimeLocation&amp;lt;/code&amp;gt; - The location of the date/time overlay in saved video (0: none, 1: UpperRight, 2: UpperLeft, 3: LowerRight, 4: LowerLeft).&lt;br /&gt;
&lt;br /&gt;
The video is saved with a resolution of 320x240 pixels. A parameter that allows configuration of the geometry will be provided in a future version.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
&lt;br /&gt;
===WebcamFrame===&lt;br /&gt;
The frame number of the video. This can be used to synchronize the video with the recorded neural data. It is a 24-bit value, allowing 16,777,216 frames before overflowing. If the webcam can capture at 30 frame/sec, and is decimated at a factor of 5 (i.e., 6 frames/sec), this allows more than a month of video before it will go back to frame 0. In other words, this should not be an issue for most users.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6181</id>
		<title>Contributions:WebcamLogger</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6181"/>
		<updated>2011-07-06T15:34:32Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
A filter that records video recorded from a webcam to an avi file, and stores the frame number in a State variable.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/WebcamLogger&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Adam Wilson (adam.wilson@uc.edu)&lt;br /&gt;
===Version History===&lt;br /&gt;
07/06/11 - Full commit with support for MSVC and MinGW.&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Add geometry decimation (e.g., save other than 320x240).&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
For many experiments, visual information about how a subject is behaving during an experiment is desired. This extension acquires video from most webcams, and writes to an AVI video file. It also records the current frame number as a state variable, so that the video can be synchronized with brain data with a resolution of the block size. Other options include the ability to overlay the date and time directly on the video (useful for long-term monitoring), and time decimation (i.e., save every Nth frame).&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_WEBCAMLOGGER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--LogWebcam=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The webcam should be installed and configured per the device instructions. The Webcam logger uses the OpenCV library for display and saving; supported webcams can be found at: [http://opencv.willowgarage.com/wiki/Welcome/OS].&lt;br /&gt;
&lt;br /&gt;
Camera options are found in the &#039;&#039;Source&#039;&#039; tab of the Configuration window.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The Webcam logger is configured in the &#039;&#039;Source&#039;&#039; tab within the WebcamLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogWebcam&amp;lt;/code&amp;gt;   - Enables/Disables logging of Webcam states&lt;br /&gt;
*&amp;lt;code&amp;gt;CameraNumber&amp;lt;/code&amp;gt; - the webcam number for systems with multiple cameras, 0 for the default camera&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDecimation&amp;lt;/code&amp;gt;  - The decimation factor for saving and viewing video; the logger saves/displays every Nth frame.&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDateTimeLocation&amp;lt;/code&amp;gt; - The location of the date/time overlay in saved video (0: none, 1: UpperRight, 2: UpperLeft, 3: LowerRight, 4: LowerLeft).&lt;br /&gt;
&lt;br /&gt;
The video is saved with a resolution of 320x240 pixels. A parameter that allows configuration of the geometry will be provided in a future version.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
&lt;br /&gt;
===WebcamFrame===&lt;br /&gt;
The frame number of the video. This can be used to synchronize the video with the recorded neural data. It is a 24-bit value, allowing 16,777,216 frames before overflowing. If the webcam can capture at 30 frame/sec, and is decimated at a factor of 5 (i.e., 6 frames/sec), this allows more than a month of video before it will go back to frame 0. In other words, this should not be an issue for most users.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5902</id>
		<title>User Reference:gUSBampADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5902"/>
		<updated>2011-01-25T18:53:42Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* BipolarChList */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;gUSBampADC&#039;&#039; filter acquires data from any number (tested up to four) &#039;&#039;g.USBamp&#039;&#039; EEG amplifiers. &lt;br /&gt;
&#039;&#039;g.USBamp&#039;&#039; is an amplifier/digitizer combination from g.tec medical engineering GmbH/Guger Technologies OEG (http://www.gtec.at). &lt;br /&gt;
Support for this device in BCI2000 consists of two components: A BCI2000-compatible Source Module (&#039;&#039;gUSBamp.exe&#039;&#039;) and a &lt;br /&gt;
command-line tool (&#039;&#039;USBampgetinfo&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
===g.USBamp Hardware===&lt;br /&gt;
The USBamp consists of 16 independent 24-bit A/D converters that can sample at &lt;br /&gt;
up to 38.4kHz per channel. Because there is one A/D converter for each channel, &lt;br /&gt;
one particular sample is digitized at the exact same time for each channel. This &lt;br /&gt;
is unlike with traditional A/D converter boards that only have one A/D &lt;br /&gt;
converter. BCI2000 has a feature that can align samples in time (parameter &lt;br /&gt;
[[User Reference:AlignmentFilter#AlignChannels|AlignChannels]]).&lt;br /&gt;
Because this feature is not needed in conjunction with the USBamp, it needs to be turned off (i.e., &#039;&#039;AlignChannels&#039;&#039; needs to be 0).&lt;br /&gt;
&lt;br /&gt;
====Drivers====&lt;br /&gt;
With the release of the Version 3.0 g.USBamp, there is now a small problem with the gUSBamp.dll included in BCI2000.  The DLL included with BCI2000 was intended to be used with g.USBamp Version 2.0 hardware.  If Version 3.0 hardware is used with the current BCI2000 distribution, the gUSBampADC module will default to using the Version 2.0 DLL which will not function.&lt;br /&gt;
&lt;br /&gt;
Drivers come with the g.USBamp hardware - the correct drivers to match the version of the hardware.  If the installer is used to install the drivers for the g.USBamp, it will also place the g.USBamp DLL into your &amp;lt;tt&amp;gt;WINDOWS/system32&amp;lt;/tt&amp;gt; folder.  If the DLL in &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; is deleted, the DLL appropriate for use with your g.USBamp hardware should be used.&lt;br /&gt;
&lt;br /&gt;
In short, in order to make Version 3.0 amps work with the current BCI2000 distribution, simply delete the &amp;lt;tt&amp;gt;gUSBamp.dll&amp;lt;/tt&amp;gt; file from your &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
Here is a grid of what driver/amp/dll combinations work:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 2.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Works&lt;br /&gt;
|Works&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 3.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Works&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Parameters common to all source modules are described under [[User Reference:DataIOFilter]].&lt;br /&gt;
In addition, the &#039;&#039;gUSBampADC&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===DeviceIDMaster===&lt;br /&gt;
Serial number (e.g., UA-2007.01.01) of the master device. &lt;br /&gt;
If you only have one device, this parameter has to equal &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
If you have more then one device, then this parameter represents the serial number of the device whose SYNC goes to the slaves, i.e., the only device that has a cable connected at SYNC OUT, but none connected to SYNC IN. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===DeviceIDs===&lt;br /&gt;
List of serial numbers (e.g., UA-2007.01.01) of all devices.&lt;br /&gt;
If you have more than one device, this list determines the order of the channels in the data file. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===FilterEnabled===&lt;br /&gt;
Choose 1 if you want a pass band filter, and 0 if you don&#039;t.&lt;br /&gt;
The gUSBamp is a DC amplifier and thus you most likely will want a pass band filter.&lt;br /&gt;
Please note that, because the g.USBamp internally has a 5kHz antialiasing filter and always samples with 38.4kHz, you DO NOT need to enable any filter if you do not want.&lt;br /&gt;
You will never experience aliasing.&lt;br /&gt;
&lt;br /&gt;
===FilterHighPass===&lt;br /&gt;
High pass frequency for pass band. &lt;br /&gt;
You need to query the amp for possible values. &lt;br /&gt;
See description of the [[#The USBampgetinfo Command Line Tool|USBampgetinfo]] tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterLowPass===&lt;br /&gt;
Low pass frequency for pass band.&lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterModelOrder===&lt;br /&gt;
Model order for passband filter. &lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterType===&lt;br /&gt;
Type of passband filter:&lt;br /&gt;
* 1=CHEBYSHEV, &lt;br /&gt;
* 2=BUTTERWORTH.&lt;br /&gt;
&lt;br /&gt;
===NotchEnabled===&lt;br /&gt;
Choose 1 if you want a notch filter, and 0 if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
===NotchHighPass===&lt;br /&gt;
Similar to FilterHighPass.&lt;br /&gt;
&lt;br /&gt;
===NotchLowPass===&lt;br /&gt;
Similar to FilterLowPass.&lt;br /&gt;
&lt;br /&gt;
===NotchModelOrder===&lt;br /&gt;
Similar to FilterModelOrder.&lt;br /&gt;
&lt;br /&gt;
===NotchType===&lt;br /&gt;
Similar to FilterType.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 600 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) would be update 30 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sampling rate of all connected USBamps. &lt;br /&gt;
If one wants to use a bandpass or a notch filter, there needs to be a filter configuration for that particular sampling rate (see the section on the &#039;&#039;[USBampgetinfo]&#039;&#039; tool). (Guger Technologies can provide you with a new driver configuration file if you need a different filter.)&lt;br /&gt;
&lt;br /&gt;
The USBamp supports the following sampling rates: 32, 64, 128, 256, 512, 600, 1200, 2400, 4800, 9600, 19200, and 38400 Hz.  All sampling rates are supported for one or more amplifiers. If you are sampling at high rates and from multiple amplifiers, the CPU may be overloaded depending on the speed of your computer and the BCI2000 configuration. In case you are experiencing problems (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display. For example, at 38400 Hz, 4 amplifiers (64 channels), and a system update of 30 Hz, the computer would have to draw more than 73 million lines per second in the Source display!&lt;br /&gt;
&lt;br /&gt;
===SignalType===       &lt;br /&gt;
Defines the data type of the stored signal samples (int16 or float32).&lt;br /&gt;
If the data type is int16, signal samples (which are produced by the amplifier in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;) are converted back into virtual A/D units (see Data Storage section below). If the data type is float32, the signals are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
In this case, SourceChOffset should be 0, and SourceChGain should be&lt;br /&gt;
1 (since the conversion factor from &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is 1).&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of channels across all USBamp devices.&lt;br /&gt;
&lt;br /&gt;
===SourceChDevices===&lt;br /&gt;
The number of channels acquired from each device. &lt;br /&gt;
If there is only one device, this parameter has to equal &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
For example, &#039;16 8&#039; will acquire channels from the first device listed under &#039;&#039;DeviceIDs&#039;&#039;, and 8 channels from the second device listed under &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
Data acquisition always starts at channel 1.&lt;br /&gt;
The sum of all channels (e.g., 24 in this example) has to &lt;br /&gt;
equal the value of &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;. For more than one device, &#039;&#039;SourceChDevices&#039;&#039; determines how the &#039;&#039;SourceChList&#039;&#039; values are mapped to each device. For example if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8 8&#039; and &#039;&#039;SourceChList&#039;&#039; = &#039;1 2 3 4 13 14 15 16 5 6 7 8 9 10 11 12&#039;, then channels 1-4 and 13-16 will be acquired on the first device, and channels 5-12 will be acquired on the second device. These channels will be saved in the data file as 16 contiguous channels.&lt;br /&gt;
The order of channels does not matter; i.e., &#039;1 2 3 4&#039; is the same as &#039;2 3 1 4&#039;. The channels are always in ascending order on a single device.&lt;br /&gt;
Channels may not be listed twice on a single device; e.g., entering &#039;1 2 3 4 5 6 7 1&#039; if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8&#039; will result in an error.&lt;br /&gt;
If this parameter is left blank (the default), then all channels are acquired on all devices.&lt;br /&gt;
&lt;br /&gt;
===BipolarChList===&lt;br /&gt;
A list of channels used for a bipolar montage. Each entry is configured as the reference for a source channel, based on the channel order. The number of values should equal both &#039;&#039;SourceCh&#039;&#039; and the number of values in &#039;&#039;SourceChList&#039;&#039; (if &#039;&#039;SourceChList&#039;&#039; is not empty). If &#039;&#039;BipolarChList&#039;&#039; is empty, then the standard referential recording montage is used. If a value of &#039;0&#039; is entered, then the reference channel is used for that channel. Finally, channel labels may be used.&lt;br /&gt;
&lt;br /&gt;
As an example, a sequential bipolar montage for 8 channels could be configured like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;2 3 4 5 6 7 8 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
meaning that channel 1 is referenced to channel 2, channel 2 is referenced to channel 3, and so on. For another example, 10 channels can be configured so that the first 6 are bipolar, and the last four are referential, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;C3 F3 C4 F4 Pz Oz 0 0 0 0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DigitalInput===&lt;br /&gt;
Turn on digital input. &lt;br /&gt;
If turned on, the last sampled channel on each amplifier will contain sampled values of digital input 0 on the DIGITAL I/O input block on the back of the device.&lt;br /&gt;
For example, if &#039;&#039;SourceCh&#039;&#039; is 8, then channels 1-7 will represent analog inputs, and channel 8 will represent the digital input. &lt;br /&gt;
Thus, if DigitalInput is turned on, &#039;&#039;SourceCh&#039;&#039; and &#039;&#039;SourceChDevices&#039;&#039; may be a maximum of 17.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
Turn on digital output.&lt;br /&gt;
If turned on, the digital output channel 0 is set low for the duration of data acquisition, and set high at the end. This is primarily used for the BCI2000 Certification process, but may also be employed for other purposes, such as synchronizing acquisition with an external device.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputEx===&lt;br /&gt;
&#039;&#039;&#039;New in Version 3.0&#039;&#039;&#039;&lt;br /&gt;
If an expression is put here, digital output 1 will be set high whenever this expression evaluates true (nonzero) and low when the expression evaluates false (zero).  Boolean expressions work well for this ( ex. &amp;lt;tt&amp;gt;( ( StimulusCode == 0 ) &amp;amp;&amp;amp; Running )&amp;lt;/tt&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
===AcquisitionMode===&lt;br /&gt;
If set to &#039;&#039;analog signal acquisition&#039;&#039;, the g.USBamp records analog signal voltages (default). If set to &#039;&#039;Calibration&#039;&#039;, the signal output is a sine wave test signal generated by the g.USBamp (which can be used to verify correct system calibration). &lt;br /&gt;
If set to &#039;&#039;Impedance&#039;&#039;, regular analog signal acquisition is preceded by an impedance test. &lt;br /&gt;
This impedance test reports input impedances for each channel in kOhms. &lt;br /&gt;
In impedance mode, if the ground and reference is connected in the amp internally (using the &#039;&#039;CommonGround&#039;&#039; and &#039;&#039;CommonReference&#039;&#039; parameters), then you need to connect the ground and reference to block 4.&lt;br /&gt;
&lt;br /&gt;
===CommonGround===&lt;br /&gt;
This parameter determines whether the g.USBamp internally connects the GND inputs from all blocks together.&lt;br /&gt;
If enabled (default), then the signal ground only needs to be connected to one input block, e.g., block 1. &lt;br /&gt;
Otherwise, all GND inputs need to be externally connected.&lt;br /&gt;
&lt;br /&gt;
===CommonReference===&lt;br /&gt;
The same as &#039;&#039;CommonGround&#039;&#039;, except for the signal reference.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
Unlike other systems, the USBamp is a DC amplifier system that digitizes at 24 bit. &lt;br /&gt;
Bandpass and notch filtering is performed on the digitized samples, resulting in floating point signal samples in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
BCI2000 currently supports signed 16 bit integers and floating point numbers for its data storage.&lt;br /&gt;
If &#039;&#039;SignalType&#039;&#039; is set to int16, the floating point values have to be converted back into integers before they can be stored and transmitted to Signal Processing.&lt;br /&gt;
This is done by the following transformation: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathrm{sample}_\mathrm{stored}\mathrm{(A/D\,units)}=\frac{\mathrm{sample}_\mathrm{acquired}(\mu V)}\mathrm{SourceChGain}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;SourceChOffset&#039;&#039; is assumed (and required) to be zero for all channels.) &lt;br /&gt;
BCI2000 Signal Processing or any offline analysis routine can derive, as with &lt;br /&gt;
any other BCI2000 source module, sample values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; by subtracting, from &lt;br /&gt;
each stored sample, &#039;&#039;SourceChOffset&#039;&#039; (i.e., zero), and multiplying it with &lt;br /&gt;
&#039;&#039;SourceChGain&#039;&#039; for each channel. If &#039;&#039;SignalType&#039;&#039; is set to float32,&lt;br /&gt;
data samples are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;. In this case, &#039;&#039;SourceChGain&#039;&#039; should be&lt;br /&gt;
a list of 1&#039;s (because the conversion factor between data samples into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is&lt;br /&gt;
1.0 for each channel).&lt;br /&gt;
&lt;br /&gt;
Still, when values other than 0 and 1 are specified, a consistent data file will be produced, i.e. values will be transformed before they are written to the file, such that applying SourceChOffset and SourceChGain will reproduce the original values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;USBampgetinfo&#039;&#039; Command Line Tool===&lt;br /&gt;
This command line tool displays all connected USBamps, including their serial &lt;br /&gt;
number and the USB port that they connect to. Further, this tool reads, for the &lt;br /&gt;
first of the connected amplifiers, all supported bandpass and notch filter &lt;br /&gt;
configurations. Thus, this tool can be used to determine which filters can be &lt;br /&gt;
used for a particular sampling frequency within BCI2000. The following is an &lt;br /&gt;
example screen output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*******************************************&lt;br /&gt;
BCI2000 Information Tool for g.USBamp&lt;br /&gt;
*******************************************&lt;br /&gt;
(C)2004 Gerwin Schalk&lt;br /&gt;
	 Wadsworth Center&lt;br /&gt;
	 New York State Department of Health&lt;br /&gt;
	 Albany, NY, USA&lt;br /&gt;
*******************************************&lt;br /&gt;
Amp found at USB address 1 (S/N: UA-200X.XX.XX)&lt;br /&gt;
Printing info for first amp (USB address 1)&lt;br /&gt;
&lt;br /&gt;
Available bandpass filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000|  0.10 |    0.0 |   32 |  8 | 1&lt;br /&gt;
001|  1.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
002|  2.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
003|  5.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
004|  0.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
005|  0.01 |   15.0 |   32 |  8 | 1&lt;br /&gt;
006|  0.10 |   15.0 |   32 |  8 | 1&lt;br /&gt;
007|  0.50 |   15.0 |   32 |  8 | 1&lt;br /&gt;
008|  2.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
009|  0.10 |    0.0 |   64 |  8 | 1&lt;br /&gt;
010|  1.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
011|  2.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
012|  5.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
013|  0.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
014|  0.01 |   30.0 |   64 |  8 | 1&lt;br /&gt;
015|  0.10 |   30.0 |   64 |  8 | 1&lt;br /&gt;
016|  0.50 |   30.0 |   64 |  8 | 1&lt;br /&gt;
017|  2.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
018|  0.10 |    0.0 |  128 |  8 | 1&lt;br /&gt;
019|  1.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
020|  2.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
021|  5.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
022|  0.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
023|  0.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
024|  0.01 |   30.0 |  128 |  8 | 1&lt;br /&gt;
025|  0.01 |   60.0 |  128 |  8 | 1&lt;br /&gt;
026|  0.10 |   30.0 |  128 |  8 | 1&lt;br /&gt;
027|  0.10 |   60.0 |  128 |  8 | 1&lt;br /&gt;
028|  0.50 |   30.0 |  128 |  8 | 1&lt;br /&gt;
029|  0.50 |   60.0 |  128 |  8 | 1&lt;br /&gt;
030|  2.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
031|  2.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
032|  0.10 |    0.0 |  256 |  8 | 1&lt;br /&gt;
033|  1.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
034|  2.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
035|  5.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
036|  0.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
037|  0.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
038|  0.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
039|  0.01 |   30.0 |  256 |  6 | 1&lt;br /&gt;
040|  0.01 |   60.0 |  256 |  8 | 1&lt;br /&gt;
041|  0.01 |  100.0 |  256 |  8 | 1&lt;br /&gt;
042|  0.10 |   30.0 |  256 |  8 | 1&lt;br /&gt;
043|  0.10 |   60.0 |  256 |  8 | 1&lt;br /&gt;
044|  0.10 |  100.0 |  256 |  8 | 1&lt;br /&gt;
045|  0.50 |   30.0 |  256 |  8 | 1&lt;br /&gt;
046|  0.50 |   60.0 |  256 |  8 | 1&lt;br /&gt;
047|  0.50 |  100.0 |  256 |  8 | 1&lt;br /&gt;
048|  2.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
049|  2.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
050|  2.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
051|  5.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
052|  5.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
053|  5.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
054|  0.10 |    0.0 |  512 |  8 | 1&lt;br /&gt;
055|  1.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
056|  2.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
057|  5.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
058|  0.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
059|  0.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
060|  0.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
061|  0.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
062|  0.01 |   30.0 |  512 |  6 | 1&lt;br /&gt;
063|  0.01 |   60.0 |  512 |  6 | 1&lt;br /&gt;
064|  0.01 |  100.0 |  512 |  6 | 1&lt;br /&gt;
065|  0.01 |  200.0 |  512 |  8 | 1&lt;br /&gt;
066|  0.10 |   30.0 |  512 |  8 | 1&lt;br /&gt;
067|  0.10 |   60.0 |  512 |  8 | 1&lt;br /&gt;
068|  0.10 |  100.0 |  512 |  8 | 1&lt;br /&gt;
069|  0.10 |  200.0 |  512 |  8 | 1&lt;br /&gt;
070|  0.50 |   30.0 |  512 |  8 | 1&lt;br /&gt;
071|  0.50 |   60.0 |  512 |  8 | 1&lt;br /&gt;
072|  0.50 |  100.0 |  512 |  8 | 1&lt;br /&gt;
073|  0.50 |  200.0 |  512 |  8 | 1&lt;br /&gt;
074|  2.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
075|  2.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
076|  2.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
077|  2.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
078|  5.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
079|  5.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
080|  5.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
081|  5.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
082|  0.10 |    0.0 |  600 |  8 | 1&lt;br /&gt;
083|  1.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
084|  2.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
085|  5.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
086|  0.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
087|  0.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
088|  0.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
089|  0.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
090|  0.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
091|  0.01 |   60.0 |  600 |  6 | 1&lt;br /&gt;
092|  0.01 |  100.0 |  600 |  6 | 1&lt;br /&gt;
093|  0.01 |  200.0 |  600 |  6 | 1&lt;br /&gt;
094|  0.01 |  250.0 |  600 |  8 | 1&lt;br /&gt;
095|  0.10 |   60.0 |  600 |  8 | 1&lt;br /&gt;
096|  0.10 |  100.0 |  600 |  8 | 1&lt;br /&gt;
097|  0.10 |  200.0 |  600 |  8 | 1&lt;br /&gt;
098|  0.10 |  250.0 |  600 |  8 | 1&lt;br /&gt;
099|  0.50 |   30.0 |  600 |  8 | 1&lt;br /&gt;
100|  0.50 |   60.0 |  600 |  8 | 1&lt;br /&gt;
101|  0.50 |  100.0 |  600 |  8 | 1&lt;br /&gt;
102|  0.50 |  200.0 |  600 |  8 | 1&lt;br /&gt;
103|  0.50 |  250.0 |  600 |  8 | 1&lt;br /&gt;
104|  2.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
105|  2.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
106|  2.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
107|  2.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
108|  2.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
109|  5.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
110|  5.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
111|  5.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
112|  5.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
113|  5.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
114|  0.10 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
115|  1.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
116|  2.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
117|  5.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
118|  0.00 |   30.0 | 1200 |  8 | 1&lt;br /&gt;
119|  0.00 |   60.0 | 1200 |  8 | 1&lt;br /&gt;
120|  0.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
121|  0.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
122|  0.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
123|  0.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
124|  0.01 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
125|  0.01 |  200.0 | 1200 |  6 | 1&lt;br /&gt;
126|  0.01 |  250.0 | 1200 |  6 | 1&lt;br /&gt;
127|  0.01 |  500.0 | 1200 |  6 | 1&lt;br /&gt;
128|  0.10 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
129|  0.10 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
130|  0.10 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
131|  0.10 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
132|  0.50 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
133|  0.50 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
134|  0.50 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
135|  0.50 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
136|  2.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
137|  2.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
138|  2.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
139|  2.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
140|  5.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
141|  5.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
142|  5.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
143|  5.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
144|  0.10 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
145|  1.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
146|  2.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
147|  5.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
148|  0.00 |   30.0 | 2400 |  8 | 1&lt;br /&gt;
149|  0.00 |   60.0 | 2400 |  8 | 1&lt;br /&gt;
150|  0.00 |  100.0 | 2400 |  8 | 1&lt;br /&gt;
151|  0.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
152|  0.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
153|  0.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
154|  0.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
155|  0.01 |  200.0 | 2400 |  4 | 1&lt;br /&gt;
156|  0.01 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
157|  0.01 |  500.0 | 2400 |  6 | 1&lt;br /&gt;
158|  0.01 | 1000.0 | 2400 |  6 | 1&lt;br /&gt;
159|  0.10 |  200.0 | 2400 |  6 | 1&lt;br /&gt;
160|  0.10 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
161|  0.10 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
162|  0.10 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
163|  0.50 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
164|  0.50 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
165|  0.50 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
166|  0.50 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
167|  2.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
168|  2.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
169|  2.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
170|  2.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
171|  5.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
172|  5.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
173|  5.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
174|  5.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
175|  0.10 |    0.0 | 4800 |  6 | 1&lt;br /&gt;
176|  1.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
177|  2.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
178|  5.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
179|  0.00 |   30.0 | 4800 |  8 | 1&lt;br /&gt;
180|  0.00 |   60.0 | 4800 |  8 | 1&lt;br /&gt;
181|  0.00 |  100.0 | 4800 |  8 | 1&lt;br /&gt;
182|  0.00 |  200.0 | 4800 |  8 | 1&lt;br /&gt;
183|  0.00 |  250.0 | 4800 |  8 | 1&lt;br /&gt;
184|  0.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
185|  0.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
186|  0.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
187|  0.01 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
188|  0.01 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
189|  0.01 | 2000.0 | 4800 |  6 | 1&lt;br /&gt;
190|  0.10 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
191|  0.10 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
192|  0.10 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
193|  0.50 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
194|  0.50 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
195|  0.50 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
196|  2.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
197|  2.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
198|  2.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
199|  5.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
200|  5.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
201|  5.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
&lt;br /&gt;
Available notch filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000| 48.00 |   52.0 |  128 |  4 | 1&lt;br /&gt;
001| 58.00 |   62.0 |  128 |  4 | 1&lt;br /&gt;
002| 48.00 |   52.0 |  256 |  4 | 1&lt;br /&gt;
003| 58.00 |   62.0 |  256 |  4 | 1&lt;br /&gt;
004| 48.00 |   52.0 |  512 |  4 | 1&lt;br /&gt;
005| 58.00 |   62.0 |  512 |  4 | 1&lt;br /&gt;
006| 48.00 |   52.0 |  600 |  4 | 1&lt;br /&gt;
007| 58.00 |   62.0 |  600 |  4 | 1&lt;br /&gt;
008| 48.00 |   52.0 | 1200 |  4 | 1&lt;br /&gt;
009| 58.00 |   62.0 | 1200 |  4 | 1&lt;br /&gt;
010| 48.00 |   52.0 | 2400 |  4 | 1&lt;br /&gt;
011| 58.00 |   62.0 | 2400 |  4 | 1&lt;br /&gt;
012| 48.00 |   52.0 | 4800 |  4 | 1&lt;br /&gt;
013| 58.00 |   62.0 | 4800 |  4 | 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5901</id>
		<title>User Reference:gUSBampADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5901"/>
		<updated>2011-01-25T18:53:29Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* BipolarChList */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;gUSBampADC&#039;&#039; filter acquires data from any number (tested up to four) &#039;&#039;g.USBamp&#039;&#039; EEG amplifiers. &lt;br /&gt;
&#039;&#039;g.USBamp&#039;&#039; is an amplifier/digitizer combination from g.tec medical engineering GmbH/Guger Technologies OEG (http://www.gtec.at). &lt;br /&gt;
Support for this device in BCI2000 consists of two components: A BCI2000-compatible Source Module (&#039;&#039;gUSBamp.exe&#039;&#039;) and a &lt;br /&gt;
command-line tool (&#039;&#039;USBampgetinfo&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
===g.USBamp Hardware===&lt;br /&gt;
The USBamp consists of 16 independent 24-bit A/D converters that can sample at &lt;br /&gt;
up to 38.4kHz per channel. Because there is one A/D converter for each channel, &lt;br /&gt;
one particular sample is digitized at the exact same time for each channel. This &lt;br /&gt;
is unlike with traditional A/D converter boards that only have one A/D &lt;br /&gt;
converter. BCI2000 has a feature that can align samples in time (parameter &lt;br /&gt;
[[User Reference:AlignmentFilter#AlignChannels|AlignChannels]]).&lt;br /&gt;
Because this feature is not needed in conjunction with the USBamp, it needs to be turned off (i.e., &#039;&#039;AlignChannels&#039;&#039; needs to be 0).&lt;br /&gt;
&lt;br /&gt;
====Drivers====&lt;br /&gt;
With the release of the Version 3.0 g.USBamp, there is now a small problem with the gUSBamp.dll included in BCI2000.  The DLL included with BCI2000 was intended to be used with g.USBamp Version 2.0 hardware.  If Version 3.0 hardware is used with the current BCI2000 distribution, the gUSBampADC module will default to using the Version 2.0 DLL which will not function.&lt;br /&gt;
&lt;br /&gt;
Drivers come with the g.USBamp hardware - the correct drivers to match the version of the hardware.  If the installer is used to install the drivers for the g.USBamp, it will also place the g.USBamp DLL into your &amp;lt;tt&amp;gt;WINDOWS/system32&amp;lt;/tt&amp;gt; folder.  If the DLL in &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; is deleted, the DLL appropriate for use with your g.USBamp hardware should be used.&lt;br /&gt;
&lt;br /&gt;
In short, in order to make Version 3.0 amps work with the current BCI2000 distribution, simply delete the &amp;lt;tt&amp;gt;gUSBamp.dll&amp;lt;/tt&amp;gt; file from your &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
Here is a grid of what driver/amp/dll combinations work:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 2.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Works&lt;br /&gt;
|Works&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 3.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Works&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Parameters common to all source modules are described under [[User Reference:DataIOFilter]].&lt;br /&gt;
In addition, the &#039;&#039;gUSBampADC&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===DeviceIDMaster===&lt;br /&gt;
Serial number (e.g., UA-2007.01.01) of the master device. &lt;br /&gt;
If you only have one device, this parameter has to equal &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
If you have more then one device, then this parameter represents the serial number of the device whose SYNC goes to the slaves, i.e., the only device that has a cable connected at SYNC OUT, but none connected to SYNC IN. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===DeviceIDs===&lt;br /&gt;
List of serial numbers (e.g., UA-2007.01.01) of all devices.&lt;br /&gt;
If you have more than one device, this list determines the order of the channels in the data file. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===FilterEnabled===&lt;br /&gt;
Choose 1 if you want a pass band filter, and 0 if you don&#039;t.&lt;br /&gt;
The gUSBamp is a DC amplifier and thus you most likely will want a pass band filter.&lt;br /&gt;
Please note that, because the g.USBamp internally has a 5kHz antialiasing filter and always samples with 38.4kHz, you DO NOT need to enable any filter if you do not want.&lt;br /&gt;
You will never experience aliasing.&lt;br /&gt;
&lt;br /&gt;
===FilterHighPass===&lt;br /&gt;
High pass frequency for pass band. &lt;br /&gt;
You need to query the amp for possible values. &lt;br /&gt;
See description of the [[#The USBampgetinfo Command Line Tool|USBampgetinfo]] tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterLowPass===&lt;br /&gt;
Low pass frequency for pass band.&lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterModelOrder===&lt;br /&gt;
Model order for passband filter. &lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterType===&lt;br /&gt;
Type of passband filter:&lt;br /&gt;
* 1=CHEBYSHEV, &lt;br /&gt;
* 2=BUTTERWORTH.&lt;br /&gt;
&lt;br /&gt;
===NotchEnabled===&lt;br /&gt;
Choose 1 if you want a notch filter, and 0 if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
===NotchHighPass===&lt;br /&gt;
Similar to FilterHighPass.&lt;br /&gt;
&lt;br /&gt;
===NotchLowPass===&lt;br /&gt;
Similar to FilterLowPass.&lt;br /&gt;
&lt;br /&gt;
===NotchModelOrder===&lt;br /&gt;
Similar to FilterModelOrder.&lt;br /&gt;
&lt;br /&gt;
===NotchType===&lt;br /&gt;
Similar to FilterType.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 600 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) would be update 30 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sampling rate of all connected USBamps. &lt;br /&gt;
If one wants to use a bandpass or a notch filter, there needs to be a filter configuration for that particular sampling rate (see the section on the &#039;&#039;[USBampgetinfo]&#039;&#039; tool). (Guger Technologies can provide you with a new driver configuration file if you need a different filter.)&lt;br /&gt;
&lt;br /&gt;
The USBamp supports the following sampling rates: 32, 64, 128, 256, 512, 600, 1200, 2400, 4800, 9600, 19200, and 38400 Hz.  All sampling rates are supported for one or more amplifiers. If you are sampling at high rates and from multiple amplifiers, the CPU may be overloaded depending on the speed of your computer and the BCI2000 configuration. In case you are experiencing problems (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display. For example, at 38400 Hz, 4 amplifiers (64 channels), and a system update of 30 Hz, the computer would have to draw more than 73 million lines per second in the Source display!&lt;br /&gt;
&lt;br /&gt;
===SignalType===       &lt;br /&gt;
Defines the data type of the stored signal samples (int16 or float32).&lt;br /&gt;
If the data type is int16, signal samples (which are produced by the amplifier in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;) are converted back into virtual A/D units (see Data Storage section below). If the data type is float32, the signals are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
In this case, SourceChOffset should be 0, and SourceChGain should be&lt;br /&gt;
1 (since the conversion factor from &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is 1).&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of channels across all USBamp devices.&lt;br /&gt;
&lt;br /&gt;
===SourceChDevices===&lt;br /&gt;
The number of channels acquired from each device. &lt;br /&gt;
If there is only one device, this parameter has to equal &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
For example, &#039;16 8&#039; will acquire channels from the first device listed under &#039;&#039;DeviceIDs&#039;&#039;, and 8 channels from the second device listed under &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
Data acquisition always starts at channel 1.&lt;br /&gt;
The sum of all channels (e.g., 24 in this example) has to &lt;br /&gt;
equal the value of &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;. For more than one device, &#039;&#039;SourceChDevices&#039;&#039; determines how the &#039;&#039;SourceChList&#039;&#039; values are mapped to each device. For example if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8 8&#039; and &#039;&#039;SourceChList&#039;&#039; = &#039;1 2 3 4 13 14 15 16 5 6 7 8 9 10 11 12&#039;, then channels 1-4 and 13-16 will be acquired on the first device, and channels 5-12 will be acquired on the second device. These channels will be saved in the data file as 16 contiguous channels.&lt;br /&gt;
The order of channels does not matter; i.e., &#039;1 2 3 4&#039; is the same as &#039;2 3 1 4&#039;. The channels are always in ascending order on a single device.&lt;br /&gt;
Channels may not be listed twice on a single device; e.g., entering &#039;1 2 3 4 5 6 7 1&#039; if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8&#039; will result in an error.&lt;br /&gt;
If this parameter is left blank (the default), then all channels are acquired on all devices.&lt;br /&gt;
&lt;br /&gt;
===BipolarChList===&lt;br /&gt;
A list of channels used for a bipolar montage. Each entry is configured as the reference for a source channel, based on the channel order. The number of values should equal both &#039;&#039;SourceCh&#039;&#039; and the number of values in &#039;&#039;SourceChList&#039;&#039; (if &#039;&#039;SourceChList&#039;&#039; is not empty). If &#039;&#039;BipolarChList&#039;&#039; is empty, then the standard referential recording montage is used. If a value of &#039;0&#039; is entered, then the reference channel is used for that channel. Finally, channel labels may be used&lt;br /&gt;
&lt;br /&gt;
As an example, a sequential bipolar montage for 8 channels could be configured like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;2 3 4 5 6 7 8 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
meaning that channel 1 is referenced to channel 2, channel 2 is referenced to channel 3, and so on. For another example, 10 channels can be configured so that the first 6 are bipolar, and the last four are referential, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;C3 F3 C4 F4 Pz Oz 0 0 0 0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DigitalInput===&lt;br /&gt;
Turn on digital input. &lt;br /&gt;
If turned on, the last sampled channel on each amplifier will contain sampled values of digital input 0 on the DIGITAL I/O input block on the back of the device.&lt;br /&gt;
For example, if &#039;&#039;SourceCh&#039;&#039; is 8, then channels 1-7 will represent analog inputs, and channel 8 will represent the digital input. &lt;br /&gt;
Thus, if DigitalInput is turned on, &#039;&#039;SourceCh&#039;&#039; and &#039;&#039;SourceChDevices&#039;&#039; may be a maximum of 17.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
Turn on digital output.&lt;br /&gt;
If turned on, the digital output channel 0 is set low for the duration of data acquisition, and set high at the end. This is primarily used for the BCI2000 Certification process, but may also be employed for other purposes, such as synchronizing acquisition with an external device.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputEx===&lt;br /&gt;
&#039;&#039;&#039;New in Version 3.0&#039;&#039;&#039;&lt;br /&gt;
If an expression is put here, digital output 1 will be set high whenever this expression evaluates true (nonzero) and low when the expression evaluates false (zero).  Boolean expressions work well for this ( ex. &amp;lt;tt&amp;gt;( ( StimulusCode == 0 ) &amp;amp;&amp;amp; Running )&amp;lt;/tt&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
===AcquisitionMode===&lt;br /&gt;
If set to &#039;&#039;analog signal acquisition&#039;&#039;, the g.USBamp records analog signal voltages (default). If set to &#039;&#039;Calibration&#039;&#039;, the signal output is a sine wave test signal generated by the g.USBamp (which can be used to verify correct system calibration). &lt;br /&gt;
If set to &#039;&#039;Impedance&#039;&#039;, regular analog signal acquisition is preceded by an impedance test. &lt;br /&gt;
This impedance test reports input impedances for each channel in kOhms. &lt;br /&gt;
In impedance mode, if the ground and reference is connected in the amp internally (using the &#039;&#039;CommonGround&#039;&#039; and &#039;&#039;CommonReference&#039;&#039; parameters), then you need to connect the ground and reference to block 4.&lt;br /&gt;
&lt;br /&gt;
===CommonGround===&lt;br /&gt;
This parameter determines whether the g.USBamp internally connects the GND inputs from all blocks together.&lt;br /&gt;
If enabled (default), then the signal ground only needs to be connected to one input block, e.g., block 1. &lt;br /&gt;
Otherwise, all GND inputs need to be externally connected.&lt;br /&gt;
&lt;br /&gt;
===CommonReference===&lt;br /&gt;
The same as &#039;&#039;CommonGround&#039;&#039;, except for the signal reference.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
Unlike other systems, the USBamp is a DC amplifier system that digitizes at 24 bit. &lt;br /&gt;
Bandpass and notch filtering is performed on the digitized samples, resulting in floating point signal samples in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
BCI2000 currently supports signed 16 bit integers and floating point numbers for its data storage.&lt;br /&gt;
If &#039;&#039;SignalType&#039;&#039; is set to int16, the floating point values have to be converted back into integers before they can be stored and transmitted to Signal Processing.&lt;br /&gt;
This is done by the following transformation: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathrm{sample}_\mathrm{stored}\mathrm{(A/D\,units)}=\frac{\mathrm{sample}_\mathrm{acquired}(\mu V)}\mathrm{SourceChGain}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;SourceChOffset&#039;&#039; is assumed (and required) to be zero for all channels.) &lt;br /&gt;
BCI2000 Signal Processing or any offline analysis routine can derive, as with &lt;br /&gt;
any other BCI2000 source module, sample values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; by subtracting, from &lt;br /&gt;
each stored sample, &#039;&#039;SourceChOffset&#039;&#039; (i.e., zero), and multiplying it with &lt;br /&gt;
&#039;&#039;SourceChGain&#039;&#039; for each channel. If &#039;&#039;SignalType&#039;&#039; is set to float32,&lt;br /&gt;
data samples are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;. In this case, &#039;&#039;SourceChGain&#039;&#039; should be&lt;br /&gt;
a list of 1&#039;s (because the conversion factor between data samples into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is&lt;br /&gt;
1.0 for each channel).&lt;br /&gt;
&lt;br /&gt;
Still, when values other than 0 and 1 are specified, a consistent data file will be produced, i.e. values will be transformed before they are written to the file, such that applying SourceChOffset and SourceChGain will reproduce the original values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;USBampgetinfo&#039;&#039; Command Line Tool===&lt;br /&gt;
This command line tool displays all connected USBamps, including their serial &lt;br /&gt;
number and the USB port that they connect to. Further, this tool reads, for the &lt;br /&gt;
first of the connected amplifiers, all supported bandpass and notch filter &lt;br /&gt;
configurations. Thus, this tool can be used to determine which filters can be &lt;br /&gt;
used for a particular sampling frequency within BCI2000. The following is an &lt;br /&gt;
example screen output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*******************************************&lt;br /&gt;
BCI2000 Information Tool for g.USBamp&lt;br /&gt;
*******************************************&lt;br /&gt;
(C)2004 Gerwin Schalk&lt;br /&gt;
	 Wadsworth Center&lt;br /&gt;
	 New York State Department of Health&lt;br /&gt;
	 Albany, NY, USA&lt;br /&gt;
*******************************************&lt;br /&gt;
Amp found at USB address 1 (S/N: UA-200X.XX.XX)&lt;br /&gt;
Printing info for first amp (USB address 1)&lt;br /&gt;
&lt;br /&gt;
Available bandpass filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000|  0.10 |    0.0 |   32 |  8 | 1&lt;br /&gt;
001|  1.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
002|  2.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
003|  5.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
004|  0.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
005|  0.01 |   15.0 |   32 |  8 | 1&lt;br /&gt;
006|  0.10 |   15.0 |   32 |  8 | 1&lt;br /&gt;
007|  0.50 |   15.0 |   32 |  8 | 1&lt;br /&gt;
008|  2.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
009|  0.10 |    0.0 |   64 |  8 | 1&lt;br /&gt;
010|  1.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
011|  2.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
012|  5.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
013|  0.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
014|  0.01 |   30.0 |   64 |  8 | 1&lt;br /&gt;
015|  0.10 |   30.0 |   64 |  8 | 1&lt;br /&gt;
016|  0.50 |   30.0 |   64 |  8 | 1&lt;br /&gt;
017|  2.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
018|  0.10 |    0.0 |  128 |  8 | 1&lt;br /&gt;
019|  1.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
020|  2.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
021|  5.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
022|  0.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
023|  0.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
024|  0.01 |   30.0 |  128 |  8 | 1&lt;br /&gt;
025|  0.01 |   60.0 |  128 |  8 | 1&lt;br /&gt;
026|  0.10 |   30.0 |  128 |  8 | 1&lt;br /&gt;
027|  0.10 |   60.0 |  128 |  8 | 1&lt;br /&gt;
028|  0.50 |   30.0 |  128 |  8 | 1&lt;br /&gt;
029|  0.50 |   60.0 |  128 |  8 | 1&lt;br /&gt;
030|  2.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
031|  2.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
032|  0.10 |    0.0 |  256 |  8 | 1&lt;br /&gt;
033|  1.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
034|  2.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
035|  5.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
036|  0.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
037|  0.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
038|  0.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
039|  0.01 |   30.0 |  256 |  6 | 1&lt;br /&gt;
040|  0.01 |   60.0 |  256 |  8 | 1&lt;br /&gt;
041|  0.01 |  100.0 |  256 |  8 | 1&lt;br /&gt;
042|  0.10 |   30.0 |  256 |  8 | 1&lt;br /&gt;
043|  0.10 |   60.0 |  256 |  8 | 1&lt;br /&gt;
044|  0.10 |  100.0 |  256 |  8 | 1&lt;br /&gt;
045|  0.50 |   30.0 |  256 |  8 | 1&lt;br /&gt;
046|  0.50 |   60.0 |  256 |  8 | 1&lt;br /&gt;
047|  0.50 |  100.0 |  256 |  8 | 1&lt;br /&gt;
048|  2.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
049|  2.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
050|  2.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
051|  5.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
052|  5.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
053|  5.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
054|  0.10 |    0.0 |  512 |  8 | 1&lt;br /&gt;
055|  1.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
056|  2.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
057|  5.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
058|  0.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
059|  0.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
060|  0.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
061|  0.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
062|  0.01 |   30.0 |  512 |  6 | 1&lt;br /&gt;
063|  0.01 |   60.0 |  512 |  6 | 1&lt;br /&gt;
064|  0.01 |  100.0 |  512 |  6 | 1&lt;br /&gt;
065|  0.01 |  200.0 |  512 |  8 | 1&lt;br /&gt;
066|  0.10 |   30.0 |  512 |  8 | 1&lt;br /&gt;
067|  0.10 |   60.0 |  512 |  8 | 1&lt;br /&gt;
068|  0.10 |  100.0 |  512 |  8 | 1&lt;br /&gt;
069|  0.10 |  200.0 |  512 |  8 | 1&lt;br /&gt;
070|  0.50 |   30.0 |  512 |  8 | 1&lt;br /&gt;
071|  0.50 |   60.0 |  512 |  8 | 1&lt;br /&gt;
072|  0.50 |  100.0 |  512 |  8 | 1&lt;br /&gt;
073|  0.50 |  200.0 |  512 |  8 | 1&lt;br /&gt;
074|  2.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
075|  2.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
076|  2.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
077|  2.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
078|  5.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
079|  5.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
080|  5.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
081|  5.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
082|  0.10 |    0.0 |  600 |  8 | 1&lt;br /&gt;
083|  1.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
084|  2.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
085|  5.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
086|  0.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
087|  0.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
088|  0.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
089|  0.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
090|  0.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
091|  0.01 |   60.0 |  600 |  6 | 1&lt;br /&gt;
092|  0.01 |  100.0 |  600 |  6 | 1&lt;br /&gt;
093|  0.01 |  200.0 |  600 |  6 | 1&lt;br /&gt;
094|  0.01 |  250.0 |  600 |  8 | 1&lt;br /&gt;
095|  0.10 |   60.0 |  600 |  8 | 1&lt;br /&gt;
096|  0.10 |  100.0 |  600 |  8 | 1&lt;br /&gt;
097|  0.10 |  200.0 |  600 |  8 | 1&lt;br /&gt;
098|  0.10 |  250.0 |  600 |  8 | 1&lt;br /&gt;
099|  0.50 |   30.0 |  600 |  8 | 1&lt;br /&gt;
100|  0.50 |   60.0 |  600 |  8 | 1&lt;br /&gt;
101|  0.50 |  100.0 |  600 |  8 | 1&lt;br /&gt;
102|  0.50 |  200.0 |  600 |  8 | 1&lt;br /&gt;
103|  0.50 |  250.0 |  600 |  8 | 1&lt;br /&gt;
104|  2.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
105|  2.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
106|  2.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
107|  2.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
108|  2.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
109|  5.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
110|  5.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
111|  5.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
112|  5.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
113|  5.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
114|  0.10 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
115|  1.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
116|  2.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
117|  5.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
118|  0.00 |   30.0 | 1200 |  8 | 1&lt;br /&gt;
119|  0.00 |   60.0 | 1200 |  8 | 1&lt;br /&gt;
120|  0.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
121|  0.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
122|  0.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
123|  0.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
124|  0.01 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
125|  0.01 |  200.0 | 1200 |  6 | 1&lt;br /&gt;
126|  0.01 |  250.0 | 1200 |  6 | 1&lt;br /&gt;
127|  0.01 |  500.0 | 1200 |  6 | 1&lt;br /&gt;
128|  0.10 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
129|  0.10 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
130|  0.10 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
131|  0.10 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
132|  0.50 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
133|  0.50 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
134|  0.50 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
135|  0.50 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
136|  2.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
137|  2.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
138|  2.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
139|  2.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
140|  5.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
141|  5.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
142|  5.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
143|  5.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
144|  0.10 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
145|  1.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
146|  2.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
147|  5.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
148|  0.00 |   30.0 | 2400 |  8 | 1&lt;br /&gt;
149|  0.00 |   60.0 | 2400 |  8 | 1&lt;br /&gt;
150|  0.00 |  100.0 | 2400 |  8 | 1&lt;br /&gt;
151|  0.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
152|  0.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
153|  0.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
154|  0.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
155|  0.01 |  200.0 | 2400 |  4 | 1&lt;br /&gt;
156|  0.01 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
157|  0.01 |  500.0 | 2400 |  6 | 1&lt;br /&gt;
158|  0.01 | 1000.0 | 2400 |  6 | 1&lt;br /&gt;
159|  0.10 |  200.0 | 2400 |  6 | 1&lt;br /&gt;
160|  0.10 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
161|  0.10 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
162|  0.10 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
163|  0.50 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
164|  0.50 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
165|  0.50 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
166|  0.50 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
167|  2.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
168|  2.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
169|  2.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
170|  2.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
171|  5.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
172|  5.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
173|  5.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
174|  5.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
175|  0.10 |    0.0 | 4800 |  6 | 1&lt;br /&gt;
176|  1.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
177|  2.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
178|  5.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
179|  0.00 |   30.0 | 4800 |  8 | 1&lt;br /&gt;
180|  0.00 |   60.0 | 4800 |  8 | 1&lt;br /&gt;
181|  0.00 |  100.0 | 4800 |  8 | 1&lt;br /&gt;
182|  0.00 |  200.0 | 4800 |  8 | 1&lt;br /&gt;
183|  0.00 |  250.0 | 4800 |  8 | 1&lt;br /&gt;
184|  0.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
185|  0.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
186|  0.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
187|  0.01 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
188|  0.01 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
189|  0.01 | 2000.0 | 4800 |  6 | 1&lt;br /&gt;
190|  0.10 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
191|  0.10 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
192|  0.10 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
193|  0.50 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
194|  0.50 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
195|  0.50 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
196|  2.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
197|  2.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
198|  2.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
199|  5.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
200|  5.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
201|  5.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
&lt;br /&gt;
Available notch filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000| 48.00 |   52.0 |  128 |  4 | 1&lt;br /&gt;
001| 58.00 |   62.0 |  128 |  4 | 1&lt;br /&gt;
002| 48.00 |   52.0 |  256 |  4 | 1&lt;br /&gt;
003| 58.00 |   62.0 |  256 |  4 | 1&lt;br /&gt;
004| 48.00 |   52.0 |  512 |  4 | 1&lt;br /&gt;
005| 58.00 |   62.0 |  512 |  4 | 1&lt;br /&gt;
006| 48.00 |   52.0 |  600 |  4 | 1&lt;br /&gt;
007| 58.00 |   62.0 |  600 |  4 | 1&lt;br /&gt;
008| 48.00 |   52.0 | 1200 |  4 | 1&lt;br /&gt;
009| 58.00 |   62.0 | 1200 |  4 | 1&lt;br /&gt;
010| 48.00 |   52.0 | 2400 |  4 | 1&lt;br /&gt;
011| 58.00 |   62.0 | 2400 |  4 | 1&lt;br /&gt;
012| 48.00 |   52.0 | 4800 |  4 | 1&lt;br /&gt;
013| 58.00 |   62.0 | 4800 |  4 | 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5900</id>
		<title>User Reference:gUSBampADC</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gUSBampADC&amp;diff=5900"/>
		<updated>2011-01-25T18:52:34Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;gUSBampADC&#039;&#039; filter acquires data from any number (tested up to four) &#039;&#039;g.USBamp&#039;&#039; EEG amplifiers. &lt;br /&gt;
&#039;&#039;g.USBamp&#039;&#039; is an amplifier/digitizer combination from g.tec medical engineering GmbH/Guger Technologies OEG (http://www.gtec.at). &lt;br /&gt;
Support for this device in BCI2000 consists of two components: A BCI2000-compatible Source Module (&#039;&#039;gUSBamp.exe&#039;&#039;) and a &lt;br /&gt;
command-line tool (&#039;&#039;USBampgetinfo&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
===g.USBamp Hardware===&lt;br /&gt;
The USBamp consists of 16 independent 24-bit A/D converters that can sample at &lt;br /&gt;
up to 38.4kHz per channel. Because there is one A/D converter for each channel, &lt;br /&gt;
one particular sample is digitized at the exact same time for each channel. This &lt;br /&gt;
is unlike with traditional A/D converter boards that only have one A/D &lt;br /&gt;
converter. BCI2000 has a feature that can align samples in time (parameter &lt;br /&gt;
[[User Reference:AlignmentFilter#AlignChannels|AlignChannels]]).&lt;br /&gt;
Because this feature is not needed in conjunction with the USBamp, it needs to be turned off (i.e., &#039;&#039;AlignChannels&#039;&#039; needs to be 0).&lt;br /&gt;
&lt;br /&gt;
====Drivers====&lt;br /&gt;
With the release of the Version 3.0 g.USBamp, there is now a small problem with the gUSBamp.dll included in BCI2000.  The DLL included with BCI2000 was intended to be used with g.USBamp Version 2.0 hardware.  If Version 3.0 hardware is used with the current BCI2000 distribution, the gUSBampADC module will default to using the Version 2.0 DLL which will not function.&lt;br /&gt;
&lt;br /&gt;
Drivers come with the g.USBamp hardware - the correct drivers to match the version of the hardware.  If the installer is used to install the drivers for the g.USBamp, it will also place the g.USBamp DLL into your &amp;lt;tt&amp;gt;WINDOWS/system32&amp;lt;/tt&amp;gt; folder.  If the DLL in &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; is deleted, the DLL appropriate for use with your g.USBamp hardware should be used.&lt;br /&gt;
&lt;br /&gt;
In short, in order to make Version 3.0 amps work with the current BCI2000 distribution, simply delete the &amp;lt;tt&amp;gt;gUSBamp.dll&amp;lt;/tt&amp;gt; file from your &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
Here is a grid of what driver/amp/dll combinations work:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 2.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Works&lt;br /&gt;
|Works&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Version 3.0 amp&#039;&#039;&#039;&lt;br /&gt;
|2.0 DLL&lt;br /&gt;
|3.0 DLL&lt;br /&gt;
|-&lt;br /&gt;
|2.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|-&lt;br /&gt;
|3.0 Driver&lt;br /&gt;
|Does Not Work&lt;br /&gt;
|Works&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Parameters common to all source modules are described under [[User Reference:DataIOFilter]].&lt;br /&gt;
In addition, the &#039;&#039;gUSBampADC&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===DeviceIDMaster===&lt;br /&gt;
Serial number (e.g., UA-2007.01.01) of the master device. &lt;br /&gt;
If you only have one device, this parameter has to equal &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
If you have more then one device, then this parameter represents the serial number of the device whose SYNC goes to the slaves, i.e., the only device that has a cable connected at SYNC OUT, but none connected to SYNC IN. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===DeviceIDs===&lt;br /&gt;
List of serial numbers (e.g., UA-2007.01.01) of all devices.&lt;br /&gt;
If you have more than one device, this list determines the order of the channels in the data file. &lt;br /&gt;
If only one device is connected, this parameter may be set to &#039;&#039;auto&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===FilterEnabled===&lt;br /&gt;
Choose 1 if you want a pass band filter, and 0 if you don&#039;t.&lt;br /&gt;
The gUSBamp is a DC amplifier and thus you most likely will want a pass band filter.&lt;br /&gt;
Please note that, because the g.USBamp internally has a 5kHz antialiasing filter and always samples with 38.4kHz, you DO NOT need to enable any filter if you do not want.&lt;br /&gt;
You will never experience aliasing.&lt;br /&gt;
&lt;br /&gt;
===FilterHighPass===&lt;br /&gt;
High pass frequency for pass band. &lt;br /&gt;
You need to query the amp for possible values. &lt;br /&gt;
See description of the [[#The USBampgetinfo Command Line Tool|USBampgetinfo]] tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterLowPass===&lt;br /&gt;
Low pass frequency for pass band.&lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterModelOrder===&lt;br /&gt;
Model order for passband filter. &lt;br /&gt;
See description of the USBampgetinfo tool for more info.&lt;br /&gt;
&lt;br /&gt;
===FilterType===&lt;br /&gt;
Type of passband filter:&lt;br /&gt;
* 1=CHEBYSHEV, &lt;br /&gt;
* 2=BUTTERWORTH.&lt;br /&gt;
&lt;br /&gt;
===NotchEnabled===&lt;br /&gt;
Choose 1 if you want a notch filter, and 0 if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
===NotchHighPass===&lt;br /&gt;
Similar to FilterHighPass.&lt;br /&gt;
&lt;br /&gt;
===NotchLowPass===&lt;br /&gt;
Similar to FilterLowPass.&lt;br /&gt;
&lt;br /&gt;
===NotchModelOrder===&lt;br /&gt;
Similar to FilterModelOrder.&lt;br /&gt;
&lt;br /&gt;
===NotchType===&lt;br /&gt;
Similar to FilterType.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Samples per channel per digitized block. &lt;br /&gt;
Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 600 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) would be update 30 times per second.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The sampling rate of all connected USBamps. &lt;br /&gt;
If one wants to use a bandpass or a notch filter, there needs to be a filter configuration for that particular sampling rate (see the section on the &#039;&#039;[USBampgetinfo]&#039;&#039; tool). (Guger Technologies can provide you with a new driver configuration file if you need a different filter.)&lt;br /&gt;
&lt;br /&gt;
The USBamp supports the following sampling rates: 32, 64, 128, 256, 512, 600, 1200, 2400, 4800, 9600, 19200, and 38400 Hz.  All sampling rates are supported for one or more amplifiers. If you are sampling at high rates and from multiple amplifiers, the CPU may be overloaded depending on the speed of your computer and the BCI2000 configuration. In case you are experiencing problems (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications), and increase Visualize-&amp;gt;VisualizeSourceDecimation. This parameter will decrease the number of samples per second that are actually drawn in the Source display. For example, at 38400 Hz, 4 amplifiers (64 channels), and a system update of 30 Hz, the computer would have to draw more than 73 million lines per second in the Source display!&lt;br /&gt;
&lt;br /&gt;
===SignalType===       &lt;br /&gt;
Defines the data type of the stored signal samples (int16 or float32).&lt;br /&gt;
If the data type is int16, signal samples (which are produced by the amplifier in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;) are converted back into virtual A/D units (see Data Storage section below). If the data type is float32, the signals are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
In this case, SourceChOffset should be 0, and SourceChGain should be&lt;br /&gt;
1 (since the conversion factor from &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is 1).&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The total number of channels across all USBamp devices.&lt;br /&gt;
&lt;br /&gt;
===SourceChDevices===&lt;br /&gt;
The number of channels acquired from each device. &lt;br /&gt;
If there is only one device, this parameter has to equal &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
For example, &#039;16 8&#039; will acquire channels from the first device listed under &#039;&#039;DeviceIDs&#039;&#039;, and 8 channels from the second device listed under &#039;&#039;DeviceIDs&#039;&#039;.&lt;br /&gt;
Data acquisition always starts at channel 1.&lt;br /&gt;
The sum of all channels (e.g., 24 in this example) has to &lt;br /&gt;
equal the value of &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;. For more than one device, &#039;&#039;SourceChDevices&#039;&#039; determines how the &#039;&#039;SourceChList&#039;&#039; values are mapped to each device. For example if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8 8&#039; and &#039;&#039;SourceChList&#039;&#039; = &#039;1 2 3 4 13 14 15 16 5 6 7 8 9 10 11 12&#039;, then channels 1-4 and 13-16 will be acquired on the first device, and channels 5-12 will be acquired on the second device. These channels will be saved in the data file as 16 contiguous channels.&lt;br /&gt;
The order of channels does not matter; i.e., &#039;1 2 3 4&#039; is the same as &#039;2 3 1 4&#039;. The channels are always in ascending order on a single device.&lt;br /&gt;
Channels may not be listed twice on a single device; e.g., entering &#039;1 2 3 4 5 6 7 1&#039; if &#039;&#039;SourceChDevices&#039;&#039; = &#039;8&#039; will result in an error.&lt;br /&gt;
If this parameter is left blank (the default), then all channels are acquired on all devices.&lt;br /&gt;
&lt;br /&gt;
===BipolarChList===&lt;br /&gt;
A list of channels used for a bipolar montage. Each entry is configured as the reference for a source channel, based on the channel order. The number of values should equal both &#039;&#039;SourceCh&#039;&#039; and the number of values in &#039;&#039;SourceChList&#039;&#039; (if &#039;&#039;SourceChList&#039;&#039; is not empty). If &#039;&#039;BipolarChList&#039;&#039; is empty, then the standard referential recording montage is used. If a value of &#039;0&#039; is entered, then the reference channel is used for that channel.&lt;br /&gt;
&lt;br /&gt;
As an example, a sequential bipolar montage for 8 channels could be configured like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;2 3 4 5 6 7 8 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
meaning that channel 1 is referenced to channel 2, channel 2 is referenced to channel 3, and so on. For another example, 10 channels can be configured so that the first 6 are bipolar, and the last four are referential, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;2 3 4 5 6 1 0 0 0 0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DigitalInput===&lt;br /&gt;
Turn on digital input. &lt;br /&gt;
If turned on, the last sampled channel on each amplifier will contain sampled values of digital input 0 on the DIGITAL I/O input block on the back of the device.&lt;br /&gt;
For example, if &#039;&#039;SourceCh&#039;&#039; is 8, then channels 1-7 will represent analog inputs, and channel 8 will represent the digital input. &lt;br /&gt;
Thus, if DigitalInput is turned on, &#039;&#039;SourceCh&#039;&#039; and &#039;&#039;SourceChDevices&#039;&#039; may be a maximum of 17.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
Turn on digital output.&lt;br /&gt;
If turned on, the digital output channel 0 is set low for the duration of data acquisition, and set high at the end. This is primarily used for the BCI2000 Certification process, but may also be employed for other purposes, such as synchronizing acquisition with an external device.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputEx===&lt;br /&gt;
&#039;&#039;&#039;New in Version 3.0&#039;&#039;&#039;&lt;br /&gt;
If an expression is put here, digital output 1 will be set high whenever this expression evaluates true (nonzero) and low when the expression evaluates false (zero).  Boolean expressions work well for this ( ex. &amp;lt;tt&amp;gt;( ( StimulusCode == 0 ) &amp;amp;&amp;amp; Running )&amp;lt;/tt&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
===AcquisitionMode===&lt;br /&gt;
If set to &#039;&#039;analog signal acquisition&#039;&#039;, the g.USBamp records analog signal voltages (default). If set to &#039;&#039;Calibration&#039;&#039;, the signal output is a sine wave test signal generated by the g.USBamp (which can be used to verify correct system calibration). &lt;br /&gt;
If set to &#039;&#039;Impedance&#039;&#039;, regular analog signal acquisition is preceded by an impedance test. &lt;br /&gt;
This impedance test reports input impedances for each channel in kOhms. &lt;br /&gt;
In impedance mode, if the ground and reference is connected in the amp internally (using the &#039;&#039;CommonGround&#039;&#039; and &#039;&#039;CommonReference&#039;&#039; parameters), then you need to connect the ground and reference to block 4.&lt;br /&gt;
&lt;br /&gt;
===CommonGround===&lt;br /&gt;
This parameter determines whether the g.USBamp internally connects the GND inputs from all blocks together.&lt;br /&gt;
If enabled (default), then the signal ground only needs to be connected to one input block, e.g., block 1. &lt;br /&gt;
Otherwise, all GND inputs need to be externally connected.&lt;br /&gt;
&lt;br /&gt;
===CommonReference===&lt;br /&gt;
The same as &#039;&#039;CommonGround&#039;&#039;, except for the signal reference.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
Unlike other systems, the USBamp is a DC amplifier system that digitizes at 24 bit. &lt;br /&gt;
Bandpass and notch filtering is performed on the digitized samples, resulting in floating point signal samples in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
BCI2000 currently supports signed 16 bit integers and floating point numbers for its data storage.&lt;br /&gt;
If &#039;&#039;SignalType&#039;&#039; is set to int16, the floating point values have to be converted back into integers before they can be stored and transmitted to Signal Processing.&lt;br /&gt;
This is done by the following transformation: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathrm{sample}_\mathrm{stored}\mathrm{(A/D\,units)}=\frac{\mathrm{sample}_\mathrm{acquired}(\mu V)}\mathrm{SourceChGain}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;SourceChOffset&#039;&#039; is assumed (and required) to be zero for all channels.) &lt;br /&gt;
BCI2000 Signal Processing or any offline analysis routine can derive, as with &lt;br /&gt;
any other BCI2000 source module, sample values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; by subtracting, from &lt;br /&gt;
each stored sample, &#039;&#039;SourceChOffset&#039;&#039; (i.e., zero), and multiplying it with &lt;br /&gt;
&#039;&#039;SourceChGain&#039;&#039; for each channel. If &#039;&#039;SignalType&#039;&#039; is set to float32,&lt;br /&gt;
data samples are stored in units of &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;. In this case, &#039;&#039;SourceChGain&#039;&#039; should be&lt;br /&gt;
a list of 1&#039;s (because the conversion factor between data samples into &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt; is&lt;br /&gt;
1.0 for each channel).&lt;br /&gt;
&lt;br /&gt;
Still, when values other than 0 and 1 are specified, a consistent data file will be produced, i.e. values will be transformed before they are written to the file, such that applying SourceChOffset and SourceChGain will reproduce the original values in &amp;lt;math&amp;gt;\mu V&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;USBampgetinfo&#039;&#039; Command Line Tool===&lt;br /&gt;
This command line tool displays all connected USBamps, including their serial &lt;br /&gt;
number and the USB port that they connect to. Further, this tool reads, for the &lt;br /&gt;
first of the connected amplifiers, all supported bandpass and notch filter &lt;br /&gt;
configurations. Thus, this tool can be used to determine which filters can be &lt;br /&gt;
used for a particular sampling frequency within BCI2000. The following is an &lt;br /&gt;
example screen output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*******************************************&lt;br /&gt;
BCI2000 Information Tool for g.USBamp&lt;br /&gt;
*******************************************&lt;br /&gt;
(C)2004 Gerwin Schalk&lt;br /&gt;
	 Wadsworth Center&lt;br /&gt;
	 New York State Department of Health&lt;br /&gt;
	 Albany, NY, USA&lt;br /&gt;
*******************************************&lt;br /&gt;
Amp found at USB address 1 (S/N: UA-200X.XX.XX)&lt;br /&gt;
Printing info for first amp (USB address 1)&lt;br /&gt;
&lt;br /&gt;
Available bandpass filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000|  0.10 |    0.0 |   32 |  8 | 1&lt;br /&gt;
001|  1.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
002|  2.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
003|  5.00 |    0.0 |   32 |  8 | 1&lt;br /&gt;
004|  0.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
005|  0.01 |   15.0 |   32 |  8 | 1&lt;br /&gt;
006|  0.10 |   15.0 |   32 |  8 | 1&lt;br /&gt;
007|  0.50 |   15.0 |   32 |  8 | 1&lt;br /&gt;
008|  2.00 |   15.0 |   32 |  8 | 1&lt;br /&gt;
009|  0.10 |    0.0 |   64 |  8 | 1&lt;br /&gt;
010|  1.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
011|  2.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
012|  5.00 |    0.0 |   64 |  8 | 1&lt;br /&gt;
013|  0.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
014|  0.01 |   30.0 |   64 |  8 | 1&lt;br /&gt;
015|  0.10 |   30.0 |   64 |  8 | 1&lt;br /&gt;
016|  0.50 |   30.0 |   64 |  8 | 1&lt;br /&gt;
017|  2.00 |   30.0 |   64 |  8 | 1&lt;br /&gt;
018|  0.10 |    0.0 |  128 |  8 | 1&lt;br /&gt;
019|  1.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
020|  2.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
021|  5.00 |    0.0 |  128 |  8 | 1&lt;br /&gt;
022|  0.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
023|  0.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
024|  0.01 |   30.0 |  128 |  8 | 1&lt;br /&gt;
025|  0.01 |   60.0 |  128 |  8 | 1&lt;br /&gt;
026|  0.10 |   30.0 |  128 |  8 | 1&lt;br /&gt;
027|  0.10 |   60.0 |  128 |  8 | 1&lt;br /&gt;
028|  0.50 |   30.0 |  128 |  8 | 1&lt;br /&gt;
029|  0.50 |   60.0 |  128 |  8 | 1&lt;br /&gt;
030|  2.00 |   30.0 |  128 |  8 | 1&lt;br /&gt;
031|  2.00 |   60.0 |  128 |  8 | 1&lt;br /&gt;
032|  0.10 |    0.0 |  256 |  8 | 1&lt;br /&gt;
033|  1.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
034|  2.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
035|  5.00 |    0.0 |  256 |  8 | 1&lt;br /&gt;
036|  0.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
037|  0.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
038|  0.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
039|  0.01 |   30.0 |  256 |  6 | 1&lt;br /&gt;
040|  0.01 |   60.0 |  256 |  8 | 1&lt;br /&gt;
041|  0.01 |  100.0 |  256 |  8 | 1&lt;br /&gt;
042|  0.10 |   30.0 |  256 |  8 | 1&lt;br /&gt;
043|  0.10 |   60.0 |  256 |  8 | 1&lt;br /&gt;
044|  0.10 |  100.0 |  256 |  8 | 1&lt;br /&gt;
045|  0.50 |   30.0 |  256 |  8 | 1&lt;br /&gt;
046|  0.50 |   60.0 |  256 |  8 | 1&lt;br /&gt;
047|  0.50 |  100.0 |  256 |  8 | 1&lt;br /&gt;
048|  2.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
049|  2.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
050|  2.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
051|  5.00 |   30.0 |  256 |  8 | 1&lt;br /&gt;
052|  5.00 |   60.0 |  256 |  8 | 1&lt;br /&gt;
053|  5.00 |  100.0 |  256 |  8 | 1&lt;br /&gt;
054|  0.10 |    0.0 |  512 |  8 | 1&lt;br /&gt;
055|  1.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
056|  2.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
057|  5.00 |    0.0 |  512 |  8 | 1&lt;br /&gt;
058|  0.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
059|  0.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
060|  0.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
061|  0.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
062|  0.01 |   30.0 |  512 |  6 | 1&lt;br /&gt;
063|  0.01 |   60.0 |  512 |  6 | 1&lt;br /&gt;
064|  0.01 |  100.0 |  512 |  6 | 1&lt;br /&gt;
065|  0.01 |  200.0 |  512 |  8 | 1&lt;br /&gt;
066|  0.10 |   30.0 |  512 |  8 | 1&lt;br /&gt;
067|  0.10 |   60.0 |  512 |  8 | 1&lt;br /&gt;
068|  0.10 |  100.0 |  512 |  8 | 1&lt;br /&gt;
069|  0.10 |  200.0 |  512 |  8 | 1&lt;br /&gt;
070|  0.50 |   30.0 |  512 |  8 | 1&lt;br /&gt;
071|  0.50 |   60.0 |  512 |  8 | 1&lt;br /&gt;
072|  0.50 |  100.0 |  512 |  8 | 1&lt;br /&gt;
073|  0.50 |  200.0 |  512 |  8 | 1&lt;br /&gt;
074|  2.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
075|  2.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
076|  2.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
077|  2.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
078|  5.00 |   30.0 |  512 |  8 | 1&lt;br /&gt;
079|  5.00 |   60.0 |  512 |  8 | 1&lt;br /&gt;
080|  5.00 |  100.0 |  512 |  8 | 1&lt;br /&gt;
081|  5.00 |  200.0 |  512 |  8 | 1&lt;br /&gt;
082|  0.10 |    0.0 |  600 |  8 | 1&lt;br /&gt;
083|  1.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
084|  2.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
085|  5.00 |    0.0 |  600 |  8 | 1&lt;br /&gt;
086|  0.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
087|  0.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
088|  0.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
089|  0.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
090|  0.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
091|  0.01 |   60.0 |  600 |  6 | 1&lt;br /&gt;
092|  0.01 |  100.0 |  600 |  6 | 1&lt;br /&gt;
093|  0.01 |  200.0 |  600 |  6 | 1&lt;br /&gt;
094|  0.01 |  250.0 |  600 |  8 | 1&lt;br /&gt;
095|  0.10 |   60.0 |  600 |  8 | 1&lt;br /&gt;
096|  0.10 |  100.0 |  600 |  8 | 1&lt;br /&gt;
097|  0.10 |  200.0 |  600 |  8 | 1&lt;br /&gt;
098|  0.10 |  250.0 |  600 |  8 | 1&lt;br /&gt;
099|  0.50 |   30.0 |  600 |  8 | 1&lt;br /&gt;
100|  0.50 |   60.0 |  600 |  8 | 1&lt;br /&gt;
101|  0.50 |  100.0 |  600 |  8 | 1&lt;br /&gt;
102|  0.50 |  200.0 |  600 |  8 | 1&lt;br /&gt;
103|  0.50 |  250.0 |  600 |  8 | 1&lt;br /&gt;
104|  2.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
105|  2.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
106|  2.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
107|  2.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
108|  2.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
109|  5.00 |   30.0 |  600 |  8 | 1&lt;br /&gt;
110|  5.00 |   60.0 |  600 |  8 | 1&lt;br /&gt;
111|  5.00 |  100.0 |  600 |  8 | 1&lt;br /&gt;
112|  5.00 |  200.0 |  600 |  8 | 1&lt;br /&gt;
113|  5.00 |  250.0 |  600 |  8 | 1&lt;br /&gt;
114|  0.10 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
115|  1.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
116|  2.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
117|  5.00 |    0.0 | 1200 |  8 | 1&lt;br /&gt;
118|  0.00 |   30.0 | 1200 |  8 | 1&lt;br /&gt;
119|  0.00 |   60.0 | 1200 |  8 | 1&lt;br /&gt;
120|  0.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
121|  0.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
122|  0.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
123|  0.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
124|  0.01 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
125|  0.01 |  200.0 | 1200 |  6 | 1&lt;br /&gt;
126|  0.01 |  250.0 | 1200 |  6 | 1&lt;br /&gt;
127|  0.01 |  500.0 | 1200 |  6 | 1&lt;br /&gt;
128|  0.10 |  100.0 | 1200 |  6 | 1&lt;br /&gt;
129|  0.10 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
130|  0.10 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
131|  0.10 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
132|  0.50 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
133|  0.50 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
134|  0.50 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
135|  0.50 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
136|  2.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
137|  2.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
138|  2.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
139|  2.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
140|  5.00 |  100.0 | 1200 |  8 | 1&lt;br /&gt;
141|  5.00 |  200.0 | 1200 |  8 | 1&lt;br /&gt;
142|  5.00 |  250.0 | 1200 |  8 | 1&lt;br /&gt;
143|  5.00 |  500.0 | 1200 |  8 | 1&lt;br /&gt;
144|  0.10 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
145|  1.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
146|  2.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
147|  5.00 |    0.0 | 2400 |  8 | 1&lt;br /&gt;
148|  0.00 |   30.0 | 2400 |  8 | 1&lt;br /&gt;
149|  0.00 |   60.0 | 2400 |  8 | 1&lt;br /&gt;
150|  0.00 |  100.0 | 2400 |  8 | 1&lt;br /&gt;
151|  0.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
152|  0.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
153|  0.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
154|  0.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
155|  0.01 |  200.0 | 2400 |  4 | 1&lt;br /&gt;
156|  0.01 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
157|  0.01 |  500.0 | 2400 |  6 | 1&lt;br /&gt;
158|  0.01 | 1000.0 | 2400 |  6 | 1&lt;br /&gt;
159|  0.10 |  200.0 | 2400 |  6 | 1&lt;br /&gt;
160|  0.10 |  250.0 | 2400 |  6 | 1&lt;br /&gt;
161|  0.10 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
162|  0.10 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
163|  0.50 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
164|  0.50 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
165|  0.50 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
166|  0.50 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
167|  2.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
168|  2.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
169|  2.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
170|  2.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
171|  5.00 |  200.0 | 2400 |  8 | 1&lt;br /&gt;
172|  5.00 |  250.0 | 2400 |  8 | 1&lt;br /&gt;
173|  5.00 |  500.0 | 2400 |  8 | 1&lt;br /&gt;
174|  5.00 | 1000.0 | 2400 |  8 | 1&lt;br /&gt;
175|  0.10 |    0.0 | 4800 |  6 | 1&lt;br /&gt;
176|  1.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
177|  2.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
178|  5.00 |    0.0 | 4800 |  8 | 1&lt;br /&gt;
179|  0.00 |   30.0 | 4800 |  8 | 1&lt;br /&gt;
180|  0.00 |   60.0 | 4800 |  8 | 1&lt;br /&gt;
181|  0.00 |  100.0 | 4800 |  8 | 1&lt;br /&gt;
182|  0.00 |  200.0 | 4800 |  8 | 1&lt;br /&gt;
183|  0.00 |  250.0 | 4800 |  8 | 1&lt;br /&gt;
184|  0.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
185|  0.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
186|  0.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
187|  0.01 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
188|  0.01 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
189|  0.01 | 2000.0 | 4800 |  6 | 1&lt;br /&gt;
190|  0.10 |  500.0 | 4800 |  6 | 1&lt;br /&gt;
191|  0.10 | 1000.0 | 4800 |  6 | 1&lt;br /&gt;
192|  0.10 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
193|  0.50 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
194|  0.50 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
195|  0.50 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
196|  2.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
197|  2.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
198|  2.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
199|  5.00 |  500.0 | 4800 |  8 | 1&lt;br /&gt;
200|  5.00 | 1000.0 | 4800 |  8 | 1&lt;br /&gt;
201|  5.00 | 2000.0 | 4800 |  8 | 1&lt;br /&gt;
&lt;br /&gt;
Available notch filters&lt;br /&gt;
===================================&lt;br /&gt;
num| hpfr  | lpfreq |  sfr | or | type&lt;br /&gt;
===================================&lt;br /&gt;
000| 48.00 |   52.0 |  128 |  4 | 1&lt;br /&gt;
001| 58.00 |   62.0 |  128 |  4 | 1&lt;br /&gt;
002| 48.00 |   52.0 |  256 |  4 | 1&lt;br /&gt;
003| 58.00 |   62.0 |  256 |  4 | 1&lt;br /&gt;
004| 48.00 |   52.0 |  512 |  4 | 1&lt;br /&gt;
005| 58.00 |   62.0 |  512 |  4 | 1&lt;br /&gt;
006| 48.00 |   52.0 |  600 |  4 | 1&lt;br /&gt;
007| 58.00 |   62.0 |  600 |  4 | 1&lt;br /&gt;
008| 48.00 |   52.0 | 1200 |  4 | 1&lt;br /&gt;
009| 58.00 |   62.0 | 1200 |  4 | 1&lt;br /&gt;
010| 48.00 |   52.0 | 2400 |  4 | 1&lt;br /&gt;
011| 58.00 |   62.0 | 2400 |  4 | 1&lt;br /&gt;
012| 48.00 |   52.0 | 4800 |  4 | 1&lt;br /&gt;
013| 58.00 |   62.0 | 4800 |  4 | 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5732</id>
		<title>Contributions:FilePlayback</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5732"/>
		<updated>2010-07-06T14:10:49Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; filter allows previously recorded BCI2000 data to be &amp;quot;acquired&amp;quot; into BCI2000 as though it was acquired from an amplifier. This functionality could be useful for testing new algorithms, or generating screenshots or video captures after an experiment. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The number of digitized and stored channels that should be read from the file. This should be equal to or less than the &#039;&#039;SourceCh&#039;&#039;parameter in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
The number of samples transmitted at a time. This value does NOT need to match the value stored in the dat file. However, it should be noted that the timing of events during the file playback may change relative to the event timing in the saved file, particularly if the event timing is specified in blocks, and not seconds.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The data sampling rate. This must match the value in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;, and should be less than or equal to &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Speedup===&lt;br /&gt;
An integer factor indicating the acquisition speed. For example, if a value of &#039;&#039;2&#039;&#039; is specified, then the data will be read back twice as fast. Additionally, a value of &#039;&#039;0&#039;&#039; indicates that there should be no pause in-between blocks of data, and that the data should be acquired as quickly as possible. This playback speed will be limited by the processing capabilities of the computer, including the time required to read the data from the file, and to do any signal processing required by the SignalProcessing module.&lt;br /&gt;
&lt;br /&gt;
===FileName===&lt;br /&gt;
The path to the BCI2000 data file.&lt;br /&gt;
&lt;br /&gt;
===SuspendAtEnd===&lt;br /&gt;
This value indicates whether BCI2000 should Suspend at the end of the file, or if it should loop around to the beginning of the file.&lt;br /&gt;
&lt;br /&gt;
===StartTime===&lt;br /&gt;
The starting time of the file, allowing playback to begin in the middle of the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
As with any acquisition module, the acquired data will be saved in a new dat file. While this may be desired in some instances, it usually makes sense to disable writing the data, since the raw signal will be identical. Therefore, you can pass &amp;lt;code&amp;gt;--FileFormat=Null&amp;lt;/code&amp;gt; to prevent duplicate data being saved.&lt;br /&gt;
&lt;br /&gt;
===Random Sequences===&lt;br /&gt;
The Application module typically generates a random sequence of events, such as the target number in the cursor task, or the stimulus number in the stimulus presentation task. When playing back a file, there is no guarantee that the same sequence will be displayed during the playback as was stored in the file.&lt;br /&gt;
&lt;br /&gt;
However, BCI2000 allows a RandomSeed parameter to be specified, that will ensure that the same sequences are generated each time. To do so, pass &amp;lt;code&amp;gt;--RandomSeed=10&amp;lt;/code&amp;gt; to the Application module at the command line. Note, though, that the same seed must be used in both the original data file and the FilePlayback run. For more information on using this parameter, see &#039;&#039;&#039;Random Sequences&#039;&#039;&#039; in the [[User FAQ]].&lt;br /&gt;
&lt;br /&gt;
===Data Format===&lt;br /&gt;
The data is acquired from the file uncalibrated; therefore, it is still necessary to enter appropriate SourceChGain and SourceChOffset values for correct processing.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5730</id>
		<title>Contributions:FilePlayback</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5730"/>
		<updated>2010-07-06T13:39:30Z</updated>

		<summary type="html">&lt;p&gt;Awilson: User Reference:FilePlayback moved to Contributions:FilePlayback&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; filter allows previously recorded BCI2000 data to be &amp;quot;acquired&amp;quot; into BCI2000 as though it was acquired from an amplifier. This functionality could be useful for testing new algorithms, or generating screenshots or video captures after an experiment. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The number of digitized and stored channels that should be read from the file. This should be equal to or less than the &#039;&#039;SourceCh&#039;&#039;parameter in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
The number of samples transmitted at a time. This value does NOT need to match the value stored in the dat file. However, it should be noted that the timing of events during the file playback may change relative to the event timing in the saved file, particularly if the event timing is specified in blocks, and not seconds.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The data sampling rate. This must match the value in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;, and should be less than or equal to &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Speedup===&lt;br /&gt;
An integer factor indicating the acquisition speed. For example, if a value of &#039;&#039;2&#039;&#039; is specified, then the data will be read back twice as fast. Additionally, a value of &#039;&#039;0&#039;&#039; indicates that there should be no pause in-between blocks of data, and that the data should be acquired as quickly as possible. This playback speed will be limited by the processing capabilities of the computer, including the time required to read the data from the file, and to do any signal processing required by the SignalProcessing module.&lt;br /&gt;
&lt;br /&gt;
===FileName===&lt;br /&gt;
The path to the BCI2000 data file.&lt;br /&gt;
&lt;br /&gt;
===SuspendAtEnd===&lt;br /&gt;
This value indicates whether BCI2000 should Suspend at the end of the file, or if it should loop around to the beginning of the file.&lt;br /&gt;
&lt;br /&gt;
===StartTime===&lt;br /&gt;
The starting time of the file, allowing playback to begin in the middle of the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
As with any acquisition module, the acquired data will be saved in a new dat file. While this may be desired in some instances, it usually makes sense to disable writing the data, since the raw signal will be identical. Therefore, you can pass &amp;lt;code&amp;gt;--FileFormat=Null&amp;lt;/code&amp;gt; to prevent duplicate data being saved.&lt;br /&gt;
&lt;br /&gt;
===Data Format===&lt;br /&gt;
The data is acquired from the file uncalibrated; therefore, it is still necessary to enter appropriate SourceChGain and SourceChOffset values for correct processing.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5729</id>
		<title>Contributions:FilePlayback</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:FilePlayback&amp;diff=5729"/>
		<updated>2010-07-06T13:39:05Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Function==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; filter allows previously recorded BCI2000 data to be &amp;quot;acquired&amp;quot; into BCI2000 as though it was acquired from an amplifier. This functionality could be useful for testing new algorithms, or generating screenshots or video captures after an experiment. &lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The &#039;&#039;FilePlayback&#039;&#039; provides the following parameters:&lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The number of digitized and stored channels that should be read from the file. This should be equal to or less than the &#039;&#039;SourceCh&#039;&#039;parameter in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
The number of samples transmitted at a time. This value does NOT need to match the value stored in the dat file. However, it should be noted that the timing of events during the file playback may change relative to the event timing in the saved file, particularly if the event timing is specified in blocks, and not seconds.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
The data sampling rate. This must match the value in the dat file.&lt;br /&gt;
&lt;br /&gt;
===SourceChList===&lt;br /&gt;
The list of channels that should be acquired from each device.&lt;br /&gt;
The total number of channels listed should correspond to &#039;&#039;SourceCh&#039;&#039;, and should be less than or equal to &#039;&#039;SourceCh&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Speedup===&lt;br /&gt;
An integer factor indicating the acquisition speed. For example, if a value of &#039;&#039;2&#039;&#039; is specified, then the data will be read back twice as fast. Additionally, a value of &#039;&#039;0&#039;&#039; indicates that there should be no pause in-between blocks of data, and that the data should be acquired as quickly as possible. This playback speed will be limited by the processing capabilities of the computer, including the time required to read the data from the file, and to do any signal processing required by the SignalProcessing module.&lt;br /&gt;
&lt;br /&gt;
===FileName===&lt;br /&gt;
The path to the BCI2000 data file.&lt;br /&gt;
&lt;br /&gt;
===SuspendAtEnd===&lt;br /&gt;
This value indicates whether BCI2000 should Suspend at the end of the file, or if it should loop around to the beginning of the file.&lt;br /&gt;
&lt;br /&gt;
===StartTime===&lt;br /&gt;
The starting time of the file, allowing playback to begin in the middle of the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Additional Information==&lt;br /&gt;
&lt;br /&gt;
===Data Storage===&lt;br /&gt;
As with any acquisition module, the acquired data will be saved in a new dat file. While this may be desired in some instances, it usually makes sense to disable writing the data, since the raw signal will be identical. Therefore, you can pass &amp;lt;code&amp;gt;--FileFormat=Null&amp;lt;/code&amp;gt; to prevent duplicate data being saved.&lt;br /&gt;
&lt;br /&gt;
===Data Format===&lt;br /&gt;
The data is acquired from the file uncalibrated; therefore, it is still necessary to enter appropriate SourceChGain and SourceChOffset values for correct processing.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:DataIOFilter]], [[Programming Reference:GenericADC Class]]&lt;br /&gt;
[[Category:Filters]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5526</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5526"/>
		<updated>2010-02-13T02:08:25Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using a 16-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using 32 channels. (This tutorial assumes a 16-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Configuration: Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Configuration: Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Application&lt;br /&gt;
:The application that is run for the task. This will typically be &amp;lt;code&amp;gt;CursorTask&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3Speller&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Control: Global Settings====&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This value is overwritten by the Signal Source value set for individual tasks.&lt;br /&gt;
&lt;br /&gt;
;Data Output Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear relative to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;, or at a given absolute path. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
&lt;br /&gt;
;BCI2000 Directory&lt;br /&gt;
:This is the directory containing the BCI2000 program files, e.g., &amp;lt;code&amp;gt;C:\BCI2000\prog&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====4. Control: Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Auto Set Config&lt;br /&gt;
:Automatically press &#039;&#039;&#039;Set Config&#039;&#039;&#039; upon starting BCI2000. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Start&lt;br /&gt;
:Automatically start the test after Set Config is pressed. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Quit&lt;br /&gt;
:Automatically quit BCI2000 after each task. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Start/Cancel&lt;br /&gt;
:Starts the selected tasks. While running, this button changes to Cancel, which will stop the procedure after the current task finishes.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Output Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
;Progress&lt;br /&gt;
:The progress bar and text provide information about the current running task, and how many tasks remain.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button in the Tester will start the Analysis program. It is also possible to run the program in the BCI2000Certification directory by starting &amp;lt;code&amp;gt;BCI2000CertificationAnalysis.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this contents of this file will be opened automatically at the end of the process in a new window.&lt;br /&gt;
[[Image:Analysis03.PNG|frame|none|BCI2000 analysis results.]]&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5525</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5525"/>
		<updated>2010-02-13T02:07:10Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using a 16-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using 32 channels. (This tutorial assumes a 16-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Configuration: Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Configuration: Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Application&lt;br /&gt;
:The application that is run for the task. This will typically be &amp;lt;code&amp;gt;CursorTask&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3Speller&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Control: Global Settings====&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This value is overwritten by the Signal Source value set for individual tasks.&lt;br /&gt;
&lt;br /&gt;
;Data Output Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear relative to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;, or at a given absolute path. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
&lt;br /&gt;
;BCI2000 Directory&lt;br /&gt;
:This is the directory containing the BCI2000 program files, e.g., &amp;lt;code&amp;gt;C:\BCI2000\prog&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====4. Control: Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Auto Set Config&lt;br /&gt;
:Automatically press &#039;&#039;&#039;Set Config&#039;&#039;&#039; upon starting BCI2000. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Start&lt;br /&gt;
:Automatically start the test after Set Config is pressed. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Quit&lt;br /&gt;
:Automatically quit BCI2000 after each task. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Start/Cancel&lt;br /&gt;
:Starts the selected tasks. While running, this button changes to Cancel, which will stop the procedure after the current task finishes.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Output Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
;Progress&lt;br /&gt;
:The progress bar and text provide information about the current running task, and how many tasks remain.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button in the Tester will start the Analysis program. It is also possible to run the program in the BCI2000Certification directory by starting &amp;lt;code&amp;gt;BCI2000CertificationAnalysis.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this contents of this file will be opened automatically at the end of the process in a new window.&lt;br /&gt;
[[Image:Analysis03.PNG|frame|none|BCI2000 analysis results.]]&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Analysis03.PNG&amp;diff=5524</id>
		<title>File:Analysis03.PNG</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Analysis03.PNG&amp;diff=5524"/>
		<updated>2010-02-13T02:05:00Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5523</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5523"/>
		<updated>2010-02-13T02:04:45Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using a 16-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using 32 channels. (This tutorial assumes a 16-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Configuration: Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Configuration: Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Application&lt;br /&gt;
:The application that is run for the task. This will typically be &amp;lt;code&amp;gt;CursorTask&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3Speller&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Control: Global Settings====&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This value is overwritten by the Signal Source value set for individual tasks.&lt;br /&gt;
&lt;br /&gt;
;Data Output Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear relative to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;, or at a given absolute path. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
&lt;br /&gt;
;BCI2000 Directory&lt;br /&gt;
:This is the directory containing the BCI2000 program files, e.g., &amp;lt;code&amp;gt;C:\BCI2000\prog&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====4. Control: Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Auto Set Config&lt;br /&gt;
:Automatically press &#039;&#039;&#039;Set Config&#039;&#039;&#039; upon starting BCI2000. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Start&lt;br /&gt;
:Automatically start the test after Set Config is pressed. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Quit&lt;br /&gt;
:Automatically quit BCI2000 after each task. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Start/Cancel&lt;br /&gt;
:Starts the selected tasks. While running, this button changes to Cancel, which will stop the procedure after the current task finishes.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Output Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
;Progress&lt;br /&gt;
:The progress bar and text provide information about the current running task, and how many tasks remain.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button in the Tester will start the Analysis program. It is also possible to run the program in the BCI2000Certification directory by starting &amp;lt;code&amp;gt;BCI2000CertificationAnalysis.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5522</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5522"/>
		<updated>2010-02-13T02:01:29Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using a 16-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using 32 channels. (This tutorial assumes a 16-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Configuration: Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Configuration: Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Application&lt;br /&gt;
:The application that is run for the task. This will typically be &amp;lt;code&amp;gt;CursorTask&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3Speller&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Control: Global Settings====&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This value is overwritten by the Signal Source value set for individual tasks.&lt;br /&gt;
&lt;br /&gt;
;Data Output Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear relative to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;, or at a given absolute path. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
&lt;br /&gt;
;BCI2000 Directory&lt;br /&gt;
:This is the directory containing the BCI2000 program files, e.g., &amp;lt;code&amp;gt;C:\BCI2000\prog&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====4. Control: Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Auto Set Config&lt;br /&gt;
:Automatically press &#039;&#039;&#039;Set Config&#039;&#039;&#039; upon starting BCI2000. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Start&lt;br /&gt;
:Automatically start the test after Set Config is pressed. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Auto Quit&lt;br /&gt;
:Automatically quit BCI2000 after each task. This is required for complete automation of the procedure.&lt;br /&gt;
&lt;br /&gt;
;Start/Cancel&lt;br /&gt;
:Starts the selected tasks. While running, this button changes to Cancel, which will stop the procedure after the current task finishes.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Output Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
;Progress&lt;br /&gt;
:The progress bar and text provide information about the current running task, and how many tasks remain.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5521</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5521"/>
		<updated>2010-02-13T01:49:33Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Loading Configuration Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using a 16-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using 32 channels. (This tutorial assumes a 16-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5520</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5520"/>
		<updated>2010-02-13T01:48:17Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Starting the Tester User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
[[image:Tester02.PNG|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Tester02.PNG&amp;diff=5519</id>
		<title>File:Tester02.PNG</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Tester02.PNG&amp;diff=5519"/>
		<updated>2010-02-13T01:42:43Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5518</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5518"/>
		<updated>2010-02-13T01:40:09Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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 compiled automatically with the other BCI2000 programs. Compilation is only supported in BCI2000 v3.0 with the Visual Studio or MinGW compilers. Instructions can be found at [[Programming_Howto:Building_BCI2000]]&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the Tester User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000CertificationTester.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5452</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5452"/>
		<updated>2009-10-12T16:40:24Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png|frame|none|The BCI2000 analysis tool.]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5451</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5451"/>
		<updated>2009-10-12T16:39:38Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
[[Image:CertAnalysis.png]]&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:CertAnalysis.png&amp;diff=5450</id>
		<title>File:CertAnalysis.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:CertAnalysis.png&amp;diff=5450"/>
		<updated>2009-10-12T16:38:55Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5449</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5449"/>
		<updated>2009-10-12T16:35:48Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button to select the folder containing your data files. When you select the folder, all data files contained within its subfolders are added automatically.&lt;br /&gt;
## Select the *.ini file used for this session.&lt;br /&gt;
## The configuration file should be left as-is, i.e., as &amp;lt;code&amp;gt;BCI2000Certification.cfg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Finally, set the directory for the output file. Typically, this should be the same folder that contains all of the data files.&lt;br /&gt;
# When the parameters have been correctly configured, press &amp;quot;Run&amp;quot; to start the analysis, which can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5448</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5448"/>
		<updated>2009-10-12T16:32:01Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The appropriate folders and files must be entered for this session.&lt;br /&gt;
## Press the &amp;quot;+&amp;quot; button&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5447</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5447"/>
		<updated>2009-10-12T16:30:52Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file in the BCI2000Certification program prior to starting the analysis. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5446</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5446"/>
		<updated>2009-10-12T16:30:09Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will start the Analysis program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5445</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5445"/>
		<updated>2009-10-12T16:29:31Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Using the BCI2000Certification Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# If using more than 16 channels, then the amplifier parameter files must be modified.&lt;br /&gt;
## Navigate to &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms/&amp;lt;/code&amp;gt;, and open the file &amp;lt;code&amp;gt;Certification_gUSBamp_24.prm&amp;lt;/code&amp;gt; in Notepad.&lt;br /&gt;
## Find the parameter titled &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;, and replace the existing device ID (e.g., &amp;lt;code&amp;gt;UA-2007.04.12&amp;lt;/code&amp;gt; with the ID of your master device.&lt;br /&gt;
## Next, find the parameter titled &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;, and replace the IDs with the IDs of your amplifiers. The first in the list should be identical to the &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; value. For example, you might enter: &amp;lt;code&amp;gt;DeviceIDs= 2 UA-2007.04.12 UA-2006.10.13&amp;lt;/code&amp;gt; (the \#2 corresponds to the number of devices being used).&lt;br /&gt;
## Repeat these steps for the file &amp;lt;code&amp;gt;Certification_gUSBamp_32.prm&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Note that these steps are not necessary if only one g.USBamp is being used.&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process can take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
*&amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; assumes BCI2000 path is &amp;lt;tt&amp;gt;C:\BCI2000\&amp;lt;/tt&amp;gt;.  Please set your BCI2000 path to this.&lt;br /&gt;
*Parameter files for gUSBamp with channels greater than 16 have pre-defined amplifier IDs.  Please set these to your amplifier IDs.&lt;br /&gt;
*BCI2000Certification runs BCI2000 applications from the working directory: &amp;lt;tt&amp;gt;C:\BCI2000\tools\BCI2000Certification&amp;lt;/tt&amp;gt;. The images folder there doesn&#039;t contain all required images for &amp;lt;tt&amp;gt;CursorTask&amp;lt;/tt&amp;gt; or a sounds folder for &amp;quot;StimulusPresentation&amp;quot;.  If necessary, paste the images and sounds folder from the &amp;lt;tt&amp;gt;BCI2000/prog&amp;lt;/tt&amp;gt; directory into the &amp;lt;tt&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/tt&amp;gt; directory - overwriting what is currently in that directory.&lt;br /&gt;
*Removing tasks from BCI2000 Certification using the &amp;quot;-&amp;quot; button causes an access violation.  This does not affect program execution, and can be safely ignored.&lt;br /&gt;
*If you change the global Signal Source in the GUI, it isn&#039;t saved into .ini file.  This can be easily changed using a text editor and manually editing the .ini&lt;br /&gt;
*Older versions of &amp;lt;tt&amp;gt;BCI2000_Certification&amp;lt;/tt&amp;gt; required the Borland runtime.  This has since been fixed.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5277</id>
		<title>User Tutorial:Obtaining P300 Parameters in a Calibration Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5277"/>
		<updated>2009-09-02T18:34:00Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Creating a subject-specific parameter file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Obtaining P300 Parameters in the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
Although the basic properties of the P300 evoked potential are the same for all individuals, the response&#039;s latency, width, and spatial pattern varies, and adaptation to individual parameters improves accuracy.&lt;br /&gt;
&lt;br /&gt;
Thus, it is necessary to obtain these individual parameters prior to performing spelling experiments.&lt;br /&gt;
&lt;br /&gt;
==Design of Calibration Session==&lt;br /&gt;
&lt;br /&gt;
During the calibration session, the subject is asked to spell out a given word by using a P300 character matrix, pictured below. During each run, the subject is asked to focus on the next letter in the word he is spelling, as the rows and columns flash randomly and successively so that sometimes the flashing corresponds to the column or row containing the target character and sometimes it will not. As the subject counts the number of times the desired letter in the word flashes, a P300 response is generated. The purpose of the calibration session is to identify those features that discriminate between the desired and undesired rows/columns. &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMatrix.PNG|298px]]&lt;br /&gt;
&lt;br /&gt;
After the first few runs are collected, an analysis tool will be used to generate a configuration file with weights that will determine what portions of the input data correspond to selecting the desired letter. These weights are applied to the configuration session for one more run, and then the data from this run is also analyzed with the analysis tool, and the number of flashes needed to ensure 100% accuracy is determined. This second configuration file constitutes the final set of parameters, and is saved as that subject&#039;s parameter file for future spelling sessions.&lt;br /&gt;
&lt;br /&gt;
==Performing the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
*Start BCI2000 by running &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Press &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the baseline parameters for copy spelling that you made earlier.&lt;br /&gt;
*In the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;SubjectName&#039;&#039; to the subject&#039;s initials.&lt;br /&gt;
**Set &#039;&#039;SubjectSession&#039;&#039; to &amp;lt;tt&amp;gt;001&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Set &#039;&#039;SubjectRun&#039;&#039; to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;&lt;br /&gt;
*In the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Make sure that &#039;&#039;InterpretMode&#039;&#039; is set to &amp;lt;tt&amp;gt;copy mode&amp;lt;/tt&amp;gt;, and &#039;&#039;DisplayResults&#039;&#039; (directly below InterpretMode) is unchecked&lt;br /&gt;
**Find the &#039;&#039;TextToSpell&#039;&#039; field. This should be set to ‘THE’, and you will be changing it after each run. &lt;br /&gt;
*Press &#039;&#039;&#039;Set Config&#039;&#039;&#039; to apply this configuration.&lt;br /&gt;
&lt;br /&gt;
*Request that the subject sit in a relaxed position, and that the subject not move or speak during the runs.&lt;br /&gt;
*Turning off or dimming the lights can improve the subject&#039;s focus and performance.&lt;br /&gt;
*Showing the brain wave readouts to the subject can help understanding how artifact-generating behavior can be detrimental to the data.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to show the flashing character matrix, and describe what the subject is expected to do.&lt;br /&gt;
*After you’ve explained the procedure, click &#039;&#039;&#039;Suspend&#039;&#039;&#039; to stop.&lt;br /&gt;
*Delete that run of data (the file will be found at &amp;lt;tt&amp;gt;data\P300\&amp;lt;Subject Initials&amp;gt;001\&amp;lt;Subject Initials&amp;gt;S001R01.dat&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;QUICK&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;BROWN&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;FOX&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once this recording has finished, close BCI2000 and locate the saved data files below the BCI2000 &amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==Analyzing The Calibration Session with Offline Analysis==&lt;br /&gt;
We will now perform an ‘Offline Analysis’ with a tool that is provided with BCI2000.&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
[[Image:OfflineGUI.PNG|right]]&lt;br /&gt;
*In the &#039;&#039;Analysis Domain&#039;&#039; field, choose &#039;&#039;&#039;Time (P300)&#039;&#039;&#039;&lt;br /&gt;
*In the &#039;&#039;Acquisition Type&#039;&#039; field, choose &#039;&#039;&#039;EEG&#039;&#039;&#039;&lt;br /&gt;
*Next to &#039;&#039;Spatial Filter&#039;&#039;, choose &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;&lt;br /&gt;
*For &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 1)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Attended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Attended Stimuli’ refers to the letter or character the person is counting the flashes of, and triggers when the desired letter is flashed&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 0)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Unattended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Unattended stimulus’ refers to the letters or characters the person is not counting the flashes of, and triggers when the desired letter is not flashed &lt;br /&gt;
*Click the &#039;&#039;&#039;Add&#039;&#039;&#039; button by &#039;&#039;Data Files&#039;&#039;&lt;br /&gt;
*In this new dialog, select all of the data files taken during this configuration session, and click &#039;&#039;&#039;Open&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; and wait for the feature plot to appear&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|height=160px|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:FeaturesPlot.PNG|right|500px]]&lt;br /&gt;
&lt;br /&gt;
*When this is complete, you will see a feature plot similar to the one to the right. The vertical axis corresponds to the locations while the horizontal corresponds to the time delay after the stimulus. The color coding shows the r-squared value of that datapoint, with dark red colors indicating a high predictability that a response is produced by the desired letter being flashed.&lt;br /&gt;
*The largest of these r-squared values between 250 and 550ms are what we are interested in. Pick the 4 points with the largest r-squared values between these times and record their time points and channels. The plot’s &#039;&#039;Data Cursor&#039;&#039; tool (Tools Menu &amp;amp;rarr; Data Cursor) allows for discrete identification of time points.&lt;br /&gt;
&lt;br /&gt;
*With these four points, close the feature plot, and enter the channel numbers of the data points you found into the &#039;&#039;Waveform Channels&#039;&#039; field and the time points into the &#039;&#039;Topo Times&#039;&#039; field.&lt;br /&gt;
**In the example above, the four best data points have r-squared values &amp;lt;tt&amp;gt;0.02218&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.02179&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.01928&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;0.019&amp;lt;/tt&amp;gt;, occur at times &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;392.6ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;384.8ms&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;365.2ms&amp;lt;/tt&amp;gt; respectively, and all four are located in channel six. &amp;lt;tt&amp;gt;6, 6, 6, 6&amp;lt;/tt&amp;gt; would be entered into &#039;&#039;Waveform Channels&#039;&#039; and &amp;lt;tt&amp;gt;388.7, 392.6, 384.8, 365.2&amp;lt;/tt&amp;gt; would be entered into the &#039;&#039;Topo Times&#039;&#039; field. The order of the data points here does not matter, only that they are in the same order in both fields.&lt;br /&gt;
**If there are less than four points that seem appropriate, either because they are at the wrong electrodes, at the wrong times, or simply have too low of an r-squared value, that is fine, three or two values can work, though the fewer values used the lower the accuracy will be.&lt;br /&gt;
**Additionally, it may be helpful to re-run the analysis by setting the &#039;&#039;Spatial Filter&#039;&#039; to &#039;&#039;&#039;None&#039;&#039;&#039;, particularly when few channels are used.&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; to create the features plot again with a set of four graphs that show the correlation between the selected times after the desired stimulus is given (the red line) and the brain’s responses to when the desired stimulus is not given (the blue line).&lt;br /&gt;
**As seen below, the attended-stimulus reaction will typically be stronger than for the unattended stimuli, but in some cases the reverse is true. If the ‘unattended’ curve is larger than the ‘attended’ curve then make a note of this before moving on. The waveform seen here is similar to the others generated, only one is shown here for simplicity.&lt;br /&gt;
**Additionally before moving on, determine the location of the response seen. The P300 response is generally observed centered on the Cz electrode, or just behind and directly in between the ears, and does not involve the frontal regions of the brain. Assuming these characteristics are present, it is proper to proceed.&lt;br /&gt;
&lt;br /&gt;
[[Image:Waveform.PNG|center|800px]]&lt;br /&gt;
&lt;br /&gt;
==Creating a subject-specific parameter file==&lt;br /&gt;
Now we will save these customizations to a subject-specific parameter file that will allow the subject to free-spell with very high accuracy.&lt;br /&gt;
*Start BCI2000 using &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt; file&lt;br /&gt;
*Click &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the configuration file you saved previously&lt;br /&gt;
*Under the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab, set the &#039;&#039;SubjectSession&#039;&#039; parameter to &amp;quot;002&amp;quot;, and the &#039;&#039;&#039;SubjectName&#039;&#039;&#039; parameter to the subject&#039;s initials.&lt;br /&gt;
*Under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab, click the &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; button by &#039;&#039;Classifier&#039;&#039; near the bottom&lt;br /&gt;
*Change this matrix to have 4 columns and as many rows as values you are using, and click &#039;&#039;&#039;Set New Matrix Size&#039;&#039;&#039;&lt;br /&gt;
**In the first column, labeled &#039;&#039;Input Channel&#039;&#039;, enter the channel of the first value you use&lt;br /&gt;
**In the second column, labeled &#039;&#039;Input Element (bin)&#039;&#039;, enter the time of the best classification, immediately followed with &amp;lt;tt&amp;gt;ms&amp;lt;/tt&amp;gt;, as in &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;&lt;br /&gt;
**In the third column, enter 1 as the output channel&lt;br /&gt;
**In the fourth column, enter 1 if the &#039;&#039;Attended&#039;&#039; line was larger than the &#039;&#039;Unattended&#039;&#039; line, -1 if the &#039;&#039;unattended&#039;&#039; line was larger than the &#039;&#039;attended&#039;&#039; line&lt;br /&gt;
**Repeat these steps for the remaining rows, and close the matrix when finished&lt;br /&gt;
* If a &#039;&#039;&#039;Common Average Reference&#039;&#039;&#039; was used in the analysis, under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab change the &#039;&#039;&#039;SpatialFilterType&#039;&#039;&#039; parameter to &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;; otherwise, leave it as &#039;&#039;&#039;None&#039;&#039;&#039;.&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039; to save this file, naming it however you deem fit&lt;br /&gt;
*Use this new parameter file to repeat the configuration session and data analysis a few times, adding new rows to the classifier matrix each time for new data points to be utilized.&lt;br /&gt;
*When accuracy is reliably above 90%, click &#039;&#039;&#039;Config,&#039;&#039;&#039; and click on the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Delete the contents of the &#039;&#039;Text to Spell&#039;&#039; field&lt;br /&gt;
**Set &#039;&#039;InterpretMode&#039;&#039; &amp;amp;rarr; &amp;lt;tt&amp;gt;online free mode&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Make sure the &#039;&#039;DisplayResults&#039;&#039; box is checked&lt;br /&gt;
**Click on &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; next to &#039;&#039;TargetDefinitions&#039;&#039; and scroll to the bottom:&lt;br /&gt;
***In the first column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BS&amp;lt;/tt&amp;gt; (for &amp;quot;BackSpace&amp;quot;)&lt;br /&gt;
***In the second column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;&amp;lt;BS&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039;, and change the &amp;lt;tt&amp;gt;copy_spell&amp;lt;/tt&amp;gt; portion of this parameter file name to &amp;lt;tt&amp;gt;free_spell&amp;lt;/tt&amp;gt;&lt;br /&gt;
*This parameter file is now ready to use for that specific subject for future P300 spelling experiments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One program contributed to, and provided with, the BCI2000 system is the P300 GUI. This Matlab-based program automatically sifts through data files for datapoints indicative of a positive P300 reaction, and builds a classifier matrix with those datapoints. The largest benefit to using this program is the obviated need for repeated configuration sessions, at the expense of decreased hands-on experience with the BCI2000 program itself. For a tutorial on how to perform the offline analysis with this GUI program, [[User Tutorial:P300 GUI for Offline Analysis Tutorial|please click here]].&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
To continue onto performing P300 spelling experiments, continue to [[User Tutorial:Performing a P300 Spelling Session|Performing a P300 Spelling Session]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:P300 BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5276</id>
		<title>User Tutorial:Obtaining P300 Parameters in a Calibration Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5276"/>
		<updated>2009-09-02T17:12:26Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Creating a subject-specific parameter file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Obtaining P300 Parameters in the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
Although the basic properties of the P300 evoked potential are the same for all individuals, the response&#039;s latency, width, and spatial pattern varies, and adaptation to individual parameters improves accuracy.&lt;br /&gt;
&lt;br /&gt;
Thus, it is necessary to obtain these individual parameters prior to performing spelling experiments.&lt;br /&gt;
&lt;br /&gt;
==Design of Calibration Session==&lt;br /&gt;
&lt;br /&gt;
During the calibration session, the subject is asked to spell out a given word by using a P300 character matrix, pictured below. During each run, the subject is asked to focus on the next letter in the word he is spelling, as the rows and columns flash randomly and successively so that sometimes the flashing corresponds to the column or row containing the target character and sometimes it will not. As the subject counts the number of times the desired letter in the word flashes, a P300 response is generated. The purpose of the calibration session is to identify those features that discriminate between the desired and undesired rows/columns. &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMatrix.PNG|298px]]&lt;br /&gt;
&lt;br /&gt;
After the first few runs are collected, an analysis tool will be used to generate a configuration file with weights that will determine what portions of the input data correspond to selecting the desired letter. These weights are applied to the configuration session for one more run, and then the data from this run is also analyzed with the analysis tool, and the number of flashes needed to ensure 100% accuracy is determined. This second configuration file constitutes the final set of parameters, and is saved as that subject&#039;s parameter file for future spelling sessions.&lt;br /&gt;
&lt;br /&gt;
==Performing the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
*Start BCI2000 by running &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Press &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the baseline parameters for copy spelling that you made earlier.&lt;br /&gt;
*In the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;SubjectName&#039;&#039; to the subject&#039;s initials.&lt;br /&gt;
**Set &#039;&#039;SubjectSession&#039;&#039; to &amp;lt;tt&amp;gt;001&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Set &#039;&#039;SubjectRun&#039;&#039; to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;&lt;br /&gt;
*In the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Make sure that &#039;&#039;InterpretMode&#039;&#039; is set to &amp;lt;tt&amp;gt;copy mode&amp;lt;/tt&amp;gt;, and &#039;&#039;DisplayResults&#039;&#039; (directly below InterpretMode) is unchecked&lt;br /&gt;
**Find the &#039;&#039;TextToSpell&#039;&#039; field. This should be set to ‘THE’, and you will be changing it after each run. &lt;br /&gt;
*Press &#039;&#039;&#039;Set Config&#039;&#039;&#039; to apply this configuration.&lt;br /&gt;
&lt;br /&gt;
*Request that the subject sit in a relaxed position, and that the subject not move or speak during the runs.&lt;br /&gt;
*Turning off or dimming the lights can improve the subject&#039;s focus and performance.&lt;br /&gt;
*Showing the brain wave readouts to the subject can help understanding how artifact-generating behavior can be detrimental to the data.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to show the flashing character matrix, and describe what the subject is expected to do.&lt;br /&gt;
*After you’ve explained the procedure, click &#039;&#039;&#039;Suspend&#039;&#039;&#039; to stop.&lt;br /&gt;
*Delete that run of data (the file will be found at &amp;lt;tt&amp;gt;data\P300\&amp;lt;Subject Initials&amp;gt;001\&amp;lt;Subject Initials&amp;gt;S001R01.dat&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;QUICK&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;BROWN&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;FOX&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once this recording has finished, close BCI2000 and locate the saved data files below the BCI2000 &amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==Analyzing The Calibration Session with Offline Analysis==&lt;br /&gt;
We will now perform an ‘Offline Analysis’ with a tool that is provided with BCI2000.&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
[[Image:OfflineGUI.PNG|right]]&lt;br /&gt;
*In the &#039;&#039;Analysis Domain&#039;&#039; field, choose &#039;&#039;&#039;Time (P300)&#039;&#039;&#039;&lt;br /&gt;
*In the &#039;&#039;Acquisition Type&#039;&#039; field, choose &#039;&#039;&#039;EEG&#039;&#039;&#039;&lt;br /&gt;
*Next to &#039;&#039;Spatial Filter&#039;&#039;, choose &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;&lt;br /&gt;
*For &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 1)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Attended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Attended Stimuli’ refers to the letter or character the person is counting the flashes of, and triggers when the desired letter is flashed&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 0)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Unattended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Unattended stimulus’ refers to the letters or characters the person is not counting the flashes of, and triggers when the desired letter is not flashed &lt;br /&gt;
*Click the &#039;&#039;&#039;Add&#039;&#039;&#039; button by &#039;&#039;Data Files&#039;&#039;&lt;br /&gt;
*In this new dialog, select all of the data files taken during this configuration session, and click &#039;&#039;&#039;Open&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; and wait for the feature plot to appear&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|height=160px|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:FeaturesPlot.PNG|right|500px]]&lt;br /&gt;
&lt;br /&gt;
*When this is complete, you will see a feature plot similar to the one to the right. The vertical axis corresponds to the locations while the horizontal corresponds to the time delay after the stimulus. The color coding shows the r-squared value of that datapoint, with dark red colors indicating a high predictability that a response is produced by the desired letter being flashed.&lt;br /&gt;
*The largest of these r-squared values between 250 and 550ms are what we are interested in. Pick the 4 points with the largest r-squared values between these times and record their time points and channels. The plot’s &#039;&#039;Data Cursor&#039;&#039; tool (Tools Menu &amp;amp;rarr; Data Cursor) allows for discrete identification of time points.&lt;br /&gt;
&lt;br /&gt;
*With these four points, close the feature plot, and enter the channel numbers of the data points you found into the &#039;&#039;Waveform Channels&#039;&#039; field and the time points into the &#039;&#039;Topo Times&#039;&#039; field.&lt;br /&gt;
**In the example above, the four best data points have r-squared values &amp;lt;tt&amp;gt;0.02218&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.02179&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.01928&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;0.019&amp;lt;/tt&amp;gt;, occur at times &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;392.6ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;384.8ms&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;365.2ms&amp;lt;/tt&amp;gt; respectively, and all four are located in channel six. &amp;lt;tt&amp;gt;6, 6, 6, 6&amp;lt;/tt&amp;gt; would be entered into &#039;&#039;Waveform Channels&#039;&#039; and &amp;lt;tt&amp;gt;388.7, 392.6, 384.8, 365.2&amp;lt;/tt&amp;gt; would be entered into the &#039;&#039;Topo Times&#039;&#039; field. The order of the data points here does not matter, only that they are in the same order in both fields.&lt;br /&gt;
**If there are less than four points that seem appropriate, either because they are at the wrong electrodes, at the wrong times, or simply have too low of an r-squared value, that is fine, three or two values can work, though the fewer values used the lower the accuracy will be.&lt;br /&gt;
**Additionally, it may be helpful to re-run the analysis by setting the &#039;&#039;Spatial Filter&#039;&#039; to &#039;&#039;&#039;None&#039;&#039;&#039;, particularly when few channels are used.&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; to create the features plot again with a set of four graphs that show the correlation between the selected times after the desired stimulus is given (the red line) and the brain’s responses to when the desired stimulus is not given (the blue line).&lt;br /&gt;
**As seen below, the attended-stimulus reaction will typically be stronger than for the unattended stimuli, but in some cases the reverse is true. If the ‘unattended’ curve is larger than the ‘attended’ curve then make a note of this before moving on. The waveform seen here is similar to the others generated, only one is shown here for simplicity.&lt;br /&gt;
**Additionally before moving on, determine the location of the response seen. The P300 response is generally observed centered on the Cz electrode, or just behind and directly in between the ears, and does not involve the frontal regions of the brain. Assuming these characteristics are present, it is proper to proceed.&lt;br /&gt;
&lt;br /&gt;
[[Image:Waveform.PNG|center|800px]]&lt;br /&gt;
&lt;br /&gt;
==Creating a subject-specific parameter file==&lt;br /&gt;
Now we will save these customizations to a subject-specific parameter file that will allow the subject to free-spell with very high accuracy.&lt;br /&gt;
*Start BCI2000 using &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt; file&lt;br /&gt;
*Click &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the configuration file you saved previously&lt;br /&gt;
*Under the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab, set the &#039;&#039;SubjectSession&#039;&#039; parameter to &amp;quot;002&amp;quot;, and the &#039;&#039;&#039;SubjectName&#039;&#039;&#039; parameter to the subject&#039;s initials.&lt;br /&gt;
*Under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab, click the &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; button by &#039;&#039;Classifier&#039;&#039; near the bottom&lt;br /&gt;
*Change this matrix to have 4 columns and as many rows as values you are using, and click &#039;&#039;&#039;Set New Matrix Size&#039;&#039;&#039;&lt;br /&gt;
**In the first column, labeled &#039;&#039;Input Channel&#039;&#039;, enter the channel of the first value you use&lt;br /&gt;
**In the second column, labeled &#039;&#039;Input Element (bin)&#039;&#039;, enter the time of the best classification, immediately followed with &amp;lt;tt&amp;gt;ms&amp;lt;/tt&amp;gt;, as in &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;&lt;br /&gt;
**In the third column, enter 1 as the output channel&lt;br /&gt;
**In the fourth column, enter 1 if the &#039;&#039;Attended&#039;&#039; line was larger than the &#039;&#039;Unattended&#039;&#039; line, -1 if the &#039;&#039;unattended&#039;&#039; line was larger than the &#039;&#039;attended&#039;&#039; line&lt;br /&gt;
**Repeat these steps for the remaining rows, and close the matrix when finished&lt;br /&gt;
* If a &#039;&#039;&#039;Common Average Reference&#039;&#039;&#039; was used in the analysis, under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab change the &#039;&#039;&#039;SpatialFilterType&#039;&#039;&#039; parameter to &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;; otherwise, leave it as &#039;&#039;&#039;None&#039;&#039;&#039;.&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039; to save this file, naming it however you deem fit&lt;br /&gt;
*Use this new parameter file to repeat the configuration session and data analysis a few times, adding new rows to the classifier matrix each time for new data points to be utilized.&lt;br /&gt;
*When accuracy is reliably above 90%, click &#039;&#039;&#039;Config,&#039;&#039;&#039; and click on the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;NumberOfSequences&#039;&#039; to this number as well &#039;&#039;&#039;(to which number? jm)&#039;&#039;&#039;&lt;br /&gt;
**Delete the contents of the &#039;&#039;Text to Spell&#039;&#039; field&lt;br /&gt;
**Set &#039;&#039;InterpretMode&#039;&#039; &amp;amp;rarr; &amp;lt;tt&amp;gt;online free mode&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Make sure the &#039;&#039;DisplayResults&#039;&#039; box is checked&lt;br /&gt;
**Click on &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; next to &#039;&#039;TargetDefinitions&#039;&#039; and scroll to the bottom:&lt;br /&gt;
***In the first column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BS&amp;lt;/tt&amp;gt; (for &amp;quot;BackSpace&amp;quot;)&lt;br /&gt;
***In the second column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;&amp;lt;BS&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039;, and change the &amp;lt;tt&amp;gt;copy_spell&amp;lt;/tt&amp;gt; portion of this parameter file name to &amp;lt;tt&amp;gt;free_spell&amp;lt;/tt&amp;gt;&lt;br /&gt;
*This parameter file is now ready to use for that specific subject for future P300 spelling experiments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One program contributed to, and provided with, the BCI2000 system is the P300 GUI. This Matlab-based program automatically sifts through data files for datapoints indicative of a positive P300 reaction, and builds a classifier matrix with those datapoints. The largest benefit to using this program is the obviated need for repeated configuration sessions, at the expense of decreased hands-on experience with the BCI2000 program itself. For a tutorial on how to perform the offline analysis with this GUI program, [[User Tutorial:P300 GUI for Offline Analysis Tutorial|please click here]].&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
To continue onto performing P300 spelling experiments, continue to [[User Tutorial:Performing a P300 Spelling Session|Performing a P300 Spelling Session]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:P300 BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5275</id>
		<title>User Tutorial:Obtaining P300 Parameters in a Calibration Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5275"/>
		<updated>2009-09-02T17:11:58Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Creating a subject-specific parameter file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Obtaining P300 Parameters in the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
Although the basic properties of the P300 evoked potential are the same for all individuals, the response&#039;s latency, width, and spatial pattern varies, and adaptation to individual parameters improves accuracy.&lt;br /&gt;
&lt;br /&gt;
Thus, it is necessary to obtain these individual parameters prior to performing spelling experiments.&lt;br /&gt;
&lt;br /&gt;
==Design of Calibration Session==&lt;br /&gt;
&lt;br /&gt;
During the calibration session, the subject is asked to spell out a given word by using a P300 character matrix, pictured below. During each run, the subject is asked to focus on the next letter in the word he is spelling, as the rows and columns flash randomly and successively so that sometimes the flashing corresponds to the column or row containing the target character and sometimes it will not. As the subject counts the number of times the desired letter in the word flashes, a P300 response is generated. The purpose of the calibration session is to identify those features that discriminate between the desired and undesired rows/columns. &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMatrix.PNG|298px]]&lt;br /&gt;
&lt;br /&gt;
After the first few runs are collected, an analysis tool will be used to generate a configuration file with weights that will determine what portions of the input data correspond to selecting the desired letter. These weights are applied to the configuration session for one more run, and then the data from this run is also analyzed with the analysis tool, and the number of flashes needed to ensure 100% accuracy is determined. This second configuration file constitutes the final set of parameters, and is saved as that subject&#039;s parameter file for future spelling sessions.&lt;br /&gt;
&lt;br /&gt;
==Performing the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
*Start BCI2000 by running &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Press &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the baseline parameters for copy spelling that you made earlier.&lt;br /&gt;
*In the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;SubjectName&#039;&#039; to the subject&#039;s initials.&lt;br /&gt;
**Set &#039;&#039;SubjectSession&#039;&#039; to &amp;lt;tt&amp;gt;001&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Set &#039;&#039;SubjectRun&#039;&#039; to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;&lt;br /&gt;
*In the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Make sure that &#039;&#039;InterpretMode&#039;&#039; is set to &amp;lt;tt&amp;gt;copy mode&amp;lt;/tt&amp;gt;, and &#039;&#039;DisplayResults&#039;&#039; (directly below InterpretMode) is unchecked&lt;br /&gt;
**Find the &#039;&#039;TextToSpell&#039;&#039; field. This should be set to ‘THE’, and you will be changing it after each run. &lt;br /&gt;
*Press &#039;&#039;&#039;Set Config&#039;&#039;&#039; to apply this configuration.&lt;br /&gt;
&lt;br /&gt;
*Request that the subject sit in a relaxed position, and that the subject not move or speak during the runs.&lt;br /&gt;
*Turning off or dimming the lights can improve the subject&#039;s focus and performance.&lt;br /&gt;
*Showing the brain wave readouts to the subject can help understanding how artifact-generating behavior can be detrimental to the data.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to show the flashing character matrix, and describe what the subject is expected to do.&lt;br /&gt;
*After you’ve explained the procedure, click &#039;&#039;&#039;Suspend&#039;&#039;&#039; to stop.&lt;br /&gt;
*Delete that run of data (the file will be found at &amp;lt;tt&amp;gt;data\P300\&amp;lt;Subject Initials&amp;gt;001\&amp;lt;Subject Initials&amp;gt;S001R01.dat&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;QUICK&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;BROWN&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;FOX&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once this recording has finished, close BCI2000 and locate the saved data files below the BCI2000 &amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==Analyzing The Calibration Session with Offline Analysis==&lt;br /&gt;
We will now perform an ‘Offline Analysis’ with a tool that is provided with BCI2000.&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
[[Image:OfflineGUI.PNG|right]]&lt;br /&gt;
*In the &#039;&#039;Analysis Domain&#039;&#039; field, choose &#039;&#039;&#039;Time (P300)&#039;&#039;&#039;&lt;br /&gt;
*In the &#039;&#039;Acquisition Type&#039;&#039; field, choose &#039;&#039;&#039;EEG&#039;&#039;&#039;&lt;br /&gt;
*Next to &#039;&#039;Spatial Filter&#039;&#039;, choose &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;&lt;br /&gt;
*For &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 1)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Attended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Attended Stimuli’ refers to the letter or character the person is counting the flashes of, and triggers when the desired letter is flashed&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 0)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Unattended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Unattended stimulus’ refers to the letters or characters the person is not counting the flashes of, and triggers when the desired letter is not flashed &lt;br /&gt;
*Click the &#039;&#039;&#039;Add&#039;&#039;&#039; button by &#039;&#039;Data Files&#039;&#039;&lt;br /&gt;
*In this new dialog, select all of the data files taken during this configuration session, and click &#039;&#039;&#039;Open&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; and wait for the feature plot to appear&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|height=160px|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:FeaturesPlot.PNG|right|500px]]&lt;br /&gt;
&lt;br /&gt;
*When this is complete, you will see a feature plot similar to the one to the right. The vertical axis corresponds to the locations while the horizontal corresponds to the time delay after the stimulus. The color coding shows the r-squared value of that datapoint, with dark red colors indicating a high predictability that a response is produced by the desired letter being flashed.&lt;br /&gt;
*The largest of these r-squared values between 250 and 550ms are what we are interested in. Pick the 4 points with the largest r-squared values between these times and record their time points and channels. The plot’s &#039;&#039;Data Cursor&#039;&#039; tool (Tools Menu &amp;amp;rarr; Data Cursor) allows for discrete identification of time points.&lt;br /&gt;
&lt;br /&gt;
*With these four points, close the feature plot, and enter the channel numbers of the data points you found into the &#039;&#039;Waveform Channels&#039;&#039; field and the time points into the &#039;&#039;Topo Times&#039;&#039; field.&lt;br /&gt;
**In the example above, the four best data points have r-squared values &amp;lt;tt&amp;gt;0.02218&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.02179&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.01928&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;0.019&amp;lt;/tt&amp;gt;, occur at times &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;392.6ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;384.8ms&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;365.2ms&amp;lt;/tt&amp;gt; respectively, and all four are located in channel six. &amp;lt;tt&amp;gt;6, 6, 6, 6&amp;lt;/tt&amp;gt; would be entered into &#039;&#039;Waveform Channels&#039;&#039; and &amp;lt;tt&amp;gt;388.7, 392.6, 384.8, 365.2&amp;lt;/tt&amp;gt; would be entered into the &#039;&#039;Topo Times&#039;&#039; field. The order of the data points here does not matter, only that they are in the same order in both fields.&lt;br /&gt;
**If there are less than four points that seem appropriate, either because they are at the wrong electrodes, at the wrong times, or simply have too low of an r-squared value, that is fine, three or two values can work, though the fewer values used the lower the accuracy will be.&lt;br /&gt;
**Additionally, it may be helpful to re-run the analysis by setting the &#039;&#039;Spatial Filter&#039;&#039; to &#039;&#039;&#039;None&#039;&#039;&#039;, particularly when few channels are used.&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; to create the features plot again with a set of four graphs that show the correlation between the selected times after the desired stimulus is given (the red line) and the brain’s responses to when the desired stimulus is not given (the blue line).&lt;br /&gt;
**As seen below, the attended-stimulus reaction will typically be stronger than for the unattended stimuli, but in some cases the reverse is true. If the ‘unattended’ curve is larger than the ‘attended’ curve then make a note of this before moving on. The waveform seen here is similar to the others generated, only one is shown here for simplicity.&lt;br /&gt;
**Additionally before moving on, determine the location of the response seen. The P300 response is generally observed centered on the Cz electrode, or just behind and directly in between the ears, and does not involve the frontal regions of the brain. Assuming these characteristics are present, it is proper to proceed.&lt;br /&gt;
&lt;br /&gt;
[[Image:Waveform.PNG|center|800px]]&lt;br /&gt;
&lt;br /&gt;
==Creating a subject-specific parameter file==&lt;br /&gt;
Now we will save these customizations to a subject-specific parameter file that will allow the subject to free-spell with very high accuracy.&lt;br /&gt;
*Start BCI2000 using &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt; file&lt;br /&gt;
*Click &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the configuration file you saved previously&lt;br /&gt;
*Under the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab, set the &#039;&#039;SubjectSession&#039;&#039; parameter to &amp;quot;002&amp;quot;, and the &#039;&#039;&#039;SubjectName&#039;&#039;&#039; parameter to the subject&#039;s initials.&lt;br /&gt;
*Under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab, click the &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; button by &#039;&#039;Classifier&#039;&#039; near the bottom&lt;br /&gt;
*Change this matrix to have 4 columns and as many rows as values you are using, and click &#039;&#039;&#039;Set New Matrix Size&#039;&#039;&#039;&lt;br /&gt;
**In the first column, labeled &#039;&#039;Input Channel&#039;&#039;, enter the channel of the first value you use&lt;br /&gt;
**In the second column, labeled &#039;&#039;Input Element (bin)&#039;&#039;, enter the time of the best classification, immediately followed with &amp;lt;tt&amp;gt;ms&amp;lt;/tt&amp;gt;, as in &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;&lt;br /&gt;
**In the third column, enter 1 as the output channel&lt;br /&gt;
**In the fourth column, enter 1 if the &#039;&#039;Attended&#039;&#039; line was larger than the &#039;&#039;Unattended&#039;&#039; line, -1 if the &#039;&#039;unattended&#039;&#039; line was larger than the &#039;&#039;attended&#039;&#039; line&lt;br /&gt;
**Repeat these steps for the remaining rows&lt;br /&gt;
* If a &#039;&#039;&#039;Common Average Reference&#039;&#039;&#039; was used in the analysis, under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab change the &#039;&#039;&#039;SpatialFilterType&#039;&#039;&#039; parameter to &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;; otherwise, leave it as &#039;&#039;&#039;None&#039;&#039;&#039;.&lt;br /&gt;
*Close this matrix, and click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039; to save this file, naming it however you deem fit&lt;br /&gt;
*Use this new parameter file to repeat the configuration session and data analysis a few times, adding new rows to the classifier matrix each time for new data points to be utilized.&lt;br /&gt;
*When accuracy is reliably above 90%, click &#039;&#039;&#039;Config,&#039;&#039;&#039; and click on the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;NumberOfSequences&#039;&#039; to this number as well &#039;&#039;&#039;(to which number? jm)&#039;&#039;&#039;&lt;br /&gt;
**Delete the contents of the &#039;&#039;Text to Spell&#039;&#039; field&lt;br /&gt;
**Set &#039;&#039;InterpretMode&#039;&#039; &amp;amp;rarr; &amp;lt;tt&amp;gt;online free mode&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Make sure the &#039;&#039;DisplayResults&#039;&#039; box is checked&lt;br /&gt;
**Click on &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; next to &#039;&#039;TargetDefinitions&#039;&#039; and scroll to the bottom:&lt;br /&gt;
***In the first column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BS&amp;lt;/tt&amp;gt; (for &amp;quot;BackSpace&amp;quot;)&lt;br /&gt;
***In the second column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;&amp;lt;BS&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039;, and change the &amp;lt;tt&amp;gt;copy_spell&amp;lt;/tt&amp;gt; portion of this parameter file name to &amp;lt;tt&amp;gt;free_spell&amp;lt;/tt&amp;gt;&lt;br /&gt;
*This parameter file is now ready to use for that specific subject for future P300 spelling experiments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One program contributed to, and provided with, the BCI2000 system is the P300 GUI. This Matlab-based program automatically sifts through data files for datapoints indicative of a positive P300 reaction, and builds a classifier matrix with those datapoints. The largest benefit to using this program is the obviated need for repeated configuration sessions, at the expense of decreased hands-on experience with the BCI2000 program itself. For a tutorial on how to perform the offline analysis with this GUI program, [[User Tutorial:P300 GUI for Offline Analysis Tutorial|please click here]].&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
To continue onto performing P300 spelling experiments, continue to [[User Tutorial:Performing a P300 Spelling Session|Performing a P300 Spelling Session]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:P300 BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5274</id>
		<title>User Tutorial:Obtaining P300 Parameters in a Calibration Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_P300_Parameters_in_a_Calibration_Session&amp;diff=5274"/>
		<updated>2009-09-02T17:09:21Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Analyzing The Calibration Session with Offline Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Obtaining P300 Parameters in the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
Although the basic properties of the P300 evoked potential are the same for all individuals, the response&#039;s latency, width, and spatial pattern varies, and adaptation to individual parameters improves accuracy.&lt;br /&gt;
&lt;br /&gt;
Thus, it is necessary to obtain these individual parameters prior to performing spelling experiments.&lt;br /&gt;
&lt;br /&gt;
==Design of Calibration Session==&lt;br /&gt;
&lt;br /&gt;
During the calibration session, the subject is asked to spell out a given word by using a P300 character matrix, pictured below. During each run, the subject is asked to focus on the next letter in the word he is spelling, as the rows and columns flash randomly and successively so that sometimes the flashing corresponds to the column or row containing the target character and sometimes it will not. As the subject counts the number of times the desired letter in the word flashes, a P300 response is generated. The purpose of the calibration session is to identify those features that discriminate between the desired and undesired rows/columns. &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMatrix.PNG|298px]]&lt;br /&gt;
&lt;br /&gt;
After the first few runs are collected, an analysis tool will be used to generate a configuration file with weights that will determine what portions of the input data correspond to selecting the desired letter. These weights are applied to the configuration session for one more run, and then the data from this run is also analyzed with the analysis tool, and the number of flashes needed to ensure 100% accuracy is determined. This second configuration file constitutes the final set of parameters, and is saved as that subject&#039;s parameter file for future spelling sessions.&lt;br /&gt;
&lt;br /&gt;
==Performing the Calibration Session==&lt;br /&gt;
&lt;br /&gt;
*Start BCI2000 by running &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Press &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the baseline parameters for copy spelling that you made earlier.&lt;br /&gt;
*In the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;SubjectName&#039;&#039; to the subject&#039;s initials.&lt;br /&gt;
**Set &#039;&#039;SubjectSession&#039;&#039; to &amp;lt;tt&amp;gt;001&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Set &#039;&#039;SubjectRun&#039;&#039; to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;&lt;br /&gt;
*In the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Make sure that &#039;&#039;InterpretMode&#039;&#039; is set to &amp;lt;tt&amp;gt;copy mode&amp;lt;/tt&amp;gt;, and &#039;&#039;DisplayResults&#039;&#039; (directly below InterpretMode) is unchecked&lt;br /&gt;
**Find the &#039;&#039;TextToSpell&#039;&#039; field. This should be set to ‘THE’, and you will be changing it after each run. &lt;br /&gt;
*Press &#039;&#039;&#039;Set Config&#039;&#039;&#039; to apply this configuration.&lt;br /&gt;
&lt;br /&gt;
*Request that the subject sit in a relaxed position, and that the subject not move or speak during the runs.&lt;br /&gt;
*Turning off or dimming the lights can improve the subject&#039;s focus and performance.&lt;br /&gt;
*Showing the brain wave readouts to the subject can help understanding how artifact-generating behavior can be detrimental to the data.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to show the flashing character matrix, and describe what the subject is expected to do.&lt;br /&gt;
*After you’ve explained the procedure, click &#039;&#039;&#039;Suspend&#039;&#039;&#039; to stop.&lt;br /&gt;
*Delete that run of data (the file will be found at &amp;lt;tt&amp;gt;data\P300\&amp;lt;Subject Initials&amp;gt;001\&amp;lt;Subject Initials&amp;gt;S001R01.dat&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;QUICK&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;BROWN&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once it has finished automatically, click &#039;&#039;&#039;Config&#039;&#039;&#039; and change the &#039;&#039;TextToSpell&#039;&#039; in the &#039;&#039;&#039;Application&#039;&#039;&#039; tab to &amp;lt;tt&amp;gt;FOX&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Press &#039;&#039;&#039;Start&#039;&#039;&#039; to record the run.&lt;br /&gt;
*Once this recording has finished, close BCI2000 and locate the saved data files below the BCI2000 &amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==Analyzing The Calibration Session with Offline Analysis==&lt;br /&gt;
We will now perform an ‘Offline Analysis’ with a tool that is provided with BCI2000.&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
[[Image:OfflineGUI.PNG|right]]&lt;br /&gt;
*In the &#039;&#039;Analysis Domain&#039;&#039; field, choose &#039;&#039;&#039;Time (P300)&#039;&#039;&#039;&lt;br /&gt;
*In the &#039;&#039;Acquisition Type&#039;&#039; field, choose &#039;&#039;&#039;EEG&#039;&#039;&#039;&lt;br /&gt;
*Next to &#039;&#039;Spatial Filter&#039;&#039;, choose &#039;&#039;&#039;Common Average Reference (CAR)&#039;&#039;&#039;&lt;br /&gt;
*For &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 1)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Attended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Attended Stimuli’ refers to the letter or character the person is counting the flashes of, and triggers when the desired letter is flashed&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;(states.StimulusCode &amp;gt; 0) &amp;amp; (states.StimulusType == 0)&amp;lt;/tt&amp;gt;&lt;br /&gt;
*For &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039; enter &amp;lt;tt&amp;gt;Unattended Stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
**‘Unattended stimulus’ refers to the letters or characters the person is not counting the flashes of, and triggers when the desired letter is not flashed &lt;br /&gt;
*Click the &#039;&#039;&#039;Add&#039;&#039;&#039; button by &#039;&#039;Data Files&#039;&#039;&lt;br /&gt;
*In this new dialog, select all of the data files taken during this configuration session, and click &#039;&#039;&#039;Open&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; and wait for the feature plot to appear&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|height=160px|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:FeaturesPlot.PNG|right|500px]]&lt;br /&gt;
&lt;br /&gt;
*When this is complete, you will see a feature plot similar to the one to the right. The vertical axis corresponds to the locations while the horizontal corresponds to the time delay after the stimulus. The color coding shows the r-squared value of that datapoint, with dark red colors indicating a high predictability that a response is produced by the desired letter being flashed.&lt;br /&gt;
*The largest of these r-squared values between 250 and 550ms are what we are interested in. Pick the 4 points with the largest r-squared values between these times and record their time points and channels. The plot’s &#039;&#039;Data Cursor&#039;&#039; tool (Tools Menu &amp;amp;rarr; Data Cursor) allows for discrete identification of time points.&lt;br /&gt;
&lt;br /&gt;
*With these four points, close the feature plot, and enter the channel numbers of the data points you found into the &#039;&#039;Waveform Channels&#039;&#039; field and the time points into the &#039;&#039;Topo Times&#039;&#039; field.&lt;br /&gt;
**In the example above, the four best data points have r-squared values &amp;lt;tt&amp;gt;0.02218&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.02179&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;0.01928&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;0.019&amp;lt;/tt&amp;gt;, occur at times &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;392.6ms&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;384.8ms&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;365.2ms&amp;lt;/tt&amp;gt; respectively, and all four are located in channel six. &amp;lt;tt&amp;gt;6, 6, 6, 6&amp;lt;/tt&amp;gt; would be entered into &#039;&#039;Waveform Channels&#039;&#039; and &amp;lt;tt&amp;gt;388.7, 392.6, 384.8, 365.2&amp;lt;/tt&amp;gt; would be entered into the &#039;&#039;Topo Times&#039;&#039; field. The order of the data points here does not matter, only that they are in the same order in both fields.&lt;br /&gt;
**If there are less than four points that seem appropriate, either because they are at the wrong electrodes, at the wrong times, or simply have too low of an r-squared value, that is fine, three or two values can work, though the fewer values used the lower the accuracy will be.&lt;br /&gt;
**Additionally, it may be helpful to re-run the analysis by setting the &#039;&#039;Spatial Filter&#039;&#039; to &#039;&#039;&#039;None&#039;&#039;&#039;, particularly when few channels are used.&lt;br /&gt;
*Click &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; to create the features plot again with a set of four graphs that show the correlation between the selected times after the desired stimulus is given (the red line) and the brain’s responses to when the desired stimulus is not given (the blue line).&lt;br /&gt;
**As seen below, the attended-stimulus reaction will typically be stronger than for the unattended stimuli, but in some cases the reverse is true. If the ‘unattended’ curve is larger than the ‘attended’ curve then make a note of this before moving on. The waveform seen here is similar to the others generated, only one is shown here for simplicity.&lt;br /&gt;
**Additionally before moving on, determine the location of the response seen. The P300 response is generally observed centered on the Cz electrode, or just behind and directly in between the ears, and does not involve the frontal regions of the brain. Assuming these characteristics are present, it is proper to proceed.&lt;br /&gt;
&lt;br /&gt;
[[Image:Waveform.PNG|center|800px]]&lt;br /&gt;
&lt;br /&gt;
==Creating a subject-specific parameter file==&lt;br /&gt;
Now we will save these customizations to a subject-specific parameter file that will allow the subject to free-spell with very high accuracy.&lt;br /&gt;
*Start BCI2000 using &amp;lt;tt&amp;gt;batch/P3Speller_&amp;lt;Your_Amplifier&amp;gt;.bat&amp;lt;/tt&amp;gt; file&lt;br /&gt;
*Click &#039;&#039;&#039;Config&#039;&#039;&#039;, and load the configuration file you saved previously&lt;br /&gt;
*Under the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab, set the &#039;&#039;SubjectSession&#039;&#039; parameter to &amp;quot;002&amp;quot;, and the &#039;&#039;&#039;SubjectName&#039;&#039;&#039; parameter to the subject&#039;s initials.&lt;br /&gt;
*Under the &#039;&#039;&#039;Filtering&#039;&#039;&#039; tab, click the &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; button by &#039;&#039;Classifier&#039;&#039; near the bottom&lt;br /&gt;
*Change this matrix to have 4 columns and as many rows as values you are using, and click &#039;&#039;&#039;Set New Matrix Size&#039;&#039;&#039;&lt;br /&gt;
**In the first column, labeled &#039;&#039;Input Channel&#039;&#039;, enter the channel of the first value you use&lt;br /&gt;
**In the second column, labeled &#039;&#039;Input Element (bin)&#039;&#039;, enter the time of the best classification, immediately followed with &amp;lt;tt&amp;gt;ms&amp;lt;/tt&amp;gt;, as in &amp;lt;tt&amp;gt;388.7ms&amp;lt;/tt&amp;gt;&lt;br /&gt;
**In the third column, enter 1 as the output channel&lt;br /&gt;
**In the fourth column, enter 1 if the &#039;&#039;Attended&#039;&#039; line was larger than the &#039;&#039;Unattended&#039;&#039; line, -1 if the &#039;&#039;unattended&#039;&#039; line was larger than the &#039;&#039;attended&#039;&#039; line&lt;br /&gt;
**Repeat these steps for the remaining rows&lt;br /&gt;
*Close this matrix, and click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039; to save this file, naming it however you deem fit&lt;br /&gt;
*Use this new parameter file to repeat the configuration session and data analysis a few times, adding new rows to the classifier matrix each time for new data points to be utilized.&lt;br /&gt;
*When accuracy is reliably above 90%, click &#039;&#039;&#039;Config,&#039;&#039;&#039; and click on the &#039;&#039;&#039;Application&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;NumberOfSequences&#039;&#039; to this number as well &#039;&#039;&#039;(to which number? jm)&#039;&#039;&#039;&lt;br /&gt;
**Delete the contents of the &#039;&#039;Text to Spell&#039;&#039; field&lt;br /&gt;
**Set &#039;&#039;InterpretMode&#039;&#039; &amp;amp;rarr; &amp;lt;tt&amp;gt;online free mode&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Make sure the &#039;&#039;DisplayResults&#039;&#039; box is checked&lt;br /&gt;
**Click on &#039;&#039;&#039;Edit Matrix&#039;&#039;&#039; next to &#039;&#039;TargetDefinitions&#039;&#039; and scroll to the bottom:&lt;br /&gt;
***In the first column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BS&amp;lt;/tt&amp;gt; (for &amp;quot;BackSpace&amp;quot;)&lt;br /&gt;
***In the second column replace &amp;lt;tt&amp;gt;9&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;&amp;lt;BS&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
*Click &#039;&#039;&#039;Save Parameters&#039;&#039;&#039;, and change the &amp;lt;tt&amp;gt;copy_spell&amp;lt;/tt&amp;gt; portion of this parameter file name to &amp;lt;tt&amp;gt;free_spell&amp;lt;/tt&amp;gt;&lt;br /&gt;
*This parameter file is now ready to use for that specific subject for future P300 spelling experiments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One program contributed to, and provided with, the BCI2000 system is the P300 GUI. This Matlab-based program automatically sifts through data files for datapoints indicative of a positive P300 reaction, and builds a classifier matrix with those datapoints. The largest benefit to using this program is the obviated need for repeated configuration sessions, at the expense of decreased hands-on experience with the BCI2000 program itself. For a tutorial on how to perform the offline analysis with this GUI program, [[User Tutorial:P300 GUI for Offline Analysis Tutorial|please click here]].&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
To continue onto performing P300 spelling experiments, continue to [[User Tutorial:Performing a P300 Spelling Session|Performing a P300 Spelling Session]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:P300 BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_Mu_Rhythm_Parameters_in_an_Initial_Session&amp;diff=5232</id>
		<title>User Tutorial:Obtaining Mu Rhythm Parameters in an Initial Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Obtaining_Mu_Rhythm_Parameters_in_an_Initial_Session&amp;diff=5232"/>
		<updated>2009-08-27T19:35:36Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Preparing for the Initial (Screening) Session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although the [[User Tutorial:Introduction to the Mu Rhythm|basic properties of the Mu rhythm]] are identical for all humans, spatial patterns and exact frequencies are different across people. Thus, it is necessary to obtain these individual parameters prior to any feedback experiments, i.e., to calibrate the BCI system using data acquired from an initial session.&lt;br /&gt;
&lt;br /&gt;
==Experimental Design==&lt;br /&gt;
In this initial session, the subject is instructed to imagine hand and/or foot movements in response to visual cues.&lt;br /&gt;
To identify a subject&#039;s Mu Rhythm, offline analyses then determine the frequency and location whose activity changes the most across conditions (e.g., hand imagery and rest).  These analyses result in spectra calculated at different locations or in topographical plots at particular frequencies. &lt;br /&gt;
&lt;br /&gt;
==Preparing for the Initial (Screening) Session==&lt;br /&gt;
To begin, you first need to gather some system data. This tutorial will assume that you will be using a dual-monitor setup as shown below, with the experimenter of the sessions operating on monitor 1, and the subject will be watching monitor 2. &lt;br /&gt;
&lt;br /&gt;
Open Display Properties by right-clicking on an empty portion of the desktop and clicking &#039;&#039;&#039;Properties&#039;&#039;&#039;, and navigating to the &#039;&#039;&#039;Settings&#039;&#039;&#039; tab.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;|[[Image:MonitorSetupOrientation.PNG|center]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;|Make sure that Monitor 2, (which displays the instructions to the subject), is on the right of Monitor 1, (the experimenter&#039;s screen), and is aligned along the top.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot; height=50px|&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|[[Image:MonitorSetupPrimaryRes.PNG|center]]&lt;br /&gt;
|[[Image:MonitorSetupSecondaryRes.PNG|center]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;|What we need to make a note of is the &#039;&#039;&#039;width&#039;&#039;&#039; of monitor 1, and the &#039;&#039;&#039;width and height&#039;&#039;&#039; of monitor 2.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;|In this example we see that Monitor 1 is 2048 pixels wide, and monitor 2 is 1024 pixels wide by 768 pixels tall.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot; height=50px|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Connect your amplifier to the computer, and turn it on.&lt;br /&gt;
&lt;br /&gt;
If your amplifier is from the gMOBIlab family, you will need to make a note of the port it is connected to. In order to determine that port, in Windows XP, go to the Windows Start Menu, and choose &#039;&#039;&#039;Start &amp;amp;rarr;  Control Panel &amp;amp;rarr; System &amp;amp;rarr; Hardware &amp;amp;rarr; Device Manager &amp;amp;rarr; Ports (COM &amp;amp; LPT)&#039;&#039;&#039;. Different versions of Windows may have the Device Manager in a different location. In this example, we see that the amplifier is connected to &#039;&#039;COM8&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Finding the COM port&amp;quot; widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:ControlPanel-Circled.PNG|Accessing the Control Panel&lt;br /&gt;
Image:System.PNG|Opening the System Properties&lt;br /&gt;
Image:DeviceManager.PNG|Opening the Device Manager&lt;br /&gt;
Image:COMCircled.PNG|Identifying the COM Port&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
You can now close all open windows.&lt;br /&gt;
&lt;br /&gt;
==Configuring BCI2000==&lt;br /&gt;
&lt;br /&gt;
*Start BCI2000 by double-clicking &amp;lt;tt&amp;gt;batch/StimulusPresentation_&amp;lt;YourAmplifier&amp;gt;.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**For repeated use, placing a link to this file on the desktop might be a good idea.&lt;br /&gt;
*In the operator module, click &#039;&#039;&#039;Config&#039;&#039;&#039;.&lt;br /&gt;
*Click &#039;&#039;&#039;Load Parameters&#039;&#039;&#039;, and load &amp;lt;tt&amp;gt;parms/mu_tutorial/InitialMuSession.prm&amp;lt;/tt&amp;gt;. Then, load &amp;lt;tt&amp;gt;parms/fragments/amplifiers/&amp;lt;YourAmplifier&amp;gt;.prm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*In the &#039;&#039;&#039;Storage&#039;&#039;&#039; tab:&lt;br /&gt;
**Set &#039;&#039;SubjectName&#039;&#039; to the subject’s initials.&lt;br /&gt;
**Set &#039;&#039;SubjectSession&#039;&#039; to &amp;lt;tt&amp;gt;001&amp;lt;/tt&amp;gt;&lt;br /&gt;
**Set &#039;&#039;SubjectRun&#039;&#039; to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SourceTabCircledMu.PNG|right|500px]]&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Source&#039;&#039;&#039; tab, set:&lt;br /&gt;
*&#039;&#039;ChannelNames&#039;&#039; to the electrode positions according to the 10-20 convention.&lt;br /&gt;
**This names the channels according to their respective electrode positions.&lt;br /&gt;
**In our example, &amp;lt;tt&amp;gt;F3 F4 T7 C3 Cz C4 T8 Pz&amp;lt;/tt&amp;gt; has been entered.&lt;br /&gt;
*If using a gMOBIlab amplifier, set &#039;&#039;COM port&#039;&#039; to the port name that you found earlier.&lt;br /&gt;
**In this example, we would put in &amp;lt;tt&amp;gt;COM8:&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|height=&amp;quot;180px&amp;quot;|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Application&#039;&#039;&#039; tab, set:&lt;br /&gt;
*&#039;&#039;WindowWidth&#039;&#039; to the width of the display monitor, found earlier.&lt;br /&gt;
*&#039;&#039;WindowHeight&#039;&#039; to the height of the display monitor, found earlier.&lt;br /&gt;
**In our example, &#039;&#039;WindowWidth&#039;&#039; would be set to &amp;lt;tt&amp;gt;1024&amp;lt;/tt&amp;gt; and &#039;&#039;WindowHeight&#039;&#039; would be set to &amp;lt;tt&amp;gt;768&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*&#039;&#039;WindowLeft&#039;&#039; to the width of the experimenter’s monitor.&lt;br /&gt;
**In our example, this would be &amp;lt;tt&amp;gt;2048&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**This shifts the character display to the right 2048 pixels, making it display on the secondary monitor.&lt;br /&gt;
*Take note of the &#039;&#039;Sequence&#039;&#039; field:&lt;br /&gt;
**This field contains four single-digit numbers separated by one space. Initially it will be &amp;lt;tt&amp;gt;1 1 1 1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**These numbers are frequencies of calling for the different subject activity. The first number corresponds to the left hand, the second is the right hand, the third for both hands, the fourth for both feet.&lt;br /&gt;
**Therefore, setting this field to &amp;lt;tt&amp;gt;2 1 0 1&amp;lt;/tt&amp;gt; will call for the subject to move the left hand twice as often as the right or both feet, and will never call for both hands to be moved.&lt;br /&gt;
*Finally, save the parameter file where you deem appropriate.&lt;br /&gt;
*Click &#039;&#039;&#039;Set Config&#039;&#039;&#039;.&lt;br /&gt;
*Instruct the subject as described in the section below.&lt;br /&gt;
&lt;br /&gt;
==Instructions to the Subject==&lt;br /&gt;
During the initial session, the subject&#039;s screen will either be blank, or displaying an arrow pointing up, down, left, or right.&lt;br /&gt;
*When a left or right arrow is displayed, imagine movement of the respective hand. The imagined movement should be continuous opening and closing of the hand (e.g., squeezing a tennis ball) at a rate of about one opening/closing per second.&lt;br /&gt;
*When an up arrow is displayed, imagine simultaneous movement of both hands. This should be the same kind of movement as described for a single hand.&lt;br /&gt;
*When a down arrow is displayed, imagine movements of both feet. The movement should be similar to the one described for hands, i.e., imagine opening and closing your feet as if you could use them to grip an object.&lt;br /&gt;
*When you see a blank screen, please relax and stop any movement imagery.&lt;br /&gt;
&lt;br /&gt;
==Performing the Initial Session==&lt;br /&gt;
To start an experimental run, click &#039;&#039;&#039;Run&#039;&#039;&#039; in the operator window. Each run gathers 20 data points, or &amp;quot;trials&amp;quot;, that differentiate between moving the left hand, the right hand, both hands, and both feet. Ideally, there should be 100 trials, meaning that five runs are suggested. This is done as five separate runs instead of one to allow the subject a chance between each run to rest, blink, swallow, speak, or have some water if so desired.&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
Once all data have been collected, the [[User Tutorial:Analyzing the Initial Mu Rhythm Session|Analyzing the Initial Mu Rhythm Session]] page shows you how to analyze data from the initial session in order to determine parameters for online feedback.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:Mu Rhythm BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Analyzing_the_Initial_Mu_Rhythm_Session&amp;diff=5223</id>
		<title>User Tutorial:Analyzing the Initial Mu Rhythm Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Analyzing_the_Initial_Mu_Rhythm_Session&amp;diff=5223"/>
		<updated>2009-08-25T14:35:41Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial step assumes that you have [[User Tutorial:Obtaining Mu Rhythm Parameters in an Initial Session|performed an initial mu rhythm session]]. In order to identify the parameters (i.e., frequency and location) of a subject&#039;s mu rhythm, we will determine how different the EEG signal amplitude is for different types of imaginations that the subject performed during the recording. You will use the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool for this purpose.&lt;br /&gt;
&lt;br /&gt;
==Generating a Feature Plot==&lt;br /&gt;
The first step in these analyses is to separate data into amplitudes at individual &#039;&#039;&#039;frequencies&#039;&#039;&#039; and &#039;&#039;&#039;locations.&#039;&#039;&#039; These amplitudes are called &#039;&#039;features,&#039;&#039; and their correspondence with the subject&#039;s imagination will be plotted as a so-called &#039;&#039;feature map.&#039;&#039; From a feature map, it is possible to determine those frequencies and locations whose amplitude is maximally correlated with the subject&#039;s task, i.e., those features that are most different between two conditions. These features will subsequently be used to provide feedback in a BCI experiment.&lt;br /&gt;
&lt;br /&gt;
To generate a feature plot from the initial session&#039;s data, perform the following steps:&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
*In the &#039;&#039;&#039;Analysis Domain&#039;&#039;&#039; field, choose &#039;&#039;Frequency&#039;&#039;.&lt;br /&gt;
*In the &#039;&#039;&#039;Acquisition Type&#039;&#039;&#039; field, choose &amp;quot;EEG&amp;quot;.&lt;br /&gt;
*As a &#039;&#039;&#039;Spatial Filter&#039;&#039;&#039;, choose &amp;quot;Common Average Reference (CAR)&amp;quot;.&lt;br /&gt;
*Enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt; into the &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; field.&lt;br /&gt;
*Into the field labeled &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039;, enter &amp;lt;tt&amp;gt;states.StimulusCode == 0&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Enter the word &amp;quot;Rest&amp;quot; into the field labeled &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039;.&lt;br /&gt;
*Similarly, enter &amp;lt;tt&amp;gt;states.StimulusCode == 2&amp;lt;/tt&amp;gt; into the &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; field, and &amp;quot;Right Hand&amp;quot; into &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039;.&lt;br /&gt;
*Click the &amp;quot;Add&amp;quot; button located besides the &#039;&#039;&#039;Data Files&#039;&#039;&#039; field. A file chooser dialog will appear; navigate to &amp;lt;tt&amp;gt;data/mu/&amp;lt;Subject&amp;gt;001&amp;lt;/tt&amp;gt;, and select all &amp;lt;tt&amp;gt;.dat&amp;lt;/tt&amp;gt; files available there (use your keyboard&#039;s &#039;&#039;ctrl&#039;&#039; button to click-select multiple files), then click the dialog&#039;s &amp;quot;Open&amp;quot; button.&lt;br /&gt;
*Click &amp;quot;Generate Plots&amp;quot;, and wait for the feature plot to appear.&lt;br /&gt;
&lt;br /&gt;
Once the computation is complete, you will see a feature plot similar to the one below. In that plot, the horizontal axis corresponds to frequencies, and the vertical axis corresponds to individual channels. Color codes represent [[Glossary#r-squared|r-squared]] values, which are numbers between 0 and 1. R-squared values provide a measure for the amount to which a particular EEG feature (i.e., amplitude at a particular frequency and location) is influenced by the subject&#039;s task (e.g., hand vs. foot imagery).&lt;br /&gt;
&lt;br /&gt;
[[Image:eeg1FeaturePlt.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Typically, there will be clusters of large r-squared values in the feature plot. The initial step to configure the online system is to determine which brain signal feature differed the most between two particular tasks.  This is accomplished by picking the largest r-squared value from the map and by noting its corresponding frequency and location.  However, it is important to verify whether the feature in question is consistent with the [[User_Tutorial:Introduction_to_the_Mu_Rhythm#Physical_Properties|mu rhythm&#039;s known properties]]. This verification is necessary to avoid misconfiguration due to [[User_Tutorial:EEG_Measurement_Setup#EEG_Artifacts|EEG artifacts]], other noise, or random effects.&lt;br /&gt;
&lt;br /&gt;
==Generating Spectra and Topography Plots==&lt;br /&gt;
*Pick the four largest r-squared values from the feature map between 9 and 36Hz, and read off their frequencies and channels. The plot&#039;s &amp;quot;Data Cursor&amp;quot; tool (&#039;&#039;Data Cursor&#039;&#039; from the &#039;&#039;Tools&#039;&#039; menu) may be helpful for this.&lt;br /&gt;
*In the analysis program&#039;s &#039;&#039;&#039;Spectra Channels&#039;&#039;&#039; field, enter the channel numbers you read off the feature map.&lt;br /&gt;
*In the &#039;&#039;&#039;Topo Frequencies&#039;&#039;&#039; field, enter the frequencies you read off the feature map.&lt;br /&gt;
*Click the &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[Image:MuRhythmModulation.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The generated &#039;&#039;&#039;topography plots&#039;&#039;&#039; display the spatial distribution of r-squared values. In this comparison of EEG activity for right-hand movements and rest, there should be a clear maximum of r-squared values over the &#039;&#039;left&#039;&#039; motor cortex as shown in subfigure (A) and (B) above. &lt;br /&gt;
The generated &#039;&#039;&#039;spectra plots&#039;&#039;&#039; display amplitude distributions, and r-squared measure, over frequencies. Ideally, they should appear similar to the  (C) and (D) subfigures above.&lt;br /&gt;
&lt;br /&gt;
==Analyzing Remaining Conditions==&lt;br /&gt;
Up to now, you performed an analysis of how brain activity is related to imagined movements of the &#039;&#039;&#039;Right Hand.&#039;&#039;&#039; In order to choose the most useful channel and frequency for online feedback, perform similar analyses for the remaining conditions:&lt;br /&gt;
*In the analysis program&#039;s &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; field, enter &amp;lt;tt&amp;gt;states.StimulusCode == 1&amp;lt;/tt&amp;gt;, and &#039;&#039;Left Hand&#039;&#039; into &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039;.&lt;br /&gt;
*Make sure the &#039;&#039;&#039;Overwrite existing plots&#039;&#039;&#039; check box is unchecked.&lt;br /&gt;
*Click &#039;&#039;Generate Plots&#039;&#039; to create a feature plot for imagined movement of the left hand.&lt;br /&gt;
*As previously, pick the four largest r-squared values, and compute spectra and topographies for their channels and frequencies.&lt;br /&gt;
*Results should somewhat resemble that derived for the right hand, except that the colored activity changes should appear over the right and not the left motor cortex.&lt;br /&gt;
*Repeat the analysis for conditions &amp;lt;tt&amp;gt;states.StimulusCode == 3&amp;lt;/tt&amp;gt;: &#039;&#039;Both Hands&#039;&#039;, and &amp;lt;tt&amp;gt;states.StimulusCode == 4&amp;lt;/tt&amp;gt;: &#039;&#039;Both Feet&#039;&#039;.&lt;br /&gt;
**For the &#039;&#039;both hands&#039;&#039; condition, the result should resemble a combination of &#039;&#039;left hand&#039;&#039; and &#039;&#039;right hand&#039;&#039; results.&lt;br /&gt;
**For &#039;&#039;both feet,&#039;&#039; modulated activity should be centered around electrode Cz.&lt;br /&gt;
&lt;br /&gt;
==Picking Optimal Features==&lt;br /&gt;
&lt;br /&gt;
Here we are looking for the frequency with the highest r-squared value and is between 9Hz and 36Hz. Further, acceptable readings are centered on the proper electrode for the predicted stimulus; C3 for readings from the right hand, C4 for the left hand, both C3 and C4 for both hands, and Cz for both feet.&lt;br /&gt;
&lt;br /&gt;
Equipped with the frequency and electrode that provides the reading with the highest r-squared value, we can begin configuring the setup for proper use.&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
[[User Tutorial:Configuring Online Feedback|Configuring Online Feedback]] shows you how to configure the BCI system using the parameters obtained in the analysis.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:Mu Rhythm BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Analyzing_the_Initial_Mu_Rhythm_Session&amp;diff=5222</id>
		<title>User Tutorial:Analyzing the Initial Mu Rhythm Session</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Tutorial:Analyzing_the_Initial_Mu_Rhythm_Session&amp;diff=5222"/>
		<updated>2009-08-25T14:30:52Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial step assumes that you have [[User Tutorial:Obtaining Mu Rhythm Parameters in an Initial Session|performed an initial mu rhythm session]]. In order to identify the parameters (i.e., frequency and location) of a subject&#039;s mu rhythm, we will determine how different the EEG signal amplitude is for different types of imaginations that the subject performed during the recording. You will use the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool for this purpose.&lt;br /&gt;
&lt;br /&gt;
==Generating a Feature Plot==&lt;br /&gt;
The first step in these analyses is to separate data into amplitudes at individual &#039;&#039;&#039;frequencies&#039;&#039;&#039; and &#039;&#039;&#039;locations.&#039;&#039;&#039; These amplitudes are called &#039;&#039;features,&#039;&#039; and their correspondence with the subject&#039;s imagination will be plotted as a so-called &#039;&#039;feature map.&#039;&#039; From a feature map, it is possible to determine those frequencies and locations whose amplitude is maximally correlated with the subject&#039;s task, i.e., those features that are most different between two conditions. These features will subsequently be used to provide feedback in a BCI experiment.&lt;br /&gt;
&lt;br /&gt;
To generate a feature plot from the initial session&#039;s data, perform the following steps:&lt;br /&gt;
*Start the [[User Reference:BCI2000 Offline Analysis|BCI2000 Offline Analysis]] tool:&lt;br /&gt;
**If you have a version of Matlab installed, run &amp;lt;tt&amp;gt;tools/OfflineAnalysis/OfflineAnalysis.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Otherwise, follow the instructions provided [[User_Reference:BCI2000_Offline_Analysis#Systems_that_do_not_have_MATLAB_installed_or_with_versions_that_predate_MATLAB_v7.0|elsewhere]].&lt;br /&gt;
*In the &#039;&#039;&#039;Analysis Domain&#039;&#039;&#039; field, choose &#039;&#039;Frequency&#039;&#039;.&lt;br /&gt;
*In the &#039;&#039;&#039;Acquisition Type&#039;&#039;&#039; field, choose &amp;quot;EEG&amp;quot;.&lt;br /&gt;
*As a &#039;&#039;&#039;Spatial Filter&#039;&#039;&#039;, choose &amp;quot;Common Average Reference (CAR)&amp;quot;.&lt;br /&gt;
*Enter &amp;lt;tt&amp;gt;states.StimulusBegin == 1&amp;lt;/tt&amp;gt; into the &#039;&#039;&#039;Trial Change Condition&#039;&#039;&#039; field.&lt;br /&gt;
*Into the field labeled &#039;&#039;&#039;Target Condition 1&#039;&#039;&#039;, enter &amp;lt;tt&amp;gt;states.StimulusCode == 1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Enter the word &amp;quot;Rest&amp;quot; into the field labeled &#039;&#039;&#039;Target Condition Label 1&#039;&#039;&#039;.&lt;br /&gt;
*Similarly, enter &amp;lt;tt&amp;gt;states.StimulusCode == 2&amp;lt;/tt&amp;gt; into the &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; field, and &amp;quot;Right Hand&amp;quot; into &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039;.&lt;br /&gt;
*Click the &amp;quot;Add&amp;quot; button located besides the &#039;&#039;&#039;Data Files&#039;&#039;&#039; field. A file chooser dialog will appear; navigate to &amp;lt;tt&amp;gt;data/mu/&amp;lt;Subject&amp;gt;001&amp;lt;/tt&amp;gt;, and select all &amp;lt;tt&amp;gt;.dat&amp;lt;/tt&amp;gt; files available there (use your keyboard&#039;s &#039;&#039;ctrl&#039;&#039; button to click-select multiple files), then click the dialog&#039;s &amp;quot;Open&amp;quot; button.&lt;br /&gt;
*Click &amp;quot;Generate Plots&amp;quot;, and wait for the feature plot to appear.&lt;br /&gt;
&lt;br /&gt;
Once the computation is complete, you will see a feature plot similar to the one below. In that plot, the horizontal axis corresponds to frequencies, and the vertical axis corresponds to individual channels. Color codes represent [[Glossary#r-squared|r-squared]] values, which are numbers between 0 and 1. R-squared values provide a measure for the amount to which a particular EEG feature (i.e., amplitude at a particular frequency and location) is influenced by the subject&#039;s task (e.g., hand vs. foot imagery).&lt;br /&gt;
&lt;br /&gt;
[[Image:eeg1FeaturePlt.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Typically, there will be clusters of large r-squared values in the feature plot. The initial step to configure the online system is to determine which brain signal feature differed the most between two particular tasks.  This is accomplished by picking the largest r-squared value from the map and by noting its corresponding frequency and location.  However, it is important to verify whether the feature in question is consistent with the [[User_Tutorial:Introduction_to_the_Mu_Rhythm#Physical_Properties|mu rhythm&#039;s known properties]]. This verification is necessary to avoid misconfiguration due to [[User_Tutorial:EEG_Measurement_Setup#EEG_Artifacts|EEG artifacts]], other noise, or random effects.&lt;br /&gt;
&lt;br /&gt;
==Generating Spectra and Topography Plots==&lt;br /&gt;
*Pick the four largest r-squared values from the feature map between 9 and 36Hz, and read off their frequencies and channels. The plot&#039;s &amp;quot;Data Cursor&amp;quot; tool (&#039;&#039;Data Cursor&#039;&#039; from the &#039;&#039;Tools&#039;&#039; menu) may be helpful for this.&lt;br /&gt;
*In the analysis program&#039;s &#039;&#039;&#039;Spectra Channels&#039;&#039;&#039; field, enter the channel numbers you read off the feature map.&lt;br /&gt;
*In the &#039;&#039;&#039;Topo Frequencies&#039;&#039;&#039; field, enter the frequencies you read off the feature map.&lt;br /&gt;
*Click the &#039;&#039;&#039;Generate Plots&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[Image:MuRhythmModulation.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The generated &#039;&#039;&#039;topography plots&#039;&#039;&#039; display the spatial distribution of r-squared values. In this comparison of EEG activity for right-hand movements and rest, there should be a clear maximum of r-squared values over the &#039;&#039;left&#039;&#039; motor cortex as shown in subfigure (A) and (B) above. &lt;br /&gt;
The generated &#039;&#039;&#039;spectra plots&#039;&#039;&#039; display amplitude distributions, and r-squared measure, over frequencies. Ideally, they should appear similar to the  (C) and (D) subfigures above.&lt;br /&gt;
&lt;br /&gt;
==Analyzing Remaining Conditions==&lt;br /&gt;
Up to now, you performed an analysis of how brain activity is related to imagined movements of the &#039;&#039;&#039;Right Hand.&#039;&#039;&#039; In order to choose the most useful channel and frequency for online feedback, perform similar analyses for the remaining conditions:&lt;br /&gt;
*In the analysis program&#039;s &#039;&#039;&#039;Target Condition 2&#039;&#039;&#039; field, enter &amp;lt;tt&amp;gt;states.StimulusCode == 1&amp;lt;/tt&amp;gt;, and &#039;&#039;Left Hand&#039;&#039; into &#039;&#039;&#039;Target Condition Label 2&#039;&#039;&#039;.&lt;br /&gt;
*Make sure the &#039;&#039;&#039;Overwrite existing plots&#039;&#039;&#039; check box is unchecked.&lt;br /&gt;
*Click &#039;&#039;Generate Plots&#039;&#039; to create a feature plot for imagined movement of the left hand.&lt;br /&gt;
*As previously, pick the four largest r-squared values, and compute spectra and topographies for their channels and frequencies.&lt;br /&gt;
*Results should somewhat resemble that derived for the right hand, except that the colored activity changes should appear over the right and not the left motor cortex.&lt;br /&gt;
*Repeat the analysis for conditions &amp;lt;tt&amp;gt;states.StimulusCode == 3&amp;lt;/tt&amp;gt;: &#039;&#039;Both Hands&#039;&#039;, and &amp;lt;tt&amp;gt;states.StimulusCode == 4&amp;lt;/tt&amp;gt;: &#039;&#039;Both Feet&#039;&#039;.&lt;br /&gt;
**For the &#039;&#039;both hands&#039;&#039; condition, the result should resemble a combination of &#039;&#039;left hand&#039;&#039; and &#039;&#039;right hand&#039;&#039; results.&lt;br /&gt;
**For &#039;&#039;both feet,&#039;&#039; modulated activity should be centered around electrode Cz.&lt;br /&gt;
&lt;br /&gt;
==Picking Optimal Features==&lt;br /&gt;
&lt;br /&gt;
Here we are looking for the frequency with the highest r-squared value and is between 9Hz and 36Hz. Further, acceptable readings are centered on the proper electrode for the predicted stimulus; C3 for readings from the right hand, C4 for the left hand, both C3 and C4 for both hands, and Cz for both feet.&lt;br /&gt;
&lt;br /&gt;
Equipped with the frequency and electrode that provides the reading with the highest r-squared value, we can begin configuring the setup for proper use.&lt;br /&gt;
&lt;br /&gt;
==Next Step==&lt;br /&gt;
[[User Tutorial:Configuring Online Feedback|Configuring Online Feedback]] shows you how to configure the BCI system using the parameters obtained in the analysis.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Tutorial:Mu Rhythm BCI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:ControlPanelDefault-circled.PNG&amp;diff=5221</id>
		<title>File:ControlPanelDefault-circled.PNG</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:ControlPanelDefault-circled.PNG&amp;diff=5221"/>
		<updated>2009-08-24T20:31:39Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5089</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5089"/>
		<updated>2009-07-08T20:35:26Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process will take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
Several cables must be assembled in order to use the system. The final system schematic can be seen above, in the &#039;&#039;Connectors Schematic&#039;&#039;. &lt;br /&gt;
===Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*3 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in+ Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*Soldering Iron and Solder&lt;br /&gt;
&lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
# Strip the free ends of the 6 safety connector wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of one of the mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Each connector now has a signal and ground wire that can be connector to the g.USBamp inputs, or any amplifier that accepts the standard EEG connector.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Electrical Wires&lt;br /&gt;
*7-Pin Digital Connector from &#039;&#039;&#039;g.tec&#039;&#039;&#039;&lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin, and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
# Strip the ends of the 3 wires (~1/4 in)&lt;br /&gt;
# Take one wire, and solder the wire to the &amp;quot;signal&amp;quot; pad of the female mono audio connectors.&lt;br /&gt;
# Solder another wire to the &amp;quot;ground&amp;quot; pad of the same connector.&lt;br /&gt;
# If necessary, pass the wires through end of the connector that screws in to cover the connection (see below, in the &#039;&#039;g.USBamp Amplifier Plug&#039;&#039;).&lt;br /&gt;
# Solder the ground wire to the center ground pin on the digital I/O connector.&lt;br /&gt;
# Locate the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch.&lt;br /&gt;
# Solder the signal wire from the mono connector to pin 3 (digital out 1)&lt;br /&gt;
# Finally, solder the remaining wire (it has not been connected to anything yet) between pin 3 and pin 4. This connects the digital output directly to the digital input.&lt;br /&gt;
# It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
# Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel.&lt;br /&gt;
# Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;br /&gt;
&lt;br /&gt;
# For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides in the figure below.&lt;br /&gt;
# One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector.&lt;br /&gt;
# Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
# Place the end piece over the connector, with the red dot on top and aligned with the connector notch.&lt;br /&gt;
# Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next, similar to the. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5088</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5088"/>
		<updated>2009-07-08T20:15:52Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Assembling Required Cables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process will take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5087</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5087"/>
		<updated>2009-07-08T20:14:57Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process will take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on &amp;quot;Pass/Fail&amp;quot;====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;br /&gt;
&lt;br /&gt;
==Assembling Required Cables==&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5086</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5086"/>
		<updated>2009-07-08T20:13:32Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process will take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;br /&gt;
The results text file contains detailed results for all tasks. A sample output for a single task is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
File	Task	Pass/Fail	Avg(ms)	Med(ms)	Std(ms)	Min(ms)	Max(ms)&lt;br /&gt;
[0] CursorTaskLow_1200_16ch_100msS001R01.dat	Duration=23.00s&lt;br /&gt;
	Amp     : pass		1.80	1.67	0.91	0.83	10.00&lt;br /&gt;
	DigAmp  : pass		0.16	0.00	0.98	0.00	9.17&lt;br /&gt;
	VidSys  : pass		39.77	38.33	10.72	20.00	62.50&lt;br /&gt;
	Jitter  : pass		0.00	0.00	1.38	-9.00	9.00&lt;br /&gt;
	ProcLat : pass		13.77	14.00	0.52	13.00	15.00&lt;br /&gt;
	VidOut  : pass		23.80	22.37	10.72	4.04	46.54&lt;br /&gt;
	Overall	PASSED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the far left, the task number is shown in square brackets (e.g., &amp;quot;[0]&amp;quot;). In the next column, the specific latencies measured for this task are listed (e.g., &amp;quot;Amp&amp;quot;, &amp;quot;DigAmp&amp;quot;, etc). In the next column, the latency is given a &amp;quot;pass&amp;quot; or &amp;quot;fail.&amp;quot; Finally, the next columns list the mean, median, standard deviation, minimum, and maximum latencies in ms. The last row (&amp;quot;Overall&amp;quot;) shows whether the entire task passed or failed.&lt;br /&gt;
&lt;br /&gt;
At the bottom of this file, more results are shown, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-------------------------------&lt;br /&gt;
Video Output Latency: 17.58 +/- 11.83 ms&lt;br /&gt;
Audio Output Latency: 62.12 +/- 10.24 ms&lt;br /&gt;
&lt;br /&gt;
-------------------------------&lt;br /&gt;
79/100 tests passed.&lt;br /&gt;
&lt;br /&gt;
Warning: the following test configurations did not pass:&lt;br /&gt;
 32 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The overall video and audio output latencies means and standard deviations for the system are shown, determined from all of the tasks combined. Next, a summary of the tests that passed are shown (&amp;quot;79/100 tests passed&amp;quot;), and warnings are provided for the tests that did not pass.&lt;br /&gt;
&lt;br /&gt;
====A Note on Pass/Fail====&lt;br /&gt;
The values that determine whether or not a task passes or fails are determined somewhat arbitrarily. For example, we determined that an audio output latency of more than 50 ms is unacceptable for psychophysical research, e.g., BCIs. In the example shown, the audio output latency was ~62 ms for all tasks with audio, and thus these tasks registered as a &amp;quot;fail.&amp;quot; However, it is ultimately up to the researcher to determine what is acceptable system timing; this method provides a method of quantifying the system latency values to simplify the process of making these decisions.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5085</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5085"/>
		<updated>2009-07-08T19:53:35Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up and Running the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Data===&lt;br /&gt;
Simply pressing the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button will pass the appropriate parameters to the program. It is also possible to run the program manually from the command line.&lt;br /&gt;
&lt;br /&gt;
# If using the GUI to analyze data, be sure to save the current &amp;lt;code&amp;gt;*.ini&amp;lt;/code&amp;gt; file prior to starting. The analysis program uses the information in this file to determine how to analyze and interpret the data files.&lt;br /&gt;
# If the tasks have been altered in the BCI2000Certification program, go to &amp;lt;code&amp;gt;File-&amp;gt;Save *.ini&amp;lt;/code&amp;gt;, and create a new ini file. We recommend not overwriting the existing configuration files, and instead creating new ones if necessary.&lt;br /&gt;
# The analysis program will open in a new console window. The process will take several minutes.&lt;br /&gt;
# When it is finished, the results are saved to a text file, which can be found in the BCI2000 Certification folder. The file name will have the format &amp;lt;code&amp;gt;results_(date)_(time).txt&amp;lt;/code&amp;gt;. Additionally, this file will be opened automatically at the end of the process.&lt;br /&gt;
# In order to run the analysis program from the command line, two parameters are required: the data folder, and the *.ini file used. The program is run like: &amp;lt;code&amp;gt;BCI2000CertAnalysis.exe -d data -i BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interpreting Analysis Results===&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5084</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5084"/>
		<updated>2009-07-08T17:59:01Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
# Prepare to place the optical detector on the monitor by using a ring of double sided tape. The exact placement on the monitor will depend on the tasks used, and will be determined shortly. Plug the detector into the Optical Input A on the g.TRIGbox.&lt;br /&gt;
# Using a 1/8th in cable, connect the headphone output on the PC to the High Level input B of the g.TRIGbox.&lt;br /&gt;
# Next, the connectors should be configured. The procedure for creating connector cables is described in detail later in this document. To summarize the procedure for the g.USBamp, and as shown in the figure below:&lt;br /&gt;
## Using the digital I/O breakout connector for the USBamp, tie pin 3 (digital out 1) to pin 4 (digital in 0).&lt;br /&gt;
## Connect the digital out 1 female connector to a male connector, and plug the signal wire of the male connector into channel 1 of the amp.&lt;br /&gt;
## Connect output A of the g.TRIGbox to channel 2 of the amplifier.&lt;br /&gt;
## Connect output B of the g.TRIGbox to channel 3 of the amplifier.&lt;br /&gt;
## Using several EEG jumper wires, jumper the 3 ground cables together and input them to the Ground and Ref inputs of the amplifier.&lt;br /&gt;
# Next, the location to place the optical detector will be determined. The first task will be run, showing the location on the screen to place the connector.&lt;br /&gt;
# Press the Start button. BCI2000 will start shortly, and the application window will appear. In this test, the P300 Speller application is shown first.&lt;br /&gt;
# Place the detector over the &amp;quot;X&amp;quot; on the screen.&lt;br /&gt;
# Adjust the threshold on the g.TRIGbox for connector A so that it blinks on and off with the appearance of the &amp;quot;X&amp;quot;. It may be necessary to turn off the lights in the room so that ambient light does not interfere with the optical detector.&lt;br /&gt;
# When finished placing the detector and setting the threshold, press Cancel in the BCI2000Certification GUI, and then Quit BCI2000. Navigate to the location of the Data folder (e.g., &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;) and delete the data folder.&lt;br /&gt;
# Make sure that the computer volume is turned all the way up, and not muted.To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
[[image:Usbampconnections.png|frame|none|Connectors schematic.]]&lt;br /&gt;
# You are now ready to run all of the tests. To do so, press the Start button on the GUI.&lt;br /&gt;
# While testing, some tasks may not complete correctly, either because they are too computationally intensive for the selected computer system, or some other mistake or artifact occurred during the test. In this case, BCI2000 can be Quit manually, and the remaining tasks will be run. At the end of all tasks, you can then de-select all tasks, and re-check just the ones that need to be completed. It is necessary to delete data files in the data folder from unusable runs prior to running them again, so that the bad data is not included in the analysis.&lt;br /&gt;
# When all tasks are complete, press the &amp;lt;code&amp;gt;Analyze&amp;lt;/code&amp;gt; button to analyze the collected data. This procedure is detailed later in this document.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Usbampconnections.png&amp;diff=5083</id>
		<title>File:Usbampconnections.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Usbampconnections.png&amp;diff=5083"/>
		<updated>2009-07-08T17:32:21Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5082</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5082"/>
		<updated>2009-07-08T17:22:26Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to the folder &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system). &lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;br /&gt;
&lt;br /&gt;
===Setting Up the Certification Procedure===&lt;br /&gt;
# Load the appropriate configuration file, based on the number of amplifiers that you will be using and as described above.&lt;br /&gt;
# Plug-in and turn on the amplifier(s).&lt;br /&gt;
# Configure the multi-monitor system, if applicable.&lt;br /&gt;
# Enter the appropriate screen dimensions under &amp;lt;code&amp;gt;Window Width&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
#&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5081</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5081"/>
		<updated>2009-07-08T16:46:38Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system).&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Settings====&lt;br /&gt;
As the name suggests, the options under Global Settings are applied to all tasks, and are described here.&lt;br /&gt;
&lt;br /&gt;
;Window Left, Top&lt;br /&gt;
: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 &amp;lt;code&amp;gt;Window Left&amp;lt;/code&amp;gt; should be set to 1280, and &amp;lt;code&amp;gt;Window Top&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
;Window Width, Height&lt;br /&gt;
:The width and height of the application window.&lt;br /&gt;
&lt;br /&gt;
;Global Signal Source&lt;br /&gt;
:The executable that should be used by all applications. This program should be located in the &amp;lt;code&amp;gt;BCI2000/prog&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Data Save Directory&lt;br /&gt;
:The directory where all of the data should be saved during the task. This will appear in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/&amp;lt;/code&amp;gt;. &#039;&#039;&#039;NOTE that if data already exists in this directory, additional data will be saved to it!&#039;&#039;&#039; To avoid combining new data with earlier results, the existing directory with the same name should be renamed or deleted.&lt;br /&gt;
 &lt;br /&gt;
====4. Controls====&lt;br /&gt;
This panel handles starting and stopping the procedure, and running the analysis.&lt;br /&gt;
&lt;br /&gt;
;Start&lt;br /&gt;
:Starts the selected tasks.&lt;br /&gt;
&lt;br /&gt;
;Cancel&lt;br /&gt;
:Stops running tasks after the current task has completed. To stop immediately, press Cancel, and then press Quit in the BCI2000 program.&lt;br /&gt;
&lt;br /&gt;
;Analysis&lt;br /&gt;
:Start the analysis tool. This uses the directory entered in the &#039;&#039;&#039;Data Save Directory&#039;&#039;&#039; setting. See the documentation for the analysis tool for more information on the analysis procedure.&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5080</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5080"/>
		<updated>2009-07-08T16:36:59Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system).&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;br /&gt;
This section describes each user interface component, referring to the figure below.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool2.png|frame|none|The BCI2000Certification user interface components.]]&lt;br /&gt;
&lt;br /&gt;
====1. Task List====&lt;br /&gt;
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 &amp;lt;code&amp;gt;Select All&amp;lt;/code&amp;gt; check box at the bottom of the list.&lt;br /&gt;
&lt;br /&gt;
It is possible to create new tasks, remove tasks, and copy tasks within the interface as well. To create a new task, press the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;Copy&amp;lt;/code&amp;gt;. The new task should be renamed appropriately. To remove a task, select a task and press the &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
====2. Task Details====&lt;br /&gt;
The right side of the GUI displays the details of the currently selected task. Each option is described here.&lt;br /&gt;
&lt;br /&gt;
;Task Name&lt;br /&gt;
:The name of the task. This must not contain any spaces, and must be unique.&lt;br /&gt;
&lt;br /&gt;
;Signal Source&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Signal Processing&lt;br /&gt;
:The signal processing module that should be started and used for the given task. This should usually be either &amp;lt;code&amp;gt;ARSignalProcessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;P3SignalProcessing&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;DummySignalProcessing&amp;lt;/code&amp;gt;, depending on the specific application.&lt;br /&gt;
&lt;br /&gt;
;Parameters&lt;br /&gt;
: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 &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; buttons, respectively. All files should be placed in the &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification/parms&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
;Sample Rate&lt;br /&gt;
:The sampling rate that should be used for this task. Note that it must be supported by the amplifier used.&lt;br /&gt;
&lt;br /&gt;
;Sample Block Size&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Amp Channel&lt;br /&gt;
: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.&lt;br /&gt;
&lt;br /&gt;
;Digital Amp Channel&lt;br /&gt;
: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).&lt;br /&gt;
&lt;br /&gt;
;Video Channel&lt;br /&gt;
:The recorded channel containing video event markers.&lt;br /&gt;
&lt;br /&gt;
;(Video) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the video event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Video) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
;Audio Channel&lt;br /&gt;
:The recorded channel containing audio event markers.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State&lt;br /&gt;
:The BCI2000 state that contains the event markers for the audio event, e.g., TargetCode or StimulusCode.&lt;br /&gt;
&lt;br /&gt;
;(Audio) State Values&lt;br /&gt;
:A list of state change values that should be detected by the analysis. For example, if values &amp;lt;code&amp;gt;4 11&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
====3. Global Options====&lt;br /&gt;
====4. Controls====&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5079</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=5079"/>
		<updated>2009-07-08T15:15:22Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This document serves as the BCI2000Certification manual. A discussion and derivation of the specific system latencies are found at HERE.&lt;br /&gt;
&lt;br /&gt;
==Compiling the BCI2000Certification Programs==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To do so:&lt;br /&gt;
# Open the Borland IDE (e.g., Borland 6, Borland 2007, or Borland 2009)&lt;br /&gt;
# In &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, select &amp;lt;code&amp;gt;Open Project...&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to &amp;lt;code&amp;gt;BCI2000/src/core/Tools/BCI2000Certification&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select &amp;lt;code&amp;gt;BCI2000CertGroup.bpg&amp;lt;/code&amp;gt;&lt;br /&gt;
# If Borland 6 is not used, then the projects will be updated to the most recent version.&lt;br /&gt;
# Right-click the topmost project in the group, and select &amp;lt;code&amp;gt;Make All From Here&amp;lt;/code&amp;gt; to compile the programs.&lt;br /&gt;
&lt;br /&gt;
==Using the BCI2000Certification Procedure==&lt;br /&gt;
===Starting the User Interface===&lt;br /&gt;
# The compiled programs can be found in &amp;lt;code&amp;gt;BCI2000/tools/BCI2000Certification&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Navigate to this folder, and double-click the &amp;lt;code&amp;gt;BCI2000Certification.exe&amp;lt;/code&amp;gt; file.&lt;br /&gt;
# The certification tool opens, as below.&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
===Loading Configuration Files===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
# In the BCI2000Certification tool, select &amp;lt;code&amp;gt;File-&amp;gt;Open *.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
# Load the file named &amp;lt;code&amp;gt;BCI2000Certification_32ch_100ms.ini&amp;lt;/code&amp;gt; if using a 32-channel system, or &amp;lt;code&amp;gt;BCI2000Certification_16ch_100ms.ini&amp;lt;/code&amp;gt; if using 16 channels. (This tutorial assumes a 32-channel system).&lt;br /&gt;
# All 100 tests in this configuration are loaded into the GUI.&lt;br /&gt;
&lt;br /&gt;
===User Interface Components===&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:Certificationtool2.png&amp;diff=5078</id>
		<title>File:Certificationtool2.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:Certificationtool2.png&amp;diff=5078"/>
		<updated>2009-07-08T15:15:14Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4978</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4978"/>
		<updated>2009-05-27T18:59:31Z</updated>

		<summary type="html">&lt;p&gt;Awilson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Latencies==&lt;br /&gt;
Briefly, the different latencies inherent in the BCI2000 system include amplifier latency, processing latency, output latency, and the sum of these, the system latency. Additionally, the block duration jitter will be measured.  The figure below provides a timeline of events that occur within a single block of data, with significant time points labeled. This figure provides an accurate account of the order in which events occur within a block of data, although the time intervals are not necessarily to scale.&lt;br /&gt;
&amp;lt;span id=&amp;quot;TimeLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:timeline3.png|frame|none|Timeline of events. Time intervals are not to scale.]]&lt;br /&gt;
&lt;br /&gt;
===Defining Latencies===&lt;br /&gt;
====Amplifier Latency====&lt;br /&gt;
Amplifier Latency is the minimum delay between the time that a signal is presented at the amplifier input, to when it has been acquired in the source module. Depending on configuration, this may comprise physical signal delay in the amplifier, digitization, transmission from the amplifier to the PC, and processing time inside a hardware driver. That minimum delay occurs for the last sample of a data block, which, unlike its preceding samples in the same block, will spend only a minimum time in hardware and software buffers. In [[#TimeLine|Timeline]],&lt;br /&gt;
&lt;br /&gt;
Amplifier latency = &amp;lt;math&amp;gt;t_{0}-t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For amplifiers connected via bandwidth-limited serial interfaces, transmission latency may have a measurable impact on amplifier latency, depending on the hardware. When using USB 2.0, as is the case for the g.USBamp, transmission latency may generally neglected, as illustrated by the following example: USB 2.0 has a maximum transmission rate of 480 Mbit/s. If we are acquiring 16 channels of 32-bit data, and transmitting in blocks of 16 samples, this is 8192 bits of data; at USB 2.0 speed, this should take roughly 17 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s to transfer. However, a more realistic approximation for USB 2.0 speeds is 240 Mbit/s, which increases the transfer delay to 34 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s. For sampling rates below 30 kHz, this is less than a single sample&#039;s duration.&lt;br /&gt;
&lt;br /&gt;
In addition to amplifier latency, system performance will be influenced by buffering latency. Buffering latency is dependent on the sample block buffer size: When a data sample is digitized, it is not immediately transferred to the PC, but is stored in memory on the amplifier. The PC then makes the appropriate request to the amplifier, and a block of data is transferred all at once to reduce the processing load. This implies that a signal that is digitized at the start of the buffer must wait until the buffer is full to be read into the PC. For example, if the sample block size is 16 samples, the first sample must wait 15 more samples before it can be used in the application. Fortunately, this latency is always known, and can be reduced with a higher sampling rate and/or smaller block sizes, assuming the PC can handle the increased overhead. Buffering latency does not affect the acquisition-to-display latency, because processing occurs immediately after a block&#039;s last sample, which is not affected. Still, it is an important factor to keep in mind, because a large sample block size and/or a small sample rate will decrease the refresh rate for the application (e.g., at a sample rate of 256 Hz and a sample block size of 128 samples, the application will only be refreshed every 0.5 s.)&lt;br /&gt;
&lt;br /&gt;
====Processing Latency====&lt;br /&gt;
Processing Latency is the total time it takes for the data to be processed by all BCI2000 modules (SignalSource, SignalProcessing, and Application).&lt;br /&gt;
&lt;br /&gt;
Processing latency = &amp;lt;math&amp;gt;t_{2}-t_{0}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Processing latency strongly depends on CPU speed, and if this latency becomes too large, high CPU load will probably be the cause, implying decreased or unsuitable BCI2000 performance.&lt;br /&gt;
&lt;br /&gt;
====Output Latency====&lt;br /&gt;
Output Latency is the latency from the time that the Application module issues a command to change the display or issue a sound (or another output), to the time that this output actually occurs.&lt;br /&gt;
&lt;br /&gt;
Output latency = &amp;lt;math&amp;gt;t_{3}-t_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====System Latency====&lt;br /&gt;
System Latency is the minimum time interval between a change in amplifier input, and a causally related change in application output. This is the sum of the above latencies, Amplifier, Processing, and Output. &lt;br /&gt;
&lt;br /&gt;
System latency = &amp;lt;math&amp;gt;t_{3} - t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Block Duration, Block Duration Jitter====&lt;br /&gt;
Block Duration is the time interval between adjacent blocks of data, normalized to the ideal duration of a data block as determined from sampling rate and sample block size:&lt;br /&gt;
&lt;br /&gt;
Block Duration = &amp;lt;math&amp;gt;\frac{t_{5}-t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When the system operates in real time, mean Block Duration will always be 1. Measuring Block Duration has the purpose of obtaining Block Duration Jitter as its standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Measuring Latencies===&lt;br /&gt;
The procedure for measuring the system latencies are below. In general, a combination of recorded events and software time-stamps recorded in BCI2000 data files to determine when important events occur, with ms or better time resolution.&lt;br /&gt;
[[Image:OutTimeline1.png|thumb|500px|none|Recorded events used for measuring latencies.]]&lt;br /&gt;
&lt;br /&gt;
====Measuring Amplifier Latency====&lt;br /&gt;
In [[#TimeLine|TimeLine]], Amplifier Latency is the time interval between the sampling of a data block&#039;s last sample, and its acquisition into the source module&#039;s data buffer:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} = t_{0} - t_{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To measure this latency, the Source module will set a digital output on the amplifier to a high value at time &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; immediately following data acquisition, as indicated in [[#overview|Overview]]. The digital output level is 3.3 V, so a voltage divider may required to attenuate the signal level to the range of amplifier input. This signal is then recorded on an input channel on the amplifier (time &amp;lt;math&amp;gt;t_{1}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In the recorded data, we may then identify &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt;, which is the beginning of sample block &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, by its sample offset, which also coincides with BCI2000 state changes. &amp;lt;math&amp;gt;t_1&amp;lt;/math&amp;gt; may be identified by a change in the recorded signal, occurring in the channel that was connected to the digital output during measurement.&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} \approx t_{0} - t_{-1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Processing Latency====&lt;br /&gt;
The processing latency is defined as the amount of time that it takes for the computer to process the data after acquiring it, to when the application module output is changed. In [[#TimeLine|TimeLine]], this is the time from &amp;lt;math&amp;gt;t_{0}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t_{2}&amp;lt;/math&amp;gt;. Processing latency is calculated using two timestamps saved with every block of data, &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, immediately following data acquisition in the Source module, and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_2&amp;lt;/math&amp;gt; immediately following application presentation in the Application module. Therefore, processing latency for each block of data is calculated as the difference between time stamps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 \mathrm{Processing Latency} = \mathrm{StimulusTime} - \mathrm{SourceTime} = t_{2} - t_{0}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Application Output Latency====&lt;br /&gt;
&amp;lt;span id=&amp;quot;outOverview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
There are many possible application output types, including visual (i.e., the computer screen), audio, or mechanical (e.g., a robotic arm). The core BCI2000 system primarily uses visual and audio output, and so the default testing system will focus on these.&lt;br /&gt;
&lt;br /&gt;
Both visual and audio output can be measured using the g.TRIGbox signal conditioner, which accepts inputs from optical sensors, microphones, or any other input. The user sets a threshold for the input signals, and the g.TRIGbox outputs a digital pulse whenever this threshold is exceeded. This output is then recorded back into the amplifier system, so that the analysis program can measure the response times for each output.&lt;br /&gt;
&lt;br /&gt;
We identify event &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; by a change in the data channel connected to the amplifier&#039;s digital output, and event &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by a change in the data channel connected to the g.TRIGbox, and compute their difference. Also, both events are affected by Amplifier Latency in the same way, so we may ignore Amplifier Latency, and have&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
\mathrm{Output Latency} = t_{3} - t_{2} = (t_3-t_0)-(t_2-t_0) = (t_3-t_0)-\mathrm{ProcessingLatency}.&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring System Latency====&lt;br /&gt;
As defined above, System Latency is the sum of Amplifier Latency, Processing Latency, and Output Latency. It is important to realize that the system latency is dependent on the output modality used, i.e., the video system latency and the audio system latency will vary on the same system due to the differences in output latencies.&lt;br /&gt;
The system latency may be measured&lt;br /&gt;
#directly, by identifying &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt; as the beginning of a data block by its sample index, and &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by the signal change in the channel connected to the g.TRIGbox, and then calculating&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=t_3-t_{-1}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#or indirectly, by using the previously measured quantities&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=\mathrm{AmplifierLatency}+\mathrm{ProcessingLatency}+\mathrm{OutputLatency}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Measuring Block Duration====&lt;br /&gt;
Block Duration is measured as the time between adjacent blocks of data, divided by the theoretical ideal value, which is the sample block duration. For the actual measurement, we use the difference between subsequent &amp;lt;math&amp;gt;\textrm{SourceTime}&amp;lt;/math&amp;gt; time stamps which are recorded at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t_8&amp;lt;/math&amp;gt; in [[#TimeLine|Timeline]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{BlockDuration} = \frac{t_{5} - t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
=\frac{\Delta \mathrm{SourceTime}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Latency Calculation Overview===&lt;br /&gt;
Latencies are calculated by comparing changes in a BCI2000 state value to changes in a recorded signal. The analysis program follows these general steps in calculating the various latencies:&lt;br /&gt;
&lt;br /&gt;
#Determine which threshold values to use based on the &#039;&#039;thresh&#039;&#039;  definition in the BCI2000Certification.cfg file, which defines a threshold based on the amplifier used. For example, the g.USBamp has an input range of -250 mV to + 250 mV, and the g.TRIGbox outputs from 0 to 200 mV, so the threshold used is about 12.5 mV.&lt;br /&gt;
#Traverse the state values for a selected state and find where the state changes from 0 to a given value (or any value). The sample at which this occurs is saved for later use in &amp;lt;math&amp;gt;stateChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#When this occurs, start looking through &amp;lt;math&amp;gt;Signal_{norm}&amp;lt;/math&amp;gt; to find when a rising edge exceeds the determined threshold value. The sample at which this occurs is saved in &amp;lt;math&amp;gt;sigChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#The latency for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th state change is calculated as: &lt;br /&gt;
#:&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
latency_n = \frac{sigChangePos_n-stateChangePos_n}{SampleRate}&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt; &lt;br /&gt;
#:and is stored in an array.&lt;br /&gt;
#Once the entire state vector is traversed, the mean, standard deviation, minimum and maximum values for this latency are calculated and reported.&lt;br /&gt;
&lt;br /&gt;
==Getting Started With the Default Tests==&lt;br /&gt;
This section provides step-by-step instructions on running the default certification procedure. Note that some cables must be assembled before the testing can be done; see the end of this document for information on assembling the cables.&lt;br /&gt;
&lt;br /&gt;
===Starting the Procedure===&lt;br /&gt;
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. To do so, navigate to the BCI2000/tools/BCI2000Certification folder, and start the BCI2000Certification.exe program. This program appears as:&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
====Load a Configuration File====&lt;br /&gt;
To get started, load a provided configuration file by selecting File-&amp;gt;Open INI. The standard configurations are for 8, 16, and 32 channels, and are located in the BCI2000/tools/BCI2000Certification/ folder. These are named BCI2000Certification_32ch_100ms.ini, BCI2000Certification_16ch_100ms.ini, and BCI2000Certification_8ch_100ms.ini, respectively.&lt;br /&gt;
&lt;br /&gt;
====Sampling Rate====&lt;br /&gt;
This is set to 512 by default. This can be changed to another value that will apply to all tests, except those that explicitly override it in their own parameter file.&lt;br /&gt;
&lt;br /&gt;
====Display parameters====&lt;br /&gt;
These are on the lines that begin with &amp;lt;code&amp;gt;Application:Window&amp;lt;/code&amp;gt;. For many labs, the default settings should work fine; the window is setup to appear in the top-left corner of the main window (&amp;lt;code&amp;gt;WindowLeft= 0&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowTop= 0&amp;lt;/code&amp;gt; ), and is 800 wide by 800 pixels tall (&amp;lt;code&amp;gt;WindowWidth= 800&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight= 800&amp;lt;/code&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
Users with a dual-screen configuration may wish to change this so that the BCI2000 window is on the secondary monitor; to do so, the &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  parameter should be changed, which depends on the resolution and orientation of both monitors. For example, if the 2nd monitor is to the right of the primary monitor, and both monitors have a resolution of 1280x1024 pixels, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1280&amp;lt;/code&amp;gt;  will place the window on the 2nd monitor. Similarly, if the 2nd monitor is to the left of the primary monitor, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;-1280&amp;lt;/code&amp;gt;  will accomplish the same thing. If the monitors have different resolutions (e.g., monitor 1 is 1600x1200 and monitor 2 is 1024x768, located to the right of the 1st monitor), the position should change accordingly. For example, in this scenario, to set the window to the right of the main window, set &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1600&amp;lt;/code&amp;gt; . Finally, set the &amp;lt;code&amp;gt;WindowWidth&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight&amp;lt;/code&amp;gt;  to appropriate values for full-screen, if desired. To summarize, for the dual-screen case in which monitor 1 is 1600x1200 pixels, and monitor 2, to the right of 1, is 1024x768 pixels, and the BCI2000 window should be full-screen on monitor 2, the parameters should look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;Application:Window int WindowWidth= 1024 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowHeight= 768 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowLeft= 1600 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowTop= 0 ...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that nothing following the ... needs to be changed above in the parameter file.&lt;br /&gt;
&lt;br /&gt;
===Connect the Amplifier to the Trigger Box, and Attach Sensors===&lt;br /&gt;
[[Image:connections.png|frame|none|Connections overview]]&lt;br /&gt;
&lt;br /&gt;
This section describes the steps for connecting the necessary hardware. Refer to the Connections Overview figure above for additional information; each step is numbered in this figure.&lt;br /&gt;
&lt;br /&gt;
#Connect the amplifier to the computer; the supported g.tec amps are connected via USB, RS232, or Bluetooth.&lt;br /&gt;
#Connect the Digital I/O cable (see bottom of this document) to the amplifier on the Digital I/O port.&lt;br /&gt;
#Connect the reference and ground wires from the assembled amplifier cables to the amplifier reference and ground connections.&lt;br /&gt;
#Connect the amplifier cables with the safety connectors into channels 1, 2, and 3 on the g.USBamp.&lt;br /&gt;
#Connect the digital output line to the channel 1 amplifier cable.&lt;br /&gt;
#Connect the A output from the trigger box to the channel 2 amplifier cable.&lt;br /&gt;
#Connect the B output from the trigger box to the channel 3 amplifier cable.&lt;br /&gt;
#Connect the optical sensor plug to the g.TRIGbox, using the optical sensor input channel A.&lt;br /&gt;
#Connect the computer audio output using a stereo cable to the g.TRIGbox, using the high-level input channel B.&lt;br /&gt;
&lt;br /&gt;
===Setup Sensor Thresholds===&lt;br /&gt;
The audio and optical sensors each have a threshold setting on the g.TRIGbox, along with an LED indicating whether the current input is above threshold for each channel. At rest, each trigger should be off; if any is on, turn the threshold knob counter-clockwise until the LED is off.&lt;br /&gt;
&lt;br /&gt;
====Audio Threshold====&lt;br /&gt;
To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
&lt;br /&gt;
====Video Threshold====&lt;br /&gt;
To set the video threshold, first tape the optical sensor to the monitor in approximately the correct location, based on the information in the latencyTest.prm file for the window position and dimensions. To activate the optical trigger on the g.TRIGbox, drag a white window, such as a Notepad window, in the background under the sensor. Move the threshold knob for channel A until the LED for that channel is just on (i.e., turning it down just a little turns the trigger off). The sensor will be placed more accurately in the following step.&lt;br /&gt;
&lt;br /&gt;
===Starting the Software===&lt;br /&gt;
Navigate to BCI2000/tools/BCI2000Certification, and double-click the BCI2000Certification.exe program. The BCI2000 program should start, with the output window in the location specified in the latencyTest.prm file. If there are any errors at startup, the BCI2000 error log will report them. If there are errors, correct them, exit out of the BCI2000Certification.exe program, and restart the program.&lt;br /&gt;
&lt;br /&gt;
===Setting up the Optical Sensor===&lt;br /&gt;
Each application has a unique display configuration, where the visual target of interest is located in a specific position on the monitor. Generally, the optical sensor will not likely have to be moved far in between tasks due to the design of the parameter files. However, it is still necessary to ensure that the sensor is in the correct position for each task, and to be able to change the position if necessary. This section describes the process to find the correct location on the monitor for the sensor. To begin, the certification procedure should be started.&lt;br /&gt;
&lt;br /&gt;
====P3Speller====&lt;br /&gt;
The P3Speller task has an group of letters arranged into rows and columns. The analysis uses the letter in the 3rd column and 3rd row, which will contain the letter X when the program is run. This location should be very close to that specified for the CursorTask, described above. Fortunately, the arrangement of the letters is shown before the test starts, which allows the sensor to be adjusted if necessary. All of the following default tasks are setup so that the optical sensor does not need to be moved from this position.&lt;br /&gt;
&lt;br /&gt;
====CursorTask====&lt;br /&gt;
In the default configuration, the optical sensory does not need to be moved from the position used for the P3Speller task. For custom tests, the flashing object must either be placed under the sensor, or the sensor needs to be moved to the correct position.&lt;br /&gt;
&lt;br /&gt;
====StimulusPresentation====&lt;br /&gt;
For the StimulusPresentation tasks, a single large icon appears in the center of the screen, which will be detected by the sensor. The default location of the sensor as defined for the CursorTask should be able to capture the icon on the screen. However, if the task begins and it appears that it is outside the icon location, move the sensor to the middle of the icon. Keep in mind that it may have to be relocated for following tasks.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
Once the optical sensor is setup and calibrated for a task, begin the testing process. To start the process, press the Start button in the BCI2000 operator window. At the end of each task, the program will quit automatically, and the next one will start automatically. For each task, press the Start button to begin.&lt;br /&gt;
&lt;br /&gt;
Occasionally, the optical sensor may not be in the exact correct place for a given task.You should be able to see changes in on the video channel (channel 2 by default) in the window showing the recorded channels. If the signal is not changing when it should be (e.g., during the correct visual stimulus), you may try increasing the threshold to catch the stimulus, or you may need to place the sensor in the correct location. To do this, place the sensor in the better location, then quit the current BCI2000 test, and quit the BCI2000Certification program. The procedure will need to be restarted.&lt;br /&gt;
&lt;br /&gt;
When the testing is complete, the BCI2000CertAnalysis program will automatically start. It will analyze the data that have been collected, and return the results in the results.txt file. In general, a Pass or Fail will be written next to a task, and each task component, if it passed or failed the test. For more information on interpreting results, see below.&lt;br /&gt;
&lt;br /&gt;
==BCI2000Certification: Additional Information==&lt;br /&gt;
The previous section on Getting Started provided information to quickly setup and run the default tests. This section provides detailed information about each file used, and how to modify the files for your specific system and applications.&lt;br /&gt;
&lt;br /&gt;
===Overview of Important Files===&lt;br /&gt;
There are several important files that are used in the BCI2000 Certification procedure. These files and their contents are described in this section. &lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.ini====&lt;br /&gt;
The BCI2000Certification.ini file contains the information that defines each task configuration. It is located in the BCI2000/tools/BCI2000Certification/ folder. It specifies the parameter file, the SignalSource, SignalProcessing, and Application modules, and the analysis definitions for each task. It contains all of the default tests, although it can easily be expanded to include additional or customized task configurations.&lt;br /&gt;
&lt;br /&gt;
Each task is defined by a set of &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; , space-separated fields, as described below. A * indicates an optional field. The % character indicates a comment, and everything following that character is ignored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; The name of the task, which should be unique. This generally describes the task. It must not contain any spaces. This value determines the path to the saved data file, and the name of the file itself. For example, the name StimulusPresentation_512 would create a file at &amp;lt;code&amp;gt;./Data/StimulusPresentation_512001/StimulusPresentation_512S001R01.dat&amp;lt;/code&amp;gt; Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;name StimulusPresentation_512&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;parm&#039;&#039;&#039;The BCI2000 *.prm file used for this task. It should be placed in the BCI2000/tools/BCI2000Certification/parms/ folder. Note that the CertificationMain.prm is included in &#039;&#039;all&#039;&#039;  configurations by default, and does not need to be listed here. This file contains the information for this specific task configuration. See above for further information.&lt;br /&gt;
**&amp;lt;code&amp;gt;parm SimpleAV.prm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SignalSource module to be used for this test. The g.tec g.USBamp system is used in all configurations by default. If the g.MOBIlab or g.MOBIlab+ are used, the SignalSource module should be changed to the appropriate executable. All BCI2000 executables are located in BCI2000/prog/. Examples:&lt;br /&gt;
**&amp;lt;code&amp;gt;&#039;source gUSBampSource.exe&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;source gMOBIlabSource.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;sigproc&#039;&#039;&#039; The SignalProcessing module that is used for this configuration. This is likely dependent on the application used as well. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;sigproc P3SignalProcessing.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;app&#039;&#039;&#039; The application for this configuration. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;app StimulusPresentation.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*amp&#039;&#039;&#039; This is a single value that gives the channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;amp 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*dAmp&#039;&#039;&#039; This is a single value that specifies a digital input channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;dAmp 15&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*vid&#039;&#039;&#039; This field is followed by 3 values, that give the channel number that is recording the video output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;vid 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*aud&#039;&#039;&#039;  This field is followed by 3 values, that give the channel number that is recording the audio output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;aud 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;skip&#039;&#039;&#039; Entering &#039;&#039;&#039;skip&#039;&#039;&#039;  will cause this task to not be run or analyzed. This is used to reduce the number of tasks that are run, which helps to repeat individual tasks that may have had problems in previous sessions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; This must come at the end of each task definition.&lt;br /&gt;
&lt;br /&gt;
In addition to task-specific entries, there are several global entries that will apply to every task, unless explicitly overwritten in that task. This allows the user to quickly change settings for all tasks simultaneously, e.g., if tests will be run using a g.tec g.USBamp for one set of tests, and a g.tec g.MOBIlab for another. Global entries must be defined at the beginning of the BCI2000Certification.ini file outside of the task definitions. These entries are defined as:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SourceModule to be used for all tests, unless explicitly overwritten by an individual task. Otherwise identical to the &#039;&#039;&#039;source&#039;&#039;&#039;  definition in a task entry.&lt;br /&gt;
*&#039;&#039;&#039;export&#039;&#039;&#039; This entry does not use any other parameters on the line on which it is defined. If &#039;&#039;&#039;export&#039;&#039;&#039;  is present in the BCI2000Certification.ini file, test results will be written to a comma-separated-value (CSV) text file that is located in the folder where data is saved for each task. For example, if the data folder is BCI2000/tools/BCI2000Certification/latencyData/, then the export file for the SimpleTarget task will be placed in the folder BCI2000/tools/BCI2000Certification/latencyData/SimpleTarget.&lt;br /&gt;
&lt;br /&gt;
Here is a full example entry that includes two tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source gUSBampSource&lt;br /&gt;
export&lt;br /&gt;
&lt;br /&gt;
name StimulusPresentation_512&lt;br /&gt;
parm StimulusPresentation_512.prm&lt;br /&gt;
sigproc P3SignalProcessing&lt;br /&gt;
app StimulusPresentation&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 StimulusCode 3&lt;br /&gt;
aud 2 StimulusCode 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
name CursorTask_1200&lt;br /&gt;
parm CursorTask_1200.prm&lt;br /&gt;
source gMOBIlab&lt;br /&gt;
sigproc ARSignalProcessing&lt;br /&gt;
app CursorTask&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 TargetCode 1&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;  task uses the &amp;lt;code&amp;gt;gUSBampSource&amp;lt;/code&amp;gt;  source module, and records block-triggered digital outputs on channel 0, video output triggered off of stimulus code 3 on channel 1, and audio output triggered off of stimulus code 3 on channel 2. The &amp;lt;code&amp;gt;SimpleTarget&amp;lt;/code&amp;gt;  tasks overrides the global &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; entry, and uses its own &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;  definition, specifying that a gMOBIlab should be used for acquisition instead of a gUSBamp. Finally, the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;  entry is set at the beginning, so test results for all files are output to a CSV file.&lt;br /&gt;
&lt;br /&gt;
The BCI2000Certification.ini file contains many task definitions. Each entry is read by the BCI2000Certification.exe program, and is entered as a separate task to be run and then analyzed.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.cfg====&lt;br /&gt;
The latencyTest.prm file is located in the BCI2000/tools/BCI2000Certification/ folder. It contains many default settings and definitions that determine how the results are interpreted, and should generally not be changed by the user. The timing definitions provide the absolute maximum latencies in ms for each step in the system chain, and include the Amp, ProcLat, VidOut, AudOut, VidSys, AudSys, and Jitter (see below for explanations). Timing definitions can include either one or two fields; the first field is mandatory, and is the mean value in ms, while the second field is optional, and is the standard deviation in ms.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Amp&#039;&#039;&#039; The amplifier latency.&lt;br /&gt;
*&#039;&#039;&#039;ProcLat&#039;&#039;&#039; The processing latency.&lt;br /&gt;
*&#039;&#039;&#039;VidOut&#039;&#039;&#039; The video output latency.&lt;br /&gt;
*&#039;&#039;&#039;AudOut&#039;&#039;&#039; The audio output latency.&lt;br /&gt;
*&#039;&#039;&#039;VidSys&#039;&#039;&#039; The video system latency.&lt;br /&gt;
*&#039;&#039;&#039;AudSys&#039;&#039;&#039; The audio system latency.&lt;br /&gt;
*&#039;&#039;&#039;Jitter&#039;&#039;&#039; The system jitter. This is the difference, in ms, between the actual block duration and theoretical block duration, which is determined by the block size.&lt;br /&gt;
*&#039;&#039;&#039;Threshold Source Value&#039;&#039;&#039; This is the threshold defined for a specific SignalSource module. Individual amplifiers may have different input ranges, resulting in recording signals with different ranges of magnitude. The &#039;&#039;&#039;Source&#039;&#039;&#039;  entry is a value in mV. For example, the threshold setting for the g.USBamp is &#039;&#039;&#039;Threshold gUSBampSource 12.5&#039;&#039;&#039; .&lt;br /&gt;
*&#039;&#039;&#039;ResultOut&#039;&#039;&#039; This is the file that contains the testing results.&lt;br /&gt;
*&#039;&#039;&#039;DataDir&#039;&#039;&#039; The default data directory. It defaults to latencyData in the BCI2000/tools/BCI2000Certification/ folder. &lt;br /&gt;
&lt;br /&gt;
These values should not generally be changed by the user, although they may be updated in future BCI2000 versions.&lt;br /&gt;
&lt;br /&gt;
====CertificationMain.prm====&lt;br /&gt;
This parameter file contains some of the default task parameters common to every test, including the save location, monitor configuration, sampling rate, and visualization settings. Note that these parameters can be overwritten in the *.prm files for each individual test configuration.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.exe====&lt;br /&gt;
This file controls the execution of each task. It parses the BCI2000Certification.ini and BCI2000Certification.cfg files to determine which files and tasks to run, and controls the CPU load monitor. When all tasks are complete, this program calls the BCI2000Analysis.exe program to handle the analysis of the collected data.&lt;br /&gt;
&lt;br /&gt;
====BCI2000CertAnalysis.exe====&lt;br /&gt;
This program analyzes the data collected, and reports results to a data file. It uses the DataDir parameter in the BCI2000Certification.cfg file to determine where the data is located. Results are output to results.txt in the BCI2000/tools/BCI2000Certification/ folder.&lt;br /&gt;
&lt;br /&gt;
====Parameter Files====&lt;br /&gt;
Each task should have it&#039;s own parameter file that contains the unique configuration and settings for that task. For example, there may be several configurations that use the g.USBamp, ARSignalProcessing, and CursorTask, each with its own parameter file. These files end in .prm, and are placed in the BCI2000/tools/BCI2000Certification/parms/ folder.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Results===&lt;br /&gt;
Results are recorded to the BCI2000/tools/BCI2000Certification/results.txt file. The results for each task, and each applicable latency tested, are reported here. If the entire task  passed, then each test performed met the minimum timing requirements specified in the BCI2000Certification.cfg file. If one or more did not pass, then the specific test that did not pass the test has Fail written next to it.&lt;br /&gt;
&lt;br /&gt;
====What if a Task Did Not Pass?====&lt;br /&gt;
TO BE ADDED.&lt;br /&gt;
&lt;br /&gt;
==Certification Protocol==&lt;br /&gt;
This section describes how the testing protocol is run, the various components involved in the certification analysis, and how to interpret results.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
The certification protocol consists of running several BCI2000 applications in multiple configurations to determine if each application meets the minimum requirements for BCI2000, and to determine if individual configurations of an application meet the requirements. For example, the CursorFeedback task may be tested with several combinations of sampling rates, sample block sizes, and processed channels, only some of which may work with a given computer setup.&lt;br /&gt;
&lt;br /&gt;
The testing set is run from a single batch file called LatencyAnalysis.bat. This file is located in the folder BCI2000/tools/BCI2000Certification/batch. This batch file executes additional batch files in this folder, each corresponding to a different application configuration. Each of these batch files starts the Operator module, automatically loading multiple parameter files used for a given configuration. There is a general-purpose parameter file called latencyTest.prm that all configurations use. This file configures the save location for all latency tests, as well as default window positions and sampling rates. A second parameter file is passed to the operator that contains the parameters for a unique application configuration. After starting the operator module, the batch file starts the SignalSource module, SignalProcessing module, and Application module. The loaded configuration is set automatically, and the user needs only to press the start button to start the analysis.&lt;br /&gt;
&lt;br /&gt;
==Software Templates==&lt;br /&gt;
This describes how to implement the testing protocols for your own amplifier system and custom applications. This is useful for determining if your hardware setup and software is capable of maintaining an acceptable level of performance for real-time testing.&lt;br /&gt;
&lt;br /&gt;
===Amplifier Latency===&lt;br /&gt;
The amplifier latency requires an output that can be recorded by the amplifier. In the case of the g.USBamp, a digital output line is used, although either analog or digital outputs could be used in a system. &lt;br /&gt;
&lt;br /&gt;
In the SignalSource module code for your custom amp, find the Process function. Near the beginning of this function, before any data is acquired, set the output signal to 0, either a digital low or analog value of 0 V. This will be dependent on the particular amplifier and API used; for the g.USBamp, this function call looks like: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 0.&lt;br /&gt;
&lt;br /&gt;
At the end of the Process function, the output should be set to a high level. A similar function call will be used to above, only the value is 1 instead of 0; again, the function will be dependent on the system used, and whether analog or digital output is used. Here is the code for the g.USBamp:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 1.&lt;br /&gt;
&lt;br /&gt;
===Visual and Audio Latency===&lt;br /&gt;
Developing new video and optical latency tests does not necessarily require adding additional code to existing modules (beyond any customization already done). &lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
A list of officially supported hardware configurations, and suggested minimum requirements is provided.&lt;br /&gt;
&lt;br /&gt;
===Supported and Tested Hardware===&lt;br /&gt;
====Amplifiers====&lt;br /&gt;
   &lt;br /&gt;
*g.USBamp  &lt;br /&gt;
*gMOBIlab (Serial RS232)  &lt;br /&gt;
*gMOBIlab (Bluetooth)  &lt;br /&gt;
*TDT Pentusa (RX5)  &lt;br /&gt;
&lt;br /&gt;
===Minimum Requirements===&lt;br /&gt;
This table shows the minimum requirements for running BCI2000.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Minimum System Requirements for BCI2000&lt;br /&gt;
! CPU&lt;br /&gt;
| 1 GHz&lt;br /&gt;
|-&lt;br /&gt;
! RAM&lt;br /&gt;
|512 MB (dependent on OS; 1 GB for Windows Vista)&lt;br /&gt;
|-&lt;br /&gt;
! Video Card&lt;br /&gt;
|32 MB VRam; Hardware OpenGL Support&lt;br /&gt;
|-&lt;br /&gt;
! Sound Card&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! Monitor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! OS&lt;br /&gt;
|Windows 2000; Windows XP SP2 or Greater; Windows Vista&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4977</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4977"/>
		<updated>2009-05-27T18:58:03Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Getting Started With the Default Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Latencies==&lt;br /&gt;
Briefly, the different latencies inherent in the BCI2000 system include amplifier latency, processing latency, output latency, and the sum of these, the system latency. Additionally, the block duration jitter will be measured.  The figure below provides a timeline of events that occur within a single block of data, with significant time points labeled. This figure provides an accurate account of the order in which events occur within a block of data, although the time intervals are not necessarily to scale.&lt;br /&gt;
&amp;lt;span id=&amp;quot;TimeLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:timeline3.png|frame|none|Timeline of events. Time intervals are not to scale.]]&lt;br /&gt;
&lt;br /&gt;
===Defining Latencies===&lt;br /&gt;
====Amplifier Latency====&lt;br /&gt;
Amplifier Latency is the minimum delay between the time that a signal is presented at the amplifier input, to when it has been acquired in the source module. Depending on configuration, this may comprise physical signal delay in the amplifier, digitization, transmission from the amplifier to the PC, and processing time inside a hardware driver. That minimum delay occurs for the last sample of a data block, which, unlike its preceding samples in the same block, will spend only a minimum time in hardware and software buffers. In [[#TimeLine|Timeline]],&lt;br /&gt;
&lt;br /&gt;
Amplifier latency = &amp;lt;math&amp;gt;t_{0}-t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For amplifiers connected via bandwidth-limited serial interfaces, transmission latency may have a measurable impact on amplifier latency, depending on the hardware. When using USB 2.0, as is the case for the g.USBamp, transmission latency may generally neglected, as illustrated by the following example: USB 2.0 has a maximum transmission rate of 480 Mbit/s. If we are acquiring 16 channels of 32-bit data, and transmitting in blocks of 16 samples, this is 8192 bits of data; at USB 2.0 speed, this should take roughly 17 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s to transfer. However, a more realistic approximation for USB 2.0 speeds is 240 Mbit/s, which increases the transfer delay to 34 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s. For sampling rates below 30 kHz, this is less than a single sample&#039;s duration.&lt;br /&gt;
&lt;br /&gt;
In addition to amplifier latency, system performance will be influenced by buffering latency. Buffering latency is dependent on the sample block buffer size: When a data sample is digitized, it is not immediately transferred to the PC, but is stored in memory on the amplifier. The PC then makes the appropriate request to the amplifier, and a block of data is transferred all at once to reduce the processing load. This implies that a signal that is digitized at the start of the buffer must wait until the buffer is full to be read into the PC. For example, if the sample block size is 16 samples, the first sample must wait 15 more samples before it can be used in the application. Fortunately, this latency is always known, and can be reduced with a higher sampling rate and/or smaller block sizes, assuming the PC can handle the increased overhead. Buffering latency does not affect the acquisition-to-display latency, because processing occurs immediately after a block&#039;s last sample, which is not affected. Still, it is an important factor to keep in mind, because a large sample block size and/or a small sample rate will decrease the refresh rate for the application (e.g., at a sample rate of 256 Hz and a sample block size of 128 samples, the application will only be refreshed every 0.5 s.)&lt;br /&gt;
&lt;br /&gt;
====Processing Latency====&lt;br /&gt;
Processing Latency is the total time it takes for the data to be processed by all BCI2000 modules (SignalSource, SignalProcessing, and Application).&lt;br /&gt;
&lt;br /&gt;
Processing latency = &amp;lt;math&amp;gt;t_{2}-t_{0}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Processing latency strongly depends on CPU speed, and if this latency becomes too large, high CPU load will probably be the cause, implying decreased or unsuitable BCI2000 performance.&lt;br /&gt;
&lt;br /&gt;
====Output Latency====&lt;br /&gt;
Output Latency is the latency from the time that the Application module issues a command to change the display or issue a sound (or another output), to the time that this output actually occurs.&lt;br /&gt;
&lt;br /&gt;
Output latency = &amp;lt;math&amp;gt;t_{3}-t_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====System Latency====&lt;br /&gt;
System Latency is the minimum time interval between a change in amplifier input, and a causally related change in application output. This is the sum of the above latencies, Amplifier, Processing, and Output. &lt;br /&gt;
&lt;br /&gt;
System latency = &amp;lt;math&amp;gt;t_{3} - t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Block Duration, Block Duration Jitter====&lt;br /&gt;
Block Duration is the time interval between adjacent blocks of data, normalized to the ideal duration of a data block as determined from sampling rate and sample block size:&lt;br /&gt;
&lt;br /&gt;
Block Duration = &amp;lt;math&amp;gt;\frac{t_{5}-t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When the system operates in real time, mean Block Duration will always be 1. Measuring Block Duration has the purpose of obtaining Block Duration Jitter as its standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Measuring Latencies===&lt;br /&gt;
The procedure for measuring the system latencies are below. In general, a combination of recorded events and software time-stamps recorded in BCI2000 data files to determine when important events occur, with ms or better time resolution.&lt;br /&gt;
[[Image:OutTimeline1.png|thumb|500px|none|Recorded events used for measuring latencies.]]&lt;br /&gt;
&lt;br /&gt;
====Measuring Amplifier Latency====&lt;br /&gt;
In [[#TimeLine|TimeLine]], Amplifier Latency is the time interval between the sampling of a data block&#039;s last sample, and its acquisition into the source module&#039;s data buffer:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} = t_{0} - t_{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To measure this latency, the Source module will set a digital output on the amplifier to a high value at time &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; immediately following data acquisition, as indicated in [[#overview|Overview]]. The digital output level is 3.3 V, so a voltage divider may required to attenuate the signal level to the range of amplifier input. This signal is then recorded on an input channel on the amplifier (time &amp;lt;math&amp;gt;t_{1}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In the recorded data, we may then identify &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt;, which is the beginning of sample block &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, by its sample offset, which also coincides with BCI2000 state changes. &amp;lt;math&amp;gt;t_1&amp;lt;/math&amp;gt; may be identified by a change in the recorded signal, occurring in the channel that was connected to the digital output during measurement.&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} \approx t_{0} - t_{-1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Processing Latency====&lt;br /&gt;
The processing latency is defined as the amount of time that it takes for the computer to process the data after acquiring it, to when the application module output is changed. In [[#TimeLine|TimeLine]], this is the time from &amp;lt;math&amp;gt;t_{0}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t_{2}&amp;lt;/math&amp;gt;. Processing latency is calculated using two timestamps saved with every block of data, &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, immediately following data acquisition in the Source module, and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_2&amp;lt;/math&amp;gt; immediately following application presentation in the Application module. Therefore, processing latency for each block of data is calculated as the difference between time stamps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 \mathrm{Processing Latency} = \mathrm{StimulusTime} - \mathrm{SourceTime} = t_{2} - t_{0}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Application Output Latency====&lt;br /&gt;
&amp;lt;span id=&amp;quot;outOverview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
There are many possible application output types, including visual (i.e., the computer screen), audio, or mechanical (e.g., a robotic arm). The core BCI2000 system primarily uses visual and audio output, and so the default testing system will focus on these.&lt;br /&gt;
&lt;br /&gt;
Both visual and audio output can be measured using the g.TRIGbox signal conditioner, which accepts inputs from optical sensors, microphones, or any other input. The user sets a threshold for the input signals, and the g.TRIGbox outputs a digital pulse whenever this threshold is exceeded. This output is then recorded back into the amplifier system, so that the analysis program can measure the response times for each output.&lt;br /&gt;
&lt;br /&gt;
We identify event &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; by a change in the data channel connected to the amplifier&#039;s digital output, and event &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by a change in the data channel connected to the g.TRIGbox, and compute their difference. Also, both events are affected by Amplifier Latency in the same way, so we may ignore Amplifier Latency, and have&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
\mathrm{Output Latency} = t_{3} - t_{2} = (t_3-t_0)-(t_2-t_0) = (t_3-t_0)-\mathrm{ProcessingLatency}.&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring System Latency====&lt;br /&gt;
As defined above, System Latency is the sum of Amplifier Latency, Processing Latency, and Output Latency. It is important to realize that the system latency is dependent on the output modality used, i.e., the video system latency and the audio system latency will vary on the same system due to the differences in output latencies.&lt;br /&gt;
The system latency may be measured&lt;br /&gt;
#directly, by identifying &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt; as the beginning of a data block by its sample index, and &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by the signal change in the channel connected to the g.TRIGbox, and then calculating&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=t_3-t_{-1}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#or indirectly, by using the previously measured quantities&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=\mathrm{AmplifierLatency}+\mathrm{ProcessingLatency}+\mathrm{OutputLatency}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Measuring Block Duration====&lt;br /&gt;
Block Duration is measured as the time between adjacent blocks of data, divided by the theoretical ideal value, which is the sample block duration. For the actual measurement, we use the difference between subsequent &amp;lt;math&amp;gt;\textrm{SourceTime}&amp;lt;/math&amp;gt; time stamps which are recorded at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t_8&amp;lt;/math&amp;gt; in [[#TimeLine|Timeline]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{BlockDuration} = \frac{t_{5} - t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
=\frac{\Delta \mathrm{SourceTime}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Latency Calculation Overview===&lt;br /&gt;
Latencies are calculated by comparing changes in a BCI2000 state value to changes in a recorded signal. The analysis program follows these general steps in calculating the various latencies:&lt;br /&gt;
&lt;br /&gt;
#Determine which threshold values to use based on the &#039;&#039;thresh&#039;&#039;  definition in the BCI2000Certification.cfg file, which defines a threshold based on the amplifier used. For example, the g.USBamp has an input range of -250 mV to + 250 mV, and the g.TRIGbox outputs from 0 to 200 mV, so the threshold used is about 12.5 mV.&lt;br /&gt;
#Traverse the state values for a selected state and find where the state changes from 0 to a given value (or any value). The sample at which this occurs is saved for later use in &amp;lt;math&amp;gt;stateChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#When this occurs, start looking through &amp;lt;math&amp;gt;Signal_{norm}&amp;lt;/math&amp;gt; to find when a rising edge exceeds the determined threshold value. The sample at which this occurs is saved in &amp;lt;math&amp;gt;sigChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#The latency for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th state change is calculated as: &lt;br /&gt;
#:&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
latency_n = \frac{sigChangePos_n-stateChangePos_n}{SampleRate}&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt; &lt;br /&gt;
#:and is stored in an array.&lt;br /&gt;
#Once the entire state vector is traversed, the mean, standard deviation, minimum and maximum values for this latency are calculated and reported.&lt;br /&gt;
&lt;br /&gt;
==Getting Started With the Default Tests==&lt;br /&gt;
This section provides step-by-step instructions on running the default certification procedure. Note that some cables must be assembled before the testing can be done; see the end of this document for information on assembling the cables.&lt;br /&gt;
&lt;br /&gt;
===Starting the Procedure===&lt;br /&gt;
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. To do so, navigate to the BCI2000/tools/BCI2000Certification folder, and start the BCI2000Certification.exe program. This program appears as:&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
====Load a Configuration File====&lt;br /&gt;
To get started, load a provided configuration file by selecting File-&amp;gt;Open INI. The standard configurations are for 8, 16, and 32 channels, and are located in the BCI2000/tools/BCI2000Certification/ folder. These are named BCI2000Certification_32ch_100ms.ini, BCI2000Certification_16ch_100ms.ini, and BCI2000Certification_8ch_100ms.ini, respectively.&lt;br /&gt;
&lt;br /&gt;
====Sampling Rate====&lt;br /&gt;
This is set to 512 by default. This can be changed to another value that will apply to all tests, except those that explicitly override it in their own parameter file.&lt;br /&gt;
&lt;br /&gt;
====Display parameters====&lt;br /&gt;
These are on the lines that begin with &amp;lt;code&amp;gt;Application:Window&amp;lt;/code&amp;gt;. For many labs, the default settings should work fine; the window is setup to appear in the top-left corner of the main window (&amp;lt;code&amp;gt;WindowLeft= 0&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowTop= 0&amp;lt;/code&amp;gt; ), and is 800 wide by 800 pixels tall (&amp;lt;code&amp;gt;WindowWidth= 800&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight= 800&amp;lt;/code&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
Users with a dual-screen configuration may wish to change this so that the BCI2000 window is on the secondary monitor; to do so, the &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  parameter should be changed, which depends on the resolution and orientation of both monitors. For example, if the 2nd monitor is to the right of the primary monitor, and both monitors have a resolution of 1280x1024 pixels, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1280&amp;lt;/code&amp;gt;  will place the window on the 2nd monitor. Similarly, if the 2nd monitor is to the left of the primary monitor, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;-1280&amp;lt;/code&amp;gt;  will accomplish the same thing. If the monitors have different resolutions (e.g., monitor 1 is 1600x1200 and monitor 2 is 1024x768, located to the right of the 1st monitor), the position should change accordingly. For example, in this scenario, to set the window to the right of the main window, set &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1600&amp;lt;/code&amp;gt; . Finally, set the &amp;lt;code&amp;gt;WindowWidth&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight&amp;lt;/code&amp;gt;  to appropriate values for full-screen, if desired. To summarize, for the dual-screen case in which monitor 1 is 1600x1200 pixels, and monitor 2, to the right of 1, is 1024x768 pixels, and the BCI2000 window should be full-screen on monitor 2, the parameters should look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;Application:Window int WindowWidth= 1024 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowHeight= 768 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowLeft= 1600 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowTop= 0 ...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that nothing following the ... needs to be changed above in the parameter file.&lt;br /&gt;
&lt;br /&gt;
===Connect the Amplifier to the Trigger Box, and Attach Sensors===&lt;br /&gt;
[[Image:connections.png|frame|none|Connections overview]]&lt;br /&gt;
&lt;br /&gt;
This section describes the steps for connecting the necessary hardware. Refer to the Connections Overview figure above for additional information; each step is numbered in this figure.&lt;br /&gt;
&lt;br /&gt;
#Connect the amplifier to the computer; the supported g.tec amps are connected via USB, RS232, or Bluetooth.&lt;br /&gt;
#Connect the Digital I/O cable (see bottom of this document) to the amplifier on the Digital I/O port.&lt;br /&gt;
#Connect the reference and ground wires from the assembled amplifier cables to the amplifier reference and ground connections.&lt;br /&gt;
#Connect the amplifier cables with the safety connectors into channels 1, 2, and 3 on the g.USBamp.&lt;br /&gt;
#Connect the digital output line to the channel 1 amplifier cable.&lt;br /&gt;
#Connect the A output from the trigger box to the channel 2 amplifier cable.&lt;br /&gt;
#Connect the B output from the trigger box to the channel 3 amplifier cable.&lt;br /&gt;
#Connect the optical sensor plug to the g.TRIGbox, using the optical sensor input channel A.&lt;br /&gt;
#Connect the computer audio output using a stereo cable to the g.TRIGbox, using the high-level input channel B.&lt;br /&gt;
&lt;br /&gt;
===Setup Sensor Thresholds===&lt;br /&gt;
The audio and optical sensors each have a threshold setting on the g.TRIGbox, along with an LED indicating whether the current input is above threshold for each channel. At rest, each trigger should be off; if any is on, turn the threshold knob counter-clockwise until the LED is off.&lt;br /&gt;
&lt;br /&gt;
====Audio Threshold====&lt;br /&gt;
To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
&lt;br /&gt;
====Video Threshold====&lt;br /&gt;
To set the video threshold, first tape the optical sensor to the monitor in approximately the correct location, based on the information in the latencyTest.prm file for the window position and dimensions. To activate the optical trigger on the g.TRIGbox, drag a white window, such as a Notepad window, in the background under the sensor. Move the threshold knob for channel A until the LED for that channel is just on (i.e., turning it down just a little turns the trigger off). The sensor will be placed more accurately in the following step.&lt;br /&gt;
&lt;br /&gt;
===Starting the Software===&lt;br /&gt;
[[image:Certificationtool.png]]&lt;br /&gt;
Navigate to BCI2000/tools/BCI2000Certification, and double-click the BCI2000Certification.exe program. The BCI2000 program should start, with the output window in the location specified in the latencyTest.prm file. If there are any errors at startup, the BCI2000 error log will report them. If there are errors, correct them, exit out of the BCI2000Certification.exe program, and restart the program.&lt;br /&gt;
&lt;br /&gt;
===Setting up the Optical Sensor===&lt;br /&gt;
Each application has a unique display configuration, where the visual target of interest is located in a specific position on the monitor. Generally, the optical sensor will not likely have to be moved far in between tasks due to the design of the parameter files. However, it is still necessary to ensure that the sensor is in the correct position for each task, and to be able to change the position if necessary. This section describes the process to find the correct location on the monitor for the sensor. To begin, the certification procedure should be started.&lt;br /&gt;
&lt;br /&gt;
====P3Speller====&lt;br /&gt;
The P3Speller task has an group of letters arranged into rows and columns. The analysis uses the letter in the 3rd column and 3rd row, which will contain the letter X when the program is run. This location should be very close to that specified for the CursorTask, described above. Fortunately, the arrangement of the letters is shown before the test starts, which allows the sensor to be adjusted if necessary. All of the following default tasks are setup so that the optical sensor does not need to be moved from this position.&lt;br /&gt;
&lt;br /&gt;
====CursorTask====&lt;br /&gt;
In the default configuration, the optical sensory does not need to be moved from the position used for the P3Speller task. For custom tests, the flashing object must either be placed under the sensor, or the sensor needs to be moved to the correct position.&lt;br /&gt;
&lt;br /&gt;
====StimulusPresentation====&lt;br /&gt;
For the StimulusPresentation tasks, a single large icon appears in the center of the screen, which will be detected by the sensor. The default location of the sensor as defined for the CursorTask should be able to capture the icon on the screen. However, if the task begins and it appears that it is outside the icon location, move the sensor to the middle of the icon. Keep in mind that it may have to be relocated for following tasks.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
Once the optical sensor is setup and calibrated for a task, begin the testing process. To start the process, press the Start button in the BCI2000 operator window. At the end of each task, the program will quit automatically, and the next one will start automatically. For each task, press the Start button to begin.&lt;br /&gt;
&lt;br /&gt;
Occasionally, the optical sensor may not be in the exact correct place for a given task.You should be able to see changes in on the video channel (channel 2 by default) in the window showing the recorded channels. If the signal is not changing when it should be (e.g., during the correct visual stimulus), you may try increasing the threshold to catch the stimulus, or you may need to place the sensor in the correct location. To do this, place the sensor in the better location, then quit the current BCI2000 test, and quit the BCI2000Certification program. The procedure will need to be restarted.&lt;br /&gt;
&lt;br /&gt;
When the testing is complete, the BCI2000CertAnalysis program will automatically start. It will analyze the data that have been collected, and return the results in the results.txt file. In general, a Pass or Fail will be written next to a task, and each task component, if it passed or failed the test. For more information on interpreting results, see below.&lt;br /&gt;
&lt;br /&gt;
==BCI2000Certification: Additional Information==&lt;br /&gt;
The previous section on Getting Started provided information to quickly setup and run the default tests. This section provides detailed information about each file used, and how to modify the files for your specific system and applications.&lt;br /&gt;
&lt;br /&gt;
===Overview of Important Files===&lt;br /&gt;
There are several important files that are used in the BCI2000 Certification procedure. These files and their contents are described in this section. &lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.ini====&lt;br /&gt;
The BCI2000Certification.ini file contains the information that defines each task configuration. It is located in the BCI2000/tools/BCI2000Certification/ folder. It specifies the parameter file, the SignalSource, SignalProcessing, and Application modules, and the analysis definitions for each task. It contains all of the default tests, although it can easily be expanded to include additional or customized task configurations.&lt;br /&gt;
&lt;br /&gt;
Each task is defined by a set of &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; , space-separated fields, as described below. A * indicates an optional field. The % character indicates a comment, and everything following that character is ignored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; The name of the task, which should be unique. This generally describes the task. It must not contain any spaces. This value determines the path to the saved data file, and the name of the file itself. For example, the name StimulusPresentation_512 would create a file at &amp;lt;code&amp;gt;./Data/StimulusPresentation_512001/StimulusPresentation_512S001R01.dat&amp;lt;/code&amp;gt; Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;name StimulusPresentation_512&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;parm&#039;&#039;&#039;The BCI2000 *.prm file used for this task. It should be placed in the BCI2000/tools/BCI2000Certification/parms/ folder. Note that the CertificationMain.prm is included in &#039;&#039;all&#039;&#039;  configurations by default, and does not need to be listed here. This file contains the information for this specific task configuration. See above for further information.&lt;br /&gt;
**&amp;lt;code&amp;gt;parm SimpleAV.prm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SignalSource module to be used for this test. The g.tec g.USBamp system is used in all configurations by default. If the g.MOBIlab or g.MOBIlab+ are used, the SignalSource module should be changed to the appropriate executable. All BCI2000 executables are located in BCI2000/prog/. Examples:&lt;br /&gt;
**&amp;lt;code&amp;gt;&#039;source gUSBampSource.exe&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;source gMOBIlabSource.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;sigproc&#039;&#039;&#039; The SignalProcessing module that is used for this configuration. This is likely dependent on the application used as well. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;sigproc P3SignalProcessing.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;app&#039;&#039;&#039; The application for this configuration. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;app StimulusPresentation.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*amp&#039;&#039;&#039; This is a single value that gives the channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;amp 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*dAmp&#039;&#039;&#039; This is a single value that specifies a digital input channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;dAmp 15&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*vid&#039;&#039;&#039; This field is followed by 3 values, that give the channel number that is recording the video output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;vid 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*aud&#039;&#039;&#039;  This field is followed by 3 values, that give the channel number that is recording the audio output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;aud 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;skip&#039;&#039;&#039; Entering &#039;&#039;&#039;skip&#039;&#039;&#039;  will cause this task to not be run or analyzed. This is used to reduce the number of tasks that are run, which helps to repeat individual tasks that may have had problems in previous sessions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; This must come at the end of each task definition.&lt;br /&gt;
&lt;br /&gt;
In addition to task-specific entries, there are several global entries that will apply to every task, unless explicitly overwritten in that task. This allows the user to quickly change settings for all tasks simultaneously, e.g., if tests will be run using a g.tec g.USBamp for one set of tests, and a g.tec g.MOBIlab for another. Global entries must be defined at the beginning of the BCI2000Certification.ini file outside of the task definitions. These entries are defined as:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SourceModule to be used for all tests, unless explicitly overwritten by an individual task. Otherwise identical to the &#039;&#039;&#039;source&#039;&#039;&#039;  definition in a task entry.&lt;br /&gt;
*&#039;&#039;&#039;export&#039;&#039;&#039; This entry does not use any other parameters on the line on which it is defined. If &#039;&#039;&#039;export&#039;&#039;&#039;  is present in the BCI2000Certification.ini file, test results will be written to a comma-separated-value (CSV) text file that is located in the folder where data is saved for each task. For example, if the data folder is BCI2000/tools/BCI2000Certification/latencyData/, then the export file for the SimpleTarget task will be placed in the folder BCI2000/tools/BCI2000Certification/latencyData/SimpleTarget.&lt;br /&gt;
&lt;br /&gt;
Here is a full example entry that includes two tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source gUSBampSource&lt;br /&gt;
export&lt;br /&gt;
&lt;br /&gt;
name StimulusPresentation_512&lt;br /&gt;
parm StimulusPresentation_512.prm&lt;br /&gt;
sigproc P3SignalProcessing&lt;br /&gt;
app StimulusPresentation&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 StimulusCode 3&lt;br /&gt;
aud 2 StimulusCode 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
name CursorTask_1200&lt;br /&gt;
parm CursorTask_1200.prm&lt;br /&gt;
source gMOBIlab&lt;br /&gt;
sigproc ARSignalProcessing&lt;br /&gt;
app CursorTask&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 TargetCode 1&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;  task uses the &amp;lt;code&amp;gt;gUSBampSource&amp;lt;/code&amp;gt;  source module, and records block-triggered digital outputs on channel 0, video output triggered off of stimulus code 3 on channel 1, and audio output triggered off of stimulus code 3 on channel 2. The &amp;lt;code&amp;gt;SimpleTarget&amp;lt;/code&amp;gt;  tasks overrides the global &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; entry, and uses its own &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;  definition, specifying that a gMOBIlab should be used for acquisition instead of a gUSBamp. Finally, the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;  entry is set at the beginning, so test results for all files are output to a CSV file.&lt;br /&gt;
&lt;br /&gt;
The BCI2000Certification.ini file contains many task definitions. Each entry is read by the BCI2000Certification.exe program, and is entered as a separate task to be run and then analyzed.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.cfg====&lt;br /&gt;
The latencyTest.prm file is located in the BCI2000/tools/BCI2000Certification/ folder. It contains many default settings and definitions that determine how the results are interpreted, and should generally not be changed by the user. The timing definitions provide the absolute maximum latencies in ms for each step in the system chain, and include the Amp, ProcLat, VidOut, AudOut, VidSys, AudSys, and Jitter (see below for explanations). Timing definitions can include either one or two fields; the first field is mandatory, and is the mean value in ms, while the second field is optional, and is the standard deviation in ms.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Amp&#039;&#039;&#039; The amplifier latency.&lt;br /&gt;
*&#039;&#039;&#039;ProcLat&#039;&#039;&#039; The processing latency.&lt;br /&gt;
*&#039;&#039;&#039;VidOut&#039;&#039;&#039; The video output latency.&lt;br /&gt;
*&#039;&#039;&#039;AudOut&#039;&#039;&#039; The audio output latency.&lt;br /&gt;
*&#039;&#039;&#039;VidSys&#039;&#039;&#039; The video system latency.&lt;br /&gt;
*&#039;&#039;&#039;AudSys&#039;&#039;&#039; The audio system latency.&lt;br /&gt;
*&#039;&#039;&#039;Jitter&#039;&#039;&#039; The system jitter. This is the difference, in ms, between the actual block duration and theoretical block duration, which is determined by the block size.&lt;br /&gt;
*&#039;&#039;&#039;Threshold Source Value&#039;&#039;&#039; This is the threshold defined for a specific SignalSource module. Individual amplifiers may have different input ranges, resulting in recording signals with different ranges of magnitude. The &#039;&#039;&#039;Source&#039;&#039;&#039;  entry is a value in mV. For example, the threshold setting for the g.USBamp is &#039;&#039;&#039;Threshold gUSBampSource 12.5&#039;&#039;&#039; .&lt;br /&gt;
*&#039;&#039;&#039;ResultOut&#039;&#039;&#039; This is the file that contains the testing results.&lt;br /&gt;
*&#039;&#039;&#039;DataDir&#039;&#039;&#039; The default data directory. It defaults to latencyData in the BCI2000/tools/BCI2000Certification/ folder. &lt;br /&gt;
&lt;br /&gt;
These values should not generally be changed by the user, although they may be updated in future BCI2000 versions.&lt;br /&gt;
&lt;br /&gt;
====CertificationMain.prm====&lt;br /&gt;
This parameter file contains some of the default task parameters common to every test, including the save location, monitor configuration, sampling rate, and visualization settings. Note that these parameters can be overwritten in the *.prm files for each individual test configuration.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.exe====&lt;br /&gt;
This file controls the execution of each task. It parses the BCI2000Certification.ini and BCI2000Certification.cfg files to determine which files and tasks to run, and controls the CPU load monitor. When all tasks are complete, this program calls the BCI2000Analysis.exe program to handle the analysis of the collected data.&lt;br /&gt;
&lt;br /&gt;
====BCI2000CertAnalysis.exe====&lt;br /&gt;
This program analyzes the data collected, and reports results to a data file. It uses the DataDir parameter in the BCI2000Certification.cfg file to determine where the data is located. Results are output to results.txt in the BCI2000/tools/BCI2000Certification/ folder.&lt;br /&gt;
&lt;br /&gt;
====Parameter Files====&lt;br /&gt;
Each task should have it&#039;s own parameter file that contains the unique configuration and settings for that task. For example, there may be several configurations that use the g.USBamp, ARSignalProcessing, and CursorTask, each with its own parameter file. These files end in .prm, and are placed in the BCI2000/tools/BCI2000Certification/parms/ folder.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Results===&lt;br /&gt;
Results are recorded to the BCI2000/tools/BCI2000Certification/results.txt file. The results for each task, and each applicable latency tested, are reported here. If the entire task  passed, then each test performed met the minimum timing requirements specified in the BCI2000Certification.cfg file. If one or more did not pass, then the specific test that did not pass the test has Fail written next to it.&lt;br /&gt;
&lt;br /&gt;
====What if a Task Did Not Pass?====&lt;br /&gt;
TO BE ADDED.&lt;br /&gt;
&lt;br /&gt;
==Certification Protocol==&lt;br /&gt;
This section describes how the testing protocol is run, the various components involved in the certification analysis, and how to interpret results.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
The certification protocol consists of running several BCI2000 applications in multiple configurations to determine if each application meets the minimum requirements for BCI2000, and to determine if individual configurations of an application meet the requirements. For example, the CursorFeedback task may be tested with several combinations of sampling rates, sample block sizes, and processed channels, only some of which may work with a given computer setup.&lt;br /&gt;
&lt;br /&gt;
The testing set is run from a single batch file called LatencyAnalysis.bat. This file is located in the folder BCI2000/tools/BCI2000Certification/batch. This batch file executes additional batch files in this folder, each corresponding to a different application configuration. Each of these batch files starts the Operator module, automatically loading multiple parameter files used for a given configuration. There is a general-purpose parameter file called latencyTest.prm that all configurations use. This file configures the save location for all latency tests, as well as default window positions and sampling rates. A second parameter file is passed to the operator that contains the parameters for a unique application configuration. After starting the operator module, the batch file starts the SignalSource module, SignalProcessing module, and Application module. The loaded configuration is set automatically, and the user needs only to press the start button to start the analysis.&lt;br /&gt;
&lt;br /&gt;
==Software Templates==&lt;br /&gt;
This describes how to implement the testing protocols for your own amplifier system and custom applications. This is useful for determining if your hardware setup and software is capable of maintaining an acceptable level of performance for real-time testing.&lt;br /&gt;
&lt;br /&gt;
===Amplifier Latency===&lt;br /&gt;
The amplifier latency requires an output that can be recorded by the amplifier. In the case of the g.USBamp, a digital output line is used, although either analog or digital outputs could be used in a system. &lt;br /&gt;
&lt;br /&gt;
In the SignalSource module code for your custom amp, find the Process function. Near the beginning of this function, before any data is acquired, set the output signal to 0, either a digital low or analog value of 0 V. This will be dependent on the particular amplifier and API used; for the g.USBamp, this function call looks like: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 0.&lt;br /&gt;
&lt;br /&gt;
At the end of the Process function, the output should be set to a high level. A similar function call will be used to above, only the value is 1 instead of 0; again, the function will be dependent on the system used, and whether analog or digital output is used. Here is the code for the g.USBamp:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 1.&lt;br /&gt;
&lt;br /&gt;
===Visual and Audio Latency===&lt;br /&gt;
Developing new video and optical latency tests does not necessarily require adding additional code to existing modules (beyond any customization already done). &lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
A list of officially supported hardware configurations, and suggested minimum requirements is provided.&lt;br /&gt;
&lt;br /&gt;
===Supported and Tested Hardware===&lt;br /&gt;
====Amplifiers====&lt;br /&gt;
   &lt;br /&gt;
*g.USBamp  &lt;br /&gt;
*gMOBIlab (Serial RS232)  &lt;br /&gt;
*gMOBIlab (Bluetooth)  &lt;br /&gt;
*TDT Pentusa (RX5)  &lt;br /&gt;
&lt;br /&gt;
===Minimum Requirements===&lt;br /&gt;
This table shows the minimum requirements for running BCI2000.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Minimum System Requirements for BCI2000&lt;br /&gt;
! CPU&lt;br /&gt;
| 1 GHz&lt;br /&gt;
|-&lt;br /&gt;
! RAM&lt;br /&gt;
|512 MB (dependent on OS; 1 GB for Windows Vista)&lt;br /&gt;
|-&lt;br /&gt;
! Video Card&lt;br /&gt;
|32 MB VRam; Hardware OpenGL Support&lt;br /&gt;
|-&lt;br /&gt;
! Sound Card&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! Monitor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! OS&lt;br /&gt;
|Windows 2000; Windows XP SP2 or Greater; Windows Vista&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4976</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4976"/>
		<updated>2009-05-27T16:40:22Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Getting Started With the Default Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Latencies==&lt;br /&gt;
Briefly, the different latencies inherent in the BCI2000 system include amplifier latency, processing latency, output latency, and the sum of these, the system latency. Additionally, the block duration jitter will be measured.  The figure below provides a timeline of events that occur within a single block of data, with significant time points labeled. This figure provides an accurate account of the order in which events occur within a block of data, although the time intervals are not necessarily to scale.&lt;br /&gt;
&amp;lt;span id=&amp;quot;TimeLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:timeline3.png|frame|none|Timeline of events. Time intervals are not to scale.]]&lt;br /&gt;
&lt;br /&gt;
===Defining Latencies===&lt;br /&gt;
====Amplifier Latency====&lt;br /&gt;
Amplifier Latency is the minimum delay between the time that a signal is presented at the amplifier input, to when it has been acquired in the source module. Depending on configuration, this may comprise physical signal delay in the amplifier, digitization, transmission from the amplifier to the PC, and processing time inside a hardware driver. That minimum delay occurs for the last sample of a data block, which, unlike its preceding samples in the same block, will spend only a minimum time in hardware and software buffers. In [[#TimeLine|Timeline]],&lt;br /&gt;
&lt;br /&gt;
Amplifier latency = &amp;lt;math&amp;gt;t_{0}-t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For amplifiers connected via bandwidth-limited serial interfaces, transmission latency may have a measurable impact on amplifier latency, depending on the hardware. When using USB 2.0, as is the case for the g.USBamp, transmission latency may generally neglected, as illustrated by the following example: USB 2.0 has a maximum transmission rate of 480 Mbit/s. If we are acquiring 16 channels of 32-bit data, and transmitting in blocks of 16 samples, this is 8192 bits of data; at USB 2.0 speed, this should take roughly 17 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s to transfer. However, a more realistic approximation for USB 2.0 speeds is 240 Mbit/s, which increases the transfer delay to 34 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s. For sampling rates below 30 kHz, this is less than a single sample&#039;s duration.&lt;br /&gt;
&lt;br /&gt;
In addition to amplifier latency, system performance will be influenced by buffering latency. Buffering latency is dependent on the sample block buffer size: When a data sample is digitized, it is not immediately transferred to the PC, but is stored in memory on the amplifier. The PC then makes the appropriate request to the amplifier, and a block of data is transferred all at once to reduce the processing load. This implies that a signal that is digitized at the start of the buffer must wait until the buffer is full to be read into the PC. For example, if the sample block size is 16 samples, the first sample must wait 15 more samples before it can be used in the application. Fortunately, this latency is always known, and can be reduced with a higher sampling rate and/or smaller block sizes, assuming the PC can handle the increased overhead. Buffering latency does not affect the acquisition-to-display latency, because processing occurs immediately after a block&#039;s last sample, which is not affected. Still, it is an important factor to keep in mind, because a large sample block size and/or a small sample rate will decrease the refresh rate for the application (e.g., at a sample rate of 256 Hz and a sample block size of 128 samples, the application will only be refreshed every 0.5 s.)&lt;br /&gt;
&lt;br /&gt;
====Processing Latency====&lt;br /&gt;
Processing Latency is the total time it takes for the data to be processed by all BCI2000 modules (SignalSource, SignalProcessing, and Application).&lt;br /&gt;
&lt;br /&gt;
Processing latency = &amp;lt;math&amp;gt;t_{2}-t_{0}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Processing latency strongly depends on CPU speed, and if this latency becomes too large, high CPU load will probably be the cause, implying decreased or unsuitable BCI2000 performance.&lt;br /&gt;
&lt;br /&gt;
====Output Latency====&lt;br /&gt;
Output Latency is the latency from the time that the Application module issues a command to change the display or issue a sound (or another output), to the time that this output actually occurs.&lt;br /&gt;
&lt;br /&gt;
Output latency = &amp;lt;math&amp;gt;t_{3}-t_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====System Latency====&lt;br /&gt;
System Latency is the minimum time interval between a change in amplifier input, and a causally related change in application output. This is the sum of the above latencies, Amplifier, Processing, and Output. &lt;br /&gt;
&lt;br /&gt;
System latency = &amp;lt;math&amp;gt;t_{3} - t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Block Duration, Block Duration Jitter====&lt;br /&gt;
Block Duration is the time interval between adjacent blocks of data, normalized to the ideal duration of a data block as determined from sampling rate and sample block size:&lt;br /&gt;
&lt;br /&gt;
Block Duration = &amp;lt;math&amp;gt;\frac{t_{5}-t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When the system operates in real time, mean Block Duration will always be 1. Measuring Block Duration has the purpose of obtaining Block Duration Jitter as its standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Measuring Latencies===&lt;br /&gt;
The procedure for measuring the system latencies are below. In general, a combination of recorded events and software time-stamps recorded in BCI2000 data files to determine when important events occur, with ms or better time resolution.&lt;br /&gt;
[[Image:OutTimeline1.png|thumb|500px|none|Recorded events used for measuring latencies.]]&lt;br /&gt;
&lt;br /&gt;
====Measuring Amplifier Latency====&lt;br /&gt;
In [[#TimeLine|TimeLine]], Amplifier Latency is the time interval between the sampling of a data block&#039;s last sample, and its acquisition into the source module&#039;s data buffer:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} = t_{0} - t_{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To measure this latency, the Source module will set a digital output on the amplifier to a high value at time &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; immediately following data acquisition, as indicated in [[#overview|Overview]]. The digital output level is 3.3 V, so a voltage divider may required to attenuate the signal level to the range of amplifier input. This signal is then recorded on an input channel on the amplifier (time &amp;lt;math&amp;gt;t_{1}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In the recorded data, we may then identify &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt;, which is the beginning of sample block &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, by its sample offset, which also coincides with BCI2000 state changes. &amp;lt;math&amp;gt;t_1&amp;lt;/math&amp;gt; may be identified by a change in the recorded signal, occurring in the channel that was connected to the digital output during measurement.&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} \approx t_{0} - t_{-1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Processing Latency====&lt;br /&gt;
The processing latency is defined as the amount of time that it takes for the computer to process the data after acquiring it, to when the application module output is changed. In [[#TimeLine|TimeLine]], this is the time from &amp;lt;math&amp;gt;t_{0}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t_{2}&amp;lt;/math&amp;gt;. Processing latency is calculated using two timestamps saved with every block of data, &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, immediately following data acquisition in the Source module, and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_2&amp;lt;/math&amp;gt; immediately following application presentation in the Application module. Therefore, processing latency for each block of data is calculated as the difference between time stamps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 \mathrm{Processing Latency} = \mathrm{StimulusTime} - \mathrm{SourceTime} = t_{2} - t_{0}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Application Output Latency====&lt;br /&gt;
&amp;lt;span id=&amp;quot;outOverview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
There are many possible application output types, including visual (i.e., the computer screen), audio, or mechanical (e.g., a robotic arm). The core BCI2000 system primarily uses visual and audio output, and so the default testing system will focus on these.&lt;br /&gt;
&lt;br /&gt;
Both visual and audio output can be measured using the g.TRIGbox signal conditioner, which accepts inputs from optical sensors, microphones, or any other input. The user sets a threshold for the input signals, and the g.TRIGbox outputs a digital pulse whenever this threshold is exceeded. This output is then recorded back into the amplifier system, so that the analysis program can measure the response times for each output.&lt;br /&gt;
&lt;br /&gt;
We identify event &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; by a change in the data channel connected to the amplifier&#039;s digital output, and event &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by a change in the data channel connected to the g.TRIGbox, and compute their difference. Also, both events are affected by Amplifier Latency in the same way, so we may ignore Amplifier Latency, and have&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
\mathrm{Output Latency} = t_{3} - t_{2} = (t_3-t_0)-(t_2-t_0) = (t_3-t_0)-\mathrm{ProcessingLatency}.&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring System Latency====&lt;br /&gt;
As defined above, System Latency is the sum of Amplifier Latency, Processing Latency, and Output Latency. It is important to realize that the system latency is dependent on the output modality used, i.e., the video system latency and the audio system latency will vary on the same system due to the differences in output latencies.&lt;br /&gt;
The system latency may be measured&lt;br /&gt;
#directly, by identifying &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt; as the beginning of a data block by its sample index, and &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by the signal change in the channel connected to the g.TRIGbox, and then calculating&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=t_3-t_{-1}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#or indirectly, by using the previously measured quantities&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=\mathrm{AmplifierLatency}+\mathrm{ProcessingLatency}+\mathrm{OutputLatency}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Measuring Block Duration====&lt;br /&gt;
Block Duration is measured as the time between adjacent blocks of data, divided by the theoretical ideal value, which is the sample block duration. For the actual measurement, we use the difference between subsequent &amp;lt;math&amp;gt;\textrm{SourceTime}&amp;lt;/math&amp;gt; time stamps which are recorded at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t_8&amp;lt;/math&amp;gt; in [[#TimeLine|Timeline]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{BlockDuration} = \frac{t_{5} - t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
=\frac{\Delta \mathrm{SourceTime}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Latency Calculation Overview===&lt;br /&gt;
Latencies are calculated by comparing changes in a BCI2000 state value to changes in a recorded signal. The analysis program follows these general steps in calculating the various latencies:&lt;br /&gt;
&lt;br /&gt;
#Determine which threshold values to use based on the &#039;&#039;thresh&#039;&#039;  definition in the BCI2000Certification.cfg file, which defines a threshold based on the amplifier used. For example, the g.USBamp has an input range of -250 mV to + 250 mV, and the g.TRIGbox outputs from 0 to 200 mV, so the threshold used is about 12.5 mV.&lt;br /&gt;
#Traverse the state values for a selected state and find where the state changes from 0 to a given value (or any value). The sample at which this occurs is saved for later use in &amp;lt;math&amp;gt;stateChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#When this occurs, start looking through &amp;lt;math&amp;gt;Signal_{norm}&amp;lt;/math&amp;gt; to find when a rising edge exceeds the determined threshold value. The sample at which this occurs is saved in &amp;lt;math&amp;gt;sigChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#The latency for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th state change is calculated as: &lt;br /&gt;
#:&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
latency_n = \frac{sigChangePos_n-stateChangePos_n}{SampleRate}&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt; &lt;br /&gt;
#:and is stored in an array.&lt;br /&gt;
#Once the entire state vector is traversed, the mean, standard deviation, minimum and maximum values for this latency are calculated and reported.&lt;br /&gt;
&lt;br /&gt;
==Getting Started With the Default Tests==&lt;br /&gt;
This section provides step-by-step instructions on running the default certification procedure. Note that some cables must be assembled before the testing can be done; see the end of this document for information on assembling the cables.&lt;br /&gt;
&lt;br /&gt;
===Starting the Procedure===&lt;br /&gt;
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. To do so, navigate to the BCI2000/tools/BCI2000Certification folder, and start the BCI2000Certification.exe program. This program appears as:&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
This program shows a list of all of the procedures to be tested for the loaded configuration. Detailed instructions for using the interface follow.&lt;br /&gt;
&lt;br /&gt;
====Load a Configuration File====&lt;br /&gt;
To get started, load a provided configuration file. The standard&lt;br /&gt;
&lt;br /&gt;
====Sampling Rate====&lt;br /&gt;
This is set to 512 by default. This can be changed to another value that will apply to all tests, except those that explicitly override it in their own parameter file.&lt;br /&gt;
&lt;br /&gt;
====Display parameters====&lt;br /&gt;
These are on the lines that begin with &amp;lt;code&amp;gt;Application:Window&amp;lt;/code&amp;gt;. For many labs, the default settings should work fine; the window is setup to appear in the top-left corner of the main window (&amp;lt;code&amp;gt;WindowLeft= 0&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowTop= 0&amp;lt;/code&amp;gt; ), and is 800 wide by 800 pixels tall (&amp;lt;code&amp;gt;WindowWidth= 800&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight= 800&amp;lt;/code&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
Users with a dual-screen configuration may wish to change this so that the BCI2000 window is on the secondary monitor; to do so, the &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  parameter should be changed, which depends on the resolution and orientation of both monitors. For example, if the 2nd monitor is to the right of the primary monitor, and both monitors have a resolution of 1280x1024 pixels, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1280&amp;lt;/code&amp;gt;  will place the window on the 2nd monitor. Similarly, if the 2nd monitor is to the left of the primary monitor, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;-1280&amp;lt;/code&amp;gt;  will accomplish the same thing. If the monitors have different resolutions (e.g., monitor 1 is 1600x1200 and monitor 2 is 1024x768, located to the right of the 1st monitor), the position should change accordingly. For example, in this scenario, to set the window to the right of the main window, set &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1600&amp;lt;/code&amp;gt; . Finally, set the &amp;lt;code&amp;gt;WindowWidth&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight&amp;lt;/code&amp;gt;  to appropriate values for full-screen, if desired. To summarize, for the dual-screen case in which monitor 1 is 1600x1200 pixels, and monitor 2, to the right of 1, is 1024x768 pixels, and the BCI2000 window should be full-screen on monitor 2, the parameters should look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;Application:Window int WindowWidth= 1024 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowHeight= 768 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowLeft= 1600 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowTop= 0 ...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that nothing following the ... needs to be changed above in the parameter file.&lt;br /&gt;
&lt;br /&gt;
===Connect the Amplifier to the Trigger Box, and Attach Sensors===&lt;br /&gt;
[[Image:connections.png|frame|none|Connections overview]]&lt;br /&gt;
&lt;br /&gt;
This section describes the steps for connecting the necessary hardware. Refer to the Connections Overview figure above for additional information; each step is numbered in this figure.&lt;br /&gt;
&lt;br /&gt;
#Connect the amplifier to the computer; the supported g.tec amps are connected via USB, RS232, or Bluetooth.&lt;br /&gt;
#Connect the Digital I/O cable (see bottom of this document) to the amplifier on the Digital I/O port.&lt;br /&gt;
#Connect the reference and ground wires from the assembled amplifier cables to the amplifier reference and ground connections.&lt;br /&gt;
#Connect the amplifier cables with the safety connectors into channels 1, 2, and 3 on the g.USBamp.&lt;br /&gt;
#Connect the digital output line to the channel 1 amplifier cable.&lt;br /&gt;
#Connect the A output from the trigger box to the channel 2 amplifier cable.&lt;br /&gt;
#Connect the B output from the trigger box to the channel 3 amplifier cable.&lt;br /&gt;
#Connect the optical sensor plug to the g.TRIGbox, using the optical sensor input channel A.&lt;br /&gt;
#Connect the computer audio output using a stereo cable to the g.TRIGbox, using the high-level input channel B.&lt;br /&gt;
&lt;br /&gt;
===Setup Sensor Thresholds===&lt;br /&gt;
The audio and optical sensors each have a threshold setting on the g.TRIGbox, along with an LED indicating whether the current input is above threshold for each channel. At rest, each trigger should be off; if any is on, turn the threshold knob counter-clockwise until the LED is off.&lt;br /&gt;
&lt;br /&gt;
====Audio Threshold====&lt;br /&gt;
To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
&lt;br /&gt;
====Video Threshold====&lt;br /&gt;
To set the video threshold, first tape the optical sensor to the monitor in approximately the correct location, based on the information in the latencyTest.prm file for the window position and dimensions. To activate the optical trigger on the g.TRIGbox, drag a white window, such as a Notepad window, in the background under the sensor. Move the threshold knob for channel A until the LED for that channel is just on (i.e., turning it down just a little turns the trigger off). The sensor will be placed more accurately in the following step.&lt;br /&gt;
&lt;br /&gt;
===Starting the Software===&lt;br /&gt;
[[image:Certificationtool.png]]&lt;br /&gt;
Navigate to BCI2000/tools/BCI2000Certification, and double-click the BCI2000Certification.exe program. The BCI2000 program should start, with the output window in the location specified in the latencyTest.prm file. If there are any errors at startup, the BCI2000 error log will report them. If there are errors, correct them, exit out of the BCI2000Certification.exe program, and restart the program.&lt;br /&gt;
&lt;br /&gt;
===Setting up the Optical Sensor===&lt;br /&gt;
Each application has a unique display configuration, where the visual target of interest is located in a specific position on the monitor. Generally, the optical sensor will not likely have to be moved far in between tasks due to the design of the parameter files. However, it is still necessary to ensure that the sensor is in the correct position for each task, and to be able to change the position if necessary. This section describes the process to find the correct location on the monitor for the sensor. To begin, the certification procedure should be started.&lt;br /&gt;
&lt;br /&gt;
====P3Speller====&lt;br /&gt;
The P3Speller task has an group of letters arranged into rows and columns. The analysis uses the letter in the 3rd column and 3rd row, which will contain the letter X when the program is run. This location should be very close to that specified for the CursorTask, described above. Fortunately, the arrangement of the letters is shown before the test starts, which allows the sensor to be adjusted if necessary. All of the following default tasks are setup so that the optical sensor does not need to be moved from this position.&lt;br /&gt;
&lt;br /&gt;
====CursorTask====&lt;br /&gt;
In the default configuration, the optical sensory does not need to be moved from the position used for the P3Speller task. For custom tests, the flashing object must either be placed under the sensor, or the sensor needs to be moved to the correct position.&lt;br /&gt;
&lt;br /&gt;
====StimulusPresentation====&lt;br /&gt;
For the StimulusPresentation tasks, a single large icon appears in the center of the screen, which will be detected by the sensor. The default location of the sensor as defined for the CursorTask should be able to capture the icon on the screen. However, if the task begins and it appears that it is outside the icon location, move the sensor to the middle of the icon. Keep in mind that it may have to be relocated for following tasks.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
Once the optical sensor is setup and calibrated for a task, begin the testing process. To start the process, press the Start button in the BCI2000 operator window. At the end of each task, the program will quit automatically, and the next one will start automatically. For each task, press the Start button to begin.&lt;br /&gt;
&lt;br /&gt;
Occasionally, the optical sensor may not be in the exact correct place for a given task.You should be able to see changes in on the video channel (channel 2 by default) in the window showing the recorded channels. If the signal is not changing when it should be (e.g., during the correct visual stimulus), you may try increasing the threshold to catch the stimulus, or you may need to place the sensor in the correct location. To do this, place the sensor in the better location, then quit the current BCI2000 test, and quit the BCI2000Certification program. The procedure will need to be restarted.&lt;br /&gt;
&lt;br /&gt;
When the testing is complete, the BCI2000CertAnalysis program will automatically start. It will analyze the data that have been collected, and return the results in the results.txt file. In general, a Pass or Fail will be written next to a task, and each task component, if it passed or failed the test. For more information on interpreting results, see below.&lt;br /&gt;
&lt;br /&gt;
==BCI2000Certification: Additional Information==&lt;br /&gt;
The previous section on Getting Started provided information to quickly setup and run the default tests. This section provides detailed information about each file used, and how to modify the files for your specific system and applications.&lt;br /&gt;
&lt;br /&gt;
===Overview of Important Files===&lt;br /&gt;
There are several important files that are used in the BCI2000 Certification procedure. These files and their contents are described in this section. &lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.ini====&lt;br /&gt;
The BCI2000Certification.ini file contains the information that defines each task configuration. It is located in the BCI2000/tools/BCI2000Certification/ folder. It specifies the parameter file, the SignalSource, SignalProcessing, and Application modules, and the analysis definitions for each task. It contains all of the default tests, although it can easily be expanded to include additional or customized task configurations.&lt;br /&gt;
&lt;br /&gt;
Each task is defined by a set of &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; , space-separated fields, as described below. A * indicates an optional field. The % character indicates a comment, and everything following that character is ignored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; The name of the task, which should be unique. This generally describes the task. It must not contain any spaces. This value determines the path to the saved data file, and the name of the file itself. For example, the name StimulusPresentation_512 would create a file at &amp;lt;code&amp;gt;./Data/StimulusPresentation_512001/StimulusPresentation_512S001R01.dat&amp;lt;/code&amp;gt; Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;name StimulusPresentation_512&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;parm&#039;&#039;&#039;The BCI2000 *.prm file used for this task. It should be placed in the BCI2000/tools/BCI2000Certification/parms/ folder. Note that the CertificationMain.prm is included in &#039;&#039;all&#039;&#039;  configurations by default, and does not need to be listed here. This file contains the information for this specific task configuration. See above for further information.&lt;br /&gt;
**&amp;lt;code&amp;gt;parm SimpleAV.prm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SignalSource module to be used for this test. The g.tec g.USBamp system is used in all configurations by default. If the g.MOBIlab or g.MOBIlab+ are used, the SignalSource module should be changed to the appropriate executable. All BCI2000 executables are located in BCI2000/prog/. Examples:&lt;br /&gt;
**&amp;lt;code&amp;gt;&#039;source gUSBampSource.exe&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;source gMOBIlabSource.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;sigproc&#039;&#039;&#039; The SignalProcessing module that is used for this configuration. This is likely dependent on the application used as well. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;sigproc P3SignalProcessing.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;app&#039;&#039;&#039; The application for this configuration. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;app StimulusPresentation.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*amp&#039;&#039;&#039; This is a single value that gives the channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;amp 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*dAmp&#039;&#039;&#039; This is a single value that specifies a digital input channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;dAmp 15&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*vid&#039;&#039;&#039; This field is followed by 3 values, that give the channel number that is recording the video output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;vid 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*aud&#039;&#039;&#039;  This field is followed by 3 values, that give the channel number that is recording the audio output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;aud 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;skip&#039;&#039;&#039; Entering &#039;&#039;&#039;skip&#039;&#039;&#039;  will cause this task to not be run or analyzed. This is used to reduce the number of tasks that are run, which helps to repeat individual tasks that may have had problems in previous sessions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; This must come at the end of each task definition.&lt;br /&gt;
&lt;br /&gt;
In addition to task-specific entries, there are several global entries that will apply to every task, unless explicitly overwritten in that task. This allows the user to quickly change settings for all tasks simultaneously, e.g., if tests will be run using a g.tec g.USBamp for one set of tests, and a g.tec g.MOBIlab for another. Global entries must be defined at the beginning of the BCI2000Certification.ini file outside of the task definitions. These entries are defined as:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SourceModule to be used for all tests, unless explicitly overwritten by an individual task. Otherwise identical to the &#039;&#039;&#039;source&#039;&#039;&#039;  definition in a task entry.&lt;br /&gt;
*&#039;&#039;&#039;export&#039;&#039;&#039; This entry does not use any other parameters on the line on which it is defined. If &#039;&#039;&#039;export&#039;&#039;&#039;  is present in the BCI2000Certification.ini file, test results will be written to a comma-separated-value (CSV) text file that is located in the folder where data is saved for each task. For example, if the data folder is BCI2000/tools/BCI2000Certification/latencyData/, then the export file for the SimpleTarget task will be placed in the folder BCI2000/tools/BCI2000Certification/latencyData/SimpleTarget.&lt;br /&gt;
&lt;br /&gt;
Here is a full example entry that includes two tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source gUSBampSource&lt;br /&gt;
export&lt;br /&gt;
&lt;br /&gt;
name StimulusPresentation_512&lt;br /&gt;
parm StimulusPresentation_512.prm&lt;br /&gt;
sigproc P3SignalProcessing&lt;br /&gt;
app StimulusPresentation&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 StimulusCode 3&lt;br /&gt;
aud 2 StimulusCode 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
name CursorTask_1200&lt;br /&gt;
parm CursorTask_1200.prm&lt;br /&gt;
source gMOBIlab&lt;br /&gt;
sigproc ARSignalProcessing&lt;br /&gt;
app CursorTask&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 TargetCode 1&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;  task uses the &amp;lt;code&amp;gt;gUSBampSource&amp;lt;/code&amp;gt;  source module, and records block-triggered digital outputs on channel 0, video output triggered off of stimulus code 3 on channel 1, and audio output triggered off of stimulus code 3 on channel 2. The &amp;lt;code&amp;gt;SimpleTarget&amp;lt;/code&amp;gt;  tasks overrides the global &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; entry, and uses its own &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;  definition, specifying that a gMOBIlab should be used for acquisition instead of a gUSBamp. Finally, the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;  entry is set at the beginning, so test results for all files are output to a CSV file.&lt;br /&gt;
&lt;br /&gt;
The BCI2000Certification.ini file contains many task definitions. Each entry is read by the BCI2000Certification.exe program, and is entered as a separate task to be run and then analyzed.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.cfg====&lt;br /&gt;
The latencyTest.prm file is located in the BCI2000/tools/BCI2000Certification/ folder. It contains many default settings and definitions that determine how the results are interpreted, and should generally not be changed by the user. The timing definitions provide the absolute maximum latencies in ms for each step in the system chain, and include the Amp, ProcLat, VidOut, AudOut, VidSys, AudSys, and Jitter (see below for explanations). Timing definitions can include either one or two fields; the first field is mandatory, and is the mean value in ms, while the second field is optional, and is the standard deviation in ms.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Amp&#039;&#039;&#039; The amplifier latency.&lt;br /&gt;
*&#039;&#039;&#039;ProcLat&#039;&#039;&#039; The processing latency.&lt;br /&gt;
*&#039;&#039;&#039;VidOut&#039;&#039;&#039; The video output latency.&lt;br /&gt;
*&#039;&#039;&#039;AudOut&#039;&#039;&#039; The audio output latency.&lt;br /&gt;
*&#039;&#039;&#039;VidSys&#039;&#039;&#039; The video system latency.&lt;br /&gt;
*&#039;&#039;&#039;AudSys&#039;&#039;&#039; The audio system latency.&lt;br /&gt;
*&#039;&#039;&#039;Jitter&#039;&#039;&#039; The system jitter. This is the difference, in ms, between the actual block duration and theoretical block duration, which is determined by the block size.&lt;br /&gt;
*&#039;&#039;&#039;Threshold Source Value&#039;&#039;&#039; This is the threshold defined for a specific SignalSource module. Individual amplifiers may have different input ranges, resulting in recording signals with different ranges of magnitude. The &#039;&#039;&#039;Source&#039;&#039;&#039;  entry is a value in mV. For example, the threshold setting for the g.USBamp is &#039;&#039;&#039;Threshold gUSBampSource 12.5&#039;&#039;&#039; .&lt;br /&gt;
*&#039;&#039;&#039;ResultOut&#039;&#039;&#039; This is the file that contains the testing results.&lt;br /&gt;
*&#039;&#039;&#039;DataDir&#039;&#039;&#039; The default data directory. It defaults to latencyData in the BCI2000/tools/BCI2000Certification/ folder. &lt;br /&gt;
&lt;br /&gt;
These values should not generally be changed by the user, although they may be updated in future BCI2000 versions.&lt;br /&gt;
&lt;br /&gt;
====CertificationMain.prm====&lt;br /&gt;
This parameter file contains some of the default task parameters common to every test, including the save location, monitor configuration, sampling rate, and visualization settings. Note that these parameters can be overwritten in the *.prm files for each individual test configuration.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.exe====&lt;br /&gt;
This file controls the execution of each task. It parses the BCI2000Certification.ini and BCI2000Certification.cfg files to determine which files and tasks to run, and controls the CPU load monitor. When all tasks are complete, this program calls the BCI2000Analysis.exe program to handle the analysis of the collected data.&lt;br /&gt;
&lt;br /&gt;
====BCI2000CertAnalysis.exe====&lt;br /&gt;
This program analyzes the data collected, and reports results to a data file. It uses the DataDir parameter in the BCI2000Certification.cfg file to determine where the data is located. Results are output to results.txt in the BCI2000/tools/BCI2000Certification/ folder.&lt;br /&gt;
&lt;br /&gt;
====Parameter Files====&lt;br /&gt;
Each task should have it&#039;s own parameter file that contains the unique configuration and settings for that task. For example, there may be several configurations that use the g.USBamp, ARSignalProcessing, and CursorTask, each with its own parameter file. These files end in .prm, and are placed in the BCI2000/tools/BCI2000Certification/parms/ folder.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Results===&lt;br /&gt;
Results are recorded to the BCI2000/tools/BCI2000Certification/results.txt file. The results for each task, and each applicable latency tested, are reported here. If the entire task  passed, then each test performed met the minimum timing requirements specified in the BCI2000Certification.cfg file. If one or more did not pass, then the specific test that did not pass the test has Fail written next to it.&lt;br /&gt;
&lt;br /&gt;
====What if a Task Did Not Pass?====&lt;br /&gt;
TO BE ADDED.&lt;br /&gt;
&lt;br /&gt;
==Certification Protocol==&lt;br /&gt;
This section describes how the testing protocol is run, the various components involved in the certification analysis, and how to interpret results.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
The certification protocol consists of running several BCI2000 applications in multiple configurations to determine if each application meets the minimum requirements for BCI2000, and to determine if individual configurations of an application meet the requirements. For example, the CursorFeedback task may be tested with several combinations of sampling rates, sample block sizes, and processed channels, only some of which may work with a given computer setup.&lt;br /&gt;
&lt;br /&gt;
The testing set is run from a single batch file called LatencyAnalysis.bat. This file is located in the folder BCI2000/tools/BCI2000Certification/batch. This batch file executes additional batch files in this folder, each corresponding to a different application configuration. Each of these batch files starts the Operator module, automatically loading multiple parameter files used for a given configuration. There is a general-purpose parameter file called latencyTest.prm that all configurations use. This file configures the save location for all latency tests, as well as default window positions and sampling rates. A second parameter file is passed to the operator that contains the parameters for a unique application configuration. After starting the operator module, the batch file starts the SignalSource module, SignalProcessing module, and Application module. The loaded configuration is set automatically, and the user needs only to press the start button to start the analysis.&lt;br /&gt;
&lt;br /&gt;
==Software Templates==&lt;br /&gt;
This describes how to implement the testing protocols for your own amplifier system and custom applications. This is useful for determining if your hardware setup and software is capable of maintaining an acceptable level of performance for real-time testing.&lt;br /&gt;
&lt;br /&gt;
===Amplifier Latency===&lt;br /&gt;
The amplifier latency requires an output that can be recorded by the amplifier. In the case of the g.USBamp, a digital output line is used, although either analog or digital outputs could be used in a system. &lt;br /&gt;
&lt;br /&gt;
In the SignalSource module code for your custom amp, find the Process function. Near the beginning of this function, before any data is acquired, set the output signal to 0, either a digital low or analog value of 0 V. This will be dependent on the particular amplifier and API used; for the g.USBamp, this function call looks like: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 0.&lt;br /&gt;
&lt;br /&gt;
At the end of the Process function, the output should be set to a high level. A similar function call will be used to above, only the value is 1 instead of 0; again, the function will be dependent on the system used, and whether analog or digital output is used. Here is the code for the g.USBamp:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 1.&lt;br /&gt;
&lt;br /&gt;
===Visual and Audio Latency===&lt;br /&gt;
Developing new video and optical latency tests does not necessarily require adding additional code to existing modules (beyond any customization already done). &lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
A list of officially supported hardware configurations, and suggested minimum requirements is provided.&lt;br /&gt;
&lt;br /&gt;
===Supported and Tested Hardware===&lt;br /&gt;
====Amplifiers====&lt;br /&gt;
   &lt;br /&gt;
*g.USBamp  &lt;br /&gt;
*gMOBIlab (Serial RS232)  &lt;br /&gt;
*gMOBIlab (Bluetooth)  &lt;br /&gt;
*TDT Pentusa (RX5)  &lt;br /&gt;
&lt;br /&gt;
===Minimum Requirements===&lt;br /&gt;
This table shows the minimum requirements for running BCI2000.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Minimum System Requirements for BCI2000&lt;br /&gt;
! CPU&lt;br /&gt;
| 1 GHz&lt;br /&gt;
|-&lt;br /&gt;
! RAM&lt;br /&gt;
|512 MB (dependent on OS; 1 GB for Windows Vista)&lt;br /&gt;
|-&lt;br /&gt;
! Video Card&lt;br /&gt;
|32 MB VRam; Hardware OpenGL Support&lt;br /&gt;
|-&lt;br /&gt;
! Sound Card&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! Monitor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! OS&lt;br /&gt;
|Windows 2000; Windows XP SP2 or Greater; Windows Vista&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4972</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4972"/>
		<updated>2009-05-27T16:24:35Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Getting Started With the Default Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Latencies==&lt;br /&gt;
Briefly, the different latencies inherent in the BCI2000 system include amplifier latency, processing latency, output latency, and the sum of these, the system latency. Additionally, the block duration jitter will be measured.  The figure below provides a timeline of events that occur within a single block of data, with significant time points labeled. This figure provides an accurate account of the order in which events occur within a block of data, although the time intervals are not necessarily to scale.&lt;br /&gt;
&amp;lt;span id=&amp;quot;TimeLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:timeline3.png|frame|none|Timeline of events. Time intervals are not to scale.]]&lt;br /&gt;
&lt;br /&gt;
===Defining Latencies===&lt;br /&gt;
====Amplifier Latency====&lt;br /&gt;
Amplifier Latency is the minimum delay between the time that a signal is presented at the amplifier input, to when it has been acquired in the source module. Depending on configuration, this may comprise physical signal delay in the amplifier, digitization, transmission from the amplifier to the PC, and processing time inside a hardware driver. That minimum delay occurs for the last sample of a data block, which, unlike its preceding samples in the same block, will spend only a minimum time in hardware and software buffers. In [[#TimeLine|Timeline]],&lt;br /&gt;
&lt;br /&gt;
Amplifier latency = &amp;lt;math&amp;gt;t_{0}-t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For amplifiers connected via bandwidth-limited serial interfaces, transmission latency may have a measurable impact on amplifier latency, depending on the hardware. When using USB 2.0, as is the case for the g.USBamp, transmission latency may generally neglected, as illustrated by the following example: USB 2.0 has a maximum transmission rate of 480 Mbit/s. If we are acquiring 16 channels of 32-bit data, and transmitting in blocks of 16 samples, this is 8192 bits of data; at USB 2.0 speed, this should take roughly 17 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s to transfer. However, a more realistic approximation for USB 2.0 speeds is 240 Mbit/s, which increases the transfer delay to 34 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s. For sampling rates below 30 kHz, this is less than a single sample&#039;s duration.&lt;br /&gt;
&lt;br /&gt;
In addition to amplifier latency, system performance will be influenced by buffering latency. Buffering latency is dependent on the sample block buffer size: When a data sample is digitized, it is not immediately transferred to the PC, but is stored in memory on the amplifier. The PC then makes the appropriate request to the amplifier, and a block of data is transferred all at once to reduce the processing load. This implies that a signal that is digitized at the start of the buffer must wait until the buffer is full to be read into the PC. For example, if the sample block size is 16 samples, the first sample must wait 15 more samples before it can be used in the application. Fortunately, this latency is always known, and can be reduced with a higher sampling rate and/or smaller block sizes, assuming the PC can handle the increased overhead. Buffering latency does not affect the acquisition-to-display latency, because processing occurs immediately after a block&#039;s last sample, which is not affected. Still, it is an important factor to keep in mind, because a large sample block size and/or a small sample rate will decrease the refresh rate for the application (e.g., at a sample rate of 256 Hz and a sample block size of 128 samples, the application will only be refreshed every 0.5 s.)&lt;br /&gt;
&lt;br /&gt;
====Processing Latency====&lt;br /&gt;
Processing Latency is the total time it takes for the data to be processed by all BCI2000 modules (SignalSource, SignalProcessing, and Application).&lt;br /&gt;
&lt;br /&gt;
Processing latency = &amp;lt;math&amp;gt;t_{2}-t_{0}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Processing latency strongly depends on CPU speed, and if this latency becomes too large, high CPU load will probably be the cause, implying decreased or unsuitable BCI2000 performance.&lt;br /&gt;
&lt;br /&gt;
====Output Latency====&lt;br /&gt;
Output Latency is the latency from the time that the Application module issues a command to change the display or issue a sound (or another output), to the time that this output actually occurs.&lt;br /&gt;
&lt;br /&gt;
Output latency = &amp;lt;math&amp;gt;t_{3}-t_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====System Latency====&lt;br /&gt;
System Latency is the minimum time interval between a change in amplifier input, and a causally related change in application output. This is the sum of the above latencies, Amplifier, Processing, and Output. &lt;br /&gt;
&lt;br /&gt;
System latency = &amp;lt;math&amp;gt;t_{3} - t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Block Duration, Block Duration Jitter====&lt;br /&gt;
Block Duration is the time interval between adjacent blocks of data, normalized to the ideal duration of a data block as determined from sampling rate and sample block size:&lt;br /&gt;
&lt;br /&gt;
Block Duration = &amp;lt;math&amp;gt;\frac{t_{5}-t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When the system operates in real time, mean Block Duration will always be 1. Measuring Block Duration has the purpose of obtaining Block Duration Jitter as its standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Measuring Latencies===&lt;br /&gt;
The procedure for measuring the system latencies are below. In general, a combination of recorded events and software time-stamps recorded in BCI2000 data files to determine when important events occur, with ms or better time resolution.&lt;br /&gt;
[[Image:OutTimeline1.png|thumb|500px|none|Recorded events used for measuring latencies.]]&lt;br /&gt;
&lt;br /&gt;
====Measuring Amplifier Latency====&lt;br /&gt;
In [[#TimeLine|TimeLine]], Amplifier Latency is the time interval between the sampling of a data block&#039;s last sample, and its acquisition into the source module&#039;s data buffer:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} = t_{0} - t_{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To measure this latency, the Source module will set a digital output on the amplifier to a high value at time &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; immediately following data acquisition, as indicated in [[#overview|Overview]]. The digital output level is 3.3 V, so a voltage divider may required to attenuate the signal level to the range of amplifier input. This signal is then recorded on an input channel on the amplifier (time &amp;lt;math&amp;gt;t_{1}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In the recorded data, we may then identify &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt;, which is the beginning of sample block &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, by its sample offset, which also coincides with BCI2000 state changes. &amp;lt;math&amp;gt;t_1&amp;lt;/math&amp;gt; may be identified by a change in the recorded signal, occurring in the channel that was connected to the digital output during measurement.&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} \approx t_{0} - t_{-1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Processing Latency====&lt;br /&gt;
The processing latency is defined as the amount of time that it takes for the computer to process the data after acquiring it, to when the application module output is changed. In [[#TimeLine|TimeLine]], this is the time from &amp;lt;math&amp;gt;t_{0}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t_{2}&amp;lt;/math&amp;gt;. Processing latency is calculated using two timestamps saved with every block of data, &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, immediately following data acquisition in the Source module, and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_2&amp;lt;/math&amp;gt; immediately following application presentation in the Application module. Therefore, processing latency for each block of data is calculated as the difference between time stamps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 \mathrm{Processing Latency} = \mathrm{StimulusTime} - \mathrm{SourceTime} = t_{2} - t_{0}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Application Output Latency====&lt;br /&gt;
&amp;lt;span id=&amp;quot;outOverview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
There are many possible application output types, including visual (i.e., the computer screen), audio, or mechanical (e.g., a robotic arm). The core BCI2000 system primarily uses visual and audio output, and so the default testing system will focus on these.&lt;br /&gt;
&lt;br /&gt;
Both visual and audio output can be measured using the g.TRIGbox signal conditioner, which accepts inputs from optical sensors, microphones, or any other input. The user sets a threshold for the input signals, and the g.TRIGbox outputs a digital pulse whenever this threshold is exceeded. This output is then recorded back into the amplifier system, so that the analysis program can measure the response times for each output.&lt;br /&gt;
&lt;br /&gt;
We identify event &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; by a change in the data channel connected to the amplifier&#039;s digital output, and event &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by a change in the data channel connected to the g.TRIGbox, and compute their difference. Also, both events are affected by Amplifier Latency in the same way, so we may ignore Amplifier Latency, and have&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
\mathrm{Output Latency} = t_{3} - t_{2} = (t_3-t_0)-(t_2-t_0) = (t_3-t_0)-\mathrm{ProcessingLatency}.&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring System Latency====&lt;br /&gt;
As defined above, System Latency is the sum of Amplifier Latency, Processing Latency, and Output Latency. It is important to realize that the system latency is dependent on the output modality used, i.e., the video system latency and the audio system latency will vary on the same system due to the differences in output latencies.&lt;br /&gt;
The system latency may be measured&lt;br /&gt;
#directly, by identifying &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt; as the beginning of a data block by its sample index, and &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by the signal change in the channel connected to the g.TRIGbox, and then calculating&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=t_3-t_{-1}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#or indirectly, by using the previously measured quantities&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=\mathrm{AmplifierLatency}+\mathrm{ProcessingLatency}+\mathrm{OutputLatency}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Measuring Block Duration====&lt;br /&gt;
Block Duration is measured as the time between adjacent blocks of data, divided by the theoretical ideal value, which is the sample block duration. For the actual measurement, we use the difference between subsequent &amp;lt;math&amp;gt;\textrm{SourceTime}&amp;lt;/math&amp;gt; time stamps which are recorded at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t_8&amp;lt;/math&amp;gt; in [[#TimeLine|Timeline]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{BlockDuration} = \frac{t_{5} - t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
=\frac{\Delta \mathrm{SourceTime}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Latency Calculation Overview===&lt;br /&gt;
Latencies are calculated by comparing changes in a BCI2000 state value to changes in a recorded signal. The analysis program follows these general steps in calculating the various latencies:&lt;br /&gt;
&lt;br /&gt;
#Determine which threshold values to use based on the &#039;&#039;thresh&#039;&#039;  definition in the BCI2000Certification.cfg file, which defines a threshold based on the amplifier used. For example, the g.USBamp has an input range of -250 mV to + 250 mV, and the g.TRIGbox outputs from 0 to 200 mV, so the threshold used is about 12.5 mV.&lt;br /&gt;
#Traverse the state values for a selected state and find where the state changes from 0 to a given value (or any value). The sample at which this occurs is saved for later use in &amp;lt;math&amp;gt;stateChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#When this occurs, start looking through &amp;lt;math&amp;gt;Signal_{norm}&amp;lt;/math&amp;gt; to find when a rising edge exceeds the determined threshold value. The sample at which this occurs is saved in &amp;lt;math&amp;gt;sigChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#The latency for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th state change is calculated as: &lt;br /&gt;
#:&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
latency_n = \frac{sigChangePos_n-stateChangePos_n}{SampleRate}&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt; &lt;br /&gt;
#:and is stored in an array.&lt;br /&gt;
#Once the entire state vector is traversed, the mean, standard deviation, minimum and maximum values for this latency are calculated and reported.&lt;br /&gt;
&lt;br /&gt;
==Getting Started With the Default Tests==&lt;br /&gt;
This section provides step-by-step instructions on running the default certification procedure. Note that some cables must be assembled before the testing can be done; see the end of this document for information on assembling the cables.&lt;br /&gt;
&lt;br /&gt;
===Starting the Procedure===&lt;br /&gt;
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. To do so, navigate to the BCI2000/tools/BCI2000Certification folder, and start the BCI2000Certification.exe program. This program appears as:&lt;br /&gt;
&lt;br /&gt;
[[image:Certificationtool.png|frame|none|The BCI2000Certification user interface.]]&lt;br /&gt;
&lt;br /&gt;
Using a text editor, open the CertificationMain.prm file in the BCI2000/tools/BCI2000Certification/parms/ folder. Many of the settings should be left alone, except for some of the following cases. &lt;br /&gt;
&lt;br /&gt;
====Sampling Rate====&lt;br /&gt;
This is set to 512 by default. This can be changed to another value that will apply to all tests, except those that explicitly override it in their own parameter file.&lt;br /&gt;
&lt;br /&gt;
====Display parameters====&lt;br /&gt;
These are on the lines that begin with &amp;lt;code&amp;gt;Application:Window&amp;lt;/code&amp;gt;. For many labs, the default settings should work fine; the window is setup to appear in the top-left corner of the main window (&amp;lt;code&amp;gt;WindowLeft= 0&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowTop= 0&amp;lt;/code&amp;gt; ), and is 800 wide by 800 pixels tall (&amp;lt;code&amp;gt;WindowWidth= 800&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight= 800&amp;lt;/code&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
Users with a dual-screen configuration may wish to change this so that the BCI2000 window is on the secondary monitor; to do so, the &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  parameter should be changed, which depends on the resolution and orientation of both monitors. For example, if the 2nd monitor is to the right of the primary monitor, and both monitors have a resolution of 1280x1024 pixels, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1280&amp;lt;/code&amp;gt;  will place the window on the 2nd monitor. Similarly, if the 2nd monitor is to the left of the primary monitor, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;-1280&amp;lt;/code&amp;gt;  will accomplish the same thing. If the monitors have different resolutions (e.g., monitor 1 is 1600x1200 and monitor 2 is 1024x768, located to the right of the 1st monitor), the position should change accordingly. For example, in this scenario, to set the window to the right of the main window, set &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1600&amp;lt;/code&amp;gt; . Finally, set the &amp;lt;code&amp;gt;WindowWidth&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight&amp;lt;/code&amp;gt;  to appropriate values for full-screen, if desired. To summarize, for the dual-screen case in which monitor 1 is 1600x1200 pixels, and monitor 2, to the right of 1, is 1024x768 pixels, and the BCI2000 window should be full-screen on monitor 2, the parameters should look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;Application:Window int WindowWidth= 1024 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowHeight= 768 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowLeft= 1600 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowTop= 0 ...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that nothing following the ... needs to be changed above in the parameter file.&lt;br /&gt;
&lt;br /&gt;
===Connect the Amplifier to the Trigger Box, and Attach Sensors===&lt;br /&gt;
[[Image:connections.png|frame|none|Connections overview]]&lt;br /&gt;
&lt;br /&gt;
This section describes the steps for connecting the necessary hardware. Refer to the Connections Overview figure above for additional information; each step is numbered in this figure.&lt;br /&gt;
&lt;br /&gt;
#Connect the amplifier to the computer; the supported g.tec amps are connected via USB, RS232, or Bluetooth.&lt;br /&gt;
#Connect the Digital I/O cable (see bottom of this document) to the amplifier on the Digital I/O port.&lt;br /&gt;
#Connect the reference and ground wires from the assembled amplifier cables to the amplifier reference and ground connections.&lt;br /&gt;
#Connect the amplifier cables with the safety connectors into channels 1, 2, and 3 on the g.USBamp.&lt;br /&gt;
#Connect the digital output line to the channel 1 amplifier cable.&lt;br /&gt;
#Connect the A output from the trigger box to the channel 2 amplifier cable.&lt;br /&gt;
#Connect the B output from the trigger box to the channel 3 amplifier cable.&lt;br /&gt;
#Connect the optical sensor plug to the g.TRIGbox, using the optical sensor input channel A.&lt;br /&gt;
#Connect the computer audio output using a stereo cable to the g.TRIGbox, using the high-level input channel B.&lt;br /&gt;
&lt;br /&gt;
===Setup Sensor Thresholds===&lt;br /&gt;
The audio and optical sensors each have a threshold setting on the g.TRIGbox, along with an LED indicating whether the current input is above threshold for each channel. At rest, each trigger should be off; if any is on, turn the threshold knob counter-clockwise until the LED is off.&lt;br /&gt;
&lt;br /&gt;
====Audio Threshold====&lt;br /&gt;
To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
&lt;br /&gt;
====Video Threshold====&lt;br /&gt;
To set the video threshold, first tape the optical sensor to the monitor in approximately the correct location, based on the information in the latencyTest.prm file for the window position and dimensions. To activate the optical trigger on the g.TRIGbox, drag a white window, such as a Notepad window, in the background under the sensor. Move the threshold knob for channel A until the LED for that channel is just on (i.e., turning it down just a little turns the trigger off). The sensor will be placed more accurately in the following step.&lt;br /&gt;
&lt;br /&gt;
===Starting the Software===&lt;br /&gt;
[[image:Certificationtool.png]]&lt;br /&gt;
Navigate to BCI2000/tools/BCI2000Certification, and double-click the BCI2000Certification.exe program. The BCI2000 program should start, with the output window in the location specified in the latencyTest.prm file. If there are any errors at startup, the BCI2000 error log will report them. If there are errors, correct them, exit out of the BCI2000Certification.exe program, and restart the program.&lt;br /&gt;
&lt;br /&gt;
===Setting up the Optical Sensor===&lt;br /&gt;
Each application has a unique display configuration, where the visual target of interest is located in a specific position on the monitor. Generally, the optical sensor will not likely have to be moved far in between tasks due to the design of the parameter files. However, it is still necessary to ensure that the sensor is in the correct position for each task, and to be able to change the position if necessary. This section describes the process to find the correct location on the monitor for the sensor. To begin, the certification procedure should be started.&lt;br /&gt;
&lt;br /&gt;
====P3Speller====&lt;br /&gt;
The P3Speller task has an group of letters arranged into rows and columns. The analysis uses the letter in the 3rd column and 3rd row, which will contain the letter X when the program is run. This location should be very close to that specified for the CursorTask, described above. Fortunately, the arrangement of the letters is shown before the test starts, which allows the sensor to be adjusted if necessary. All of the following default tasks are setup so that the optical sensor does not need to be moved from this position.&lt;br /&gt;
&lt;br /&gt;
====CursorTask====&lt;br /&gt;
In the default configuration, the optical sensory does not need to be moved from the position used for the P3Speller task. For custom tests, the flashing object must either be placed under the sensor, or the sensor needs to be moved to the correct position.&lt;br /&gt;
&lt;br /&gt;
====StimulusPresentation====&lt;br /&gt;
For the StimulusPresentation tasks, a single large icon appears in the center of the screen, which will be detected by the sensor. The default location of the sensor as defined for the CursorTask should be able to capture the icon on the screen. However, if the task begins and it appears that it is outside the icon location, move the sensor to the middle of the icon. Keep in mind that it may have to be relocated for following tasks.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
Once the optical sensor is setup and calibrated for a task, begin the testing process. To start the process, press the Start button in the BCI2000 operator window. At the end of each task, the program will quit automatically, and the next one will start automatically. For each task, press the Start button to begin.&lt;br /&gt;
&lt;br /&gt;
Occasionally, the optical sensor may not be in the exact correct place for a given task.You should be able to see changes in on the video channel (channel 2 by default) in the window showing the recorded channels. If the signal is not changing when it should be (e.g., during the correct visual stimulus), you may try increasing the threshold to catch the stimulus, or you may need to place the sensor in the correct location. To do this, place the sensor in the better location, then quit the current BCI2000 test, and quit the BCI2000Certification program. The procedure will need to be restarted.&lt;br /&gt;
&lt;br /&gt;
When the testing is complete, the BCI2000CertAnalysis program will automatically start. It will analyze the data that have been collected, and return the results in the results.txt file. In general, a Pass or Fail will be written next to a task, and each task component, if it passed or failed the test. For more information on interpreting results, see below.&lt;br /&gt;
&lt;br /&gt;
==BCI2000Certification: Additional Information==&lt;br /&gt;
The previous section on Getting Started provided information to quickly setup and run the default tests. This section provides detailed information about each file used, and how to modify the files for your specific system and applications.&lt;br /&gt;
&lt;br /&gt;
===Overview of Important Files===&lt;br /&gt;
There are several important files that are used in the BCI2000 Certification procedure. These files and their contents are described in this section. &lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.ini====&lt;br /&gt;
The BCI2000Certification.ini file contains the information that defines each task configuration. It is located in the BCI2000/tools/BCI2000Certification/ folder. It specifies the parameter file, the SignalSource, SignalProcessing, and Application modules, and the analysis definitions for each task. It contains all of the default tests, although it can easily be expanded to include additional or customized task configurations.&lt;br /&gt;
&lt;br /&gt;
Each task is defined by a set of &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; , space-separated fields, as described below. A * indicates an optional field. The % character indicates a comment, and everything following that character is ignored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; The name of the task, which should be unique. This generally describes the task. It must not contain any spaces. This value determines the path to the saved data file, and the name of the file itself. For example, the name StimulusPresentation_512 would create a file at &amp;lt;code&amp;gt;./Data/StimulusPresentation_512001/StimulusPresentation_512S001R01.dat&amp;lt;/code&amp;gt; Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;name StimulusPresentation_512&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;parm&#039;&#039;&#039;The BCI2000 *.prm file used for this task. It should be placed in the BCI2000/tools/BCI2000Certification/parms/ folder. Note that the CertificationMain.prm is included in &#039;&#039;all&#039;&#039;  configurations by default, and does not need to be listed here. This file contains the information for this specific task configuration. See above for further information.&lt;br /&gt;
**&amp;lt;code&amp;gt;parm SimpleAV.prm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SignalSource module to be used for this test. The g.tec g.USBamp system is used in all configurations by default. If the g.MOBIlab or g.MOBIlab+ are used, the SignalSource module should be changed to the appropriate executable. All BCI2000 executables are located in BCI2000/prog/. Examples:&lt;br /&gt;
**&amp;lt;code&amp;gt;&#039;source gUSBampSource.exe&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;source gMOBIlabSource.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;sigproc&#039;&#039;&#039; The SignalProcessing module that is used for this configuration. This is likely dependent on the application used as well. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;sigproc P3SignalProcessing.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;app&#039;&#039;&#039; The application for this configuration. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;app StimulusPresentation.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*amp&#039;&#039;&#039; This is a single value that gives the channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;amp 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*dAmp&#039;&#039;&#039; This is a single value that specifies a digital input channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;dAmp 15&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*vid&#039;&#039;&#039; This field is followed by 3 values, that give the channel number that is recording the video output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;vid 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*aud&#039;&#039;&#039;  This field is followed by 3 values, that give the channel number that is recording the audio output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;aud 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;skip&#039;&#039;&#039; Entering &#039;&#039;&#039;skip&#039;&#039;&#039;  will cause this task to not be run or analyzed. This is used to reduce the number of tasks that are run, which helps to repeat individual tasks that may have had problems in previous sessions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; This must come at the end of each task definition.&lt;br /&gt;
&lt;br /&gt;
In addition to task-specific entries, there are several global entries that will apply to every task, unless explicitly overwritten in that task. This allows the user to quickly change settings for all tasks simultaneously, e.g., if tests will be run using a g.tec g.USBamp for one set of tests, and a g.tec g.MOBIlab for another. Global entries must be defined at the beginning of the BCI2000Certification.ini file outside of the task definitions. These entries are defined as:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SourceModule to be used for all tests, unless explicitly overwritten by an individual task. Otherwise identical to the &#039;&#039;&#039;source&#039;&#039;&#039;  definition in a task entry.&lt;br /&gt;
*&#039;&#039;&#039;export&#039;&#039;&#039; This entry does not use any other parameters on the line on which it is defined. If &#039;&#039;&#039;export&#039;&#039;&#039;  is present in the BCI2000Certification.ini file, test results will be written to a comma-separated-value (CSV) text file that is located in the folder where data is saved for each task. For example, if the data folder is BCI2000/tools/BCI2000Certification/latencyData/, then the export file for the SimpleTarget task will be placed in the folder BCI2000/tools/BCI2000Certification/latencyData/SimpleTarget.&lt;br /&gt;
&lt;br /&gt;
Here is a full example entry that includes two tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source gUSBampSource&lt;br /&gt;
export&lt;br /&gt;
&lt;br /&gt;
name StimulusPresentation_512&lt;br /&gt;
parm StimulusPresentation_512.prm&lt;br /&gt;
sigproc P3SignalProcessing&lt;br /&gt;
app StimulusPresentation&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 StimulusCode 3&lt;br /&gt;
aud 2 StimulusCode 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
name CursorTask_1200&lt;br /&gt;
parm CursorTask_1200.prm&lt;br /&gt;
source gMOBIlab&lt;br /&gt;
sigproc ARSignalProcessing&lt;br /&gt;
app CursorTask&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 TargetCode 1&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;  task uses the &amp;lt;code&amp;gt;gUSBampSource&amp;lt;/code&amp;gt;  source module, and records block-triggered digital outputs on channel 0, video output triggered off of stimulus code 3 on channel 1, and audio output triggered off of stimulus code 3 on channel 2. The &amp;lt;code&amp;gt;SimpleTarget&amp;lt;/code&amp;gt;  tasks overrides the global &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; entry, and uses its own &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;  definition, specifying that a gMOBIlab should be used for acquisition instead of a gUSBamp. Finally, the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;  entry is set at the beginning, so test results for all files are output to a CSV file.&lt;br /&gt;
&lt;br /&gt;
The BCI2000Certification.ini file contains many task definitions. Each entry is read by the BCI2000Certification.exe program, and is entered as a separate task to be run and then analyzed.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.cfg====&lt;br /&gt;
The latencyTest.prm file is located in the BCI2000/tools/BCI2000Certification/ folder. It contains many default settings and definitions that determine how the results are interpreted, and should generally not be changed by the user. The timing definitions provide the absolute maximum latencies in ms for each step in the system chain, and include the Amp, ProcLat, VidOut, AudOut, VidSys, AudSys, and Jitter (see below for explanations). Timing definitions can include either one or two fields; the first field is mandatory, and is the mean value in ms, while the second field is optional, and is the standard deviation in ms.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Amp&#039;&#039;&#039; The amplifier latency.&lt;br /&gt;
*&#039;&#039;&#039;ProcLat&#039;&#039;&#039; The processing latency.&lt;br /&gt;
*&#039;&#039;&#039;VidOut&#039;&#039;&#039; The video output latency.&lt;br /&gt;
*&#039;&#039;&#039;AudOut&#039;&#039;&#039; The audio output latency.&lt;br /&gt;
*&#039;&#039;&#039;VidSys&#039;&#039;&#039; The video system latency.&lt;br /&gt;
*&#039;&#039;&#039;AudSys&#039;&#039;&#039; The audio system latency.&lt;br /&gt;
*&#039;&#039;&#039;Jitter&#039;&#039;&#039; The system jitter. This is the difference, in ms, between the actual block duration and theoretical block duration, which is determined by the block size.&lt;br /&gt;
*&#039;&#039;&#039;Threshold Source Value&#039;&#039;&#039; This is the threshold defined for a specific SignalSource module. Individual amplifiers may have different input ranges, resulting in recording signals with different ranges of magnitude. The &#039;&#039;&#039;Source&#039;&#039;&#039;  entry is a value in mV. For example, the threshold setting for the g.USBamp is &#039;&#039;&#039;Threshold gUSBampSource 12.5&#039;&#039;&#039; .&lt;br /&gt;
*&#039;&#039;&#039;ResultOut&#039;&#039;&#039; This is the file that contains the testing results.&lt;br /&gt;
*&#039;&#039;&#039;DataDir&#039;&#039;&#039; The default data directory. It defaults to latencyData in the BCI2000/tools/BCI2000Certification/ folder. &lt;br /&gt;
&lt;br /&gt;
These values should not generally be changed by the user, although they may be updated in future BCI2000 versions.&lt;br /&gt;
&lt;br /&gt;
====CertificationMain.prm====&lt;br /&gt;
This parameter file contains some of the default task parameters common to every test, including the save location, monitor configuration, sampling rate, and visualization settings. Note that these parameters can be overwritten in the *.prm files for each individual test configuration.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.exe====&lt;br /&gt;
This file controls the execution of each task. It parses the BCI2000Certification.ini and BCI2000Certification.cfg files to determine which files and tasks to run, and controls the CPU load monitor. When all tasks are complete, this program calls the BCI2000Analysis.exe program to handle the analysis of the collected data.&lt;br /&gt;
&lt;br /&gt;
====BCI2000CertAnalysis.exe====&lt;br /&gt;
This program analyzes the data collected, and reports results to a data file. It uses the DataDir parameter in the BCI2000Certification.cfg file to determine where the data is located. Results are output to results.txt in the BCI2000/tools/BCI2000Certification/ folder.&lt;br /&gt;
&lt;br /&gt;
====Parameter Files====&lt;br /&gt;
Each task should have it&#039;s own parameter file that contains the unique configuration and settings for that task. For example, there may be several configurations that use the g.USBamp, ARSignalProcessing, and CursorTask, each with its own parameter file. These files end in .prm, and are placed in the BCI2000/tools/BCI2000Certification/parms/ folder.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Results===&lt;br /&gt;
Results are recorded to the BCI2000/tools/BCI2000Certification/results.txt file. The results for each task, and each applicable latency tested, are reported here. If the entire task  passed, then each test performed met the minimum timing requirements specified in the BCI2000Certification.cfg file. If one or more did not pass, then the specific test that did not pass the test has Fail written next to it.&lt;br /&gt;
&lt;br /&gt;
====What if a Task Did Not Pass?====&lt;br /&gt;
TO BE ADDED.&lt;br /&gt;
&lt;br /&gt;
==Certification Protocol==&lt;br /&gt;
This section describes how the testing protocol is run, the various components involved in the certification analysis, and how to interpret results.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
The certification protocol consists of running several BCI2000 applications in multiple configurations to determine if each application meets the minimum requirements for BCI2000, and to determine if individual configurations of an application meet the requirements. For example, the CursorFeedback task may be tested with several combinations of sampling rates, sample block sizes, and processed channels, only some of which may work with a given computer setup.&lt;br /&gt;
&lt;br /&gt;
The testing set is run from a single batch file called LatencyAnalysis.bat. This file is located in the folder BCI2000/tools/BCI2000Certification/batch. This batch file executes additional batch files in this folder, each corresponding to a different application configuration. Each of these batch files starts the Operator module, automatically loading multiple parameter files used for a given configuration. There is a general-purpose parameter file called latencyTest.prm that all configurations use. This file configures the save location for all latency tests, as well as default window positions and sampling rates. A second parameter file is passed to the operator that contains the parameters for a unique application configuration. After starting the operator module, the batch file starts the SignalSource module, SignalProcessing module, and Application module. The loaded configuration is set automatically, and the user needs only to press the start button to start the analysis.&lt;br /&gt;
&lt;br /&gt;
==Software Templates==&lt;br /&gt;
This describes how to implement the testing protocols for your own amplifier system and custom applications. This is useful for determining if your hardware setup and software is capable of maintaining an acceptable level of performance for real-time testing.&lt;br /&gt;
&lt;br /&gt;
===Amplifier Latency===&lt;br /&gt;
The amplifier latency requires an output that can be recorded by the amplifier. In the case of the g.USBamp, a digital output line is used, although either analog or digital outputs could be used in a system. &lt;br /&gt;
&lt;br /&gt;
In the SignalSource module code for your custom amp, find the Process function. Near the beginning of this function, before any data is acquired, set the output signal to 0, either a digital low or analog value of 0 V. This will be dependent on the particular amplifier and API used; for the g.USBamp, this function call looks like: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 0.&lt;br /&gt;
&lt;br /&gt;
At the end of the Process function, the output should be set to a high level. A similar function call will be used to above, only the value is 1 instead of 0; again, the function will be dependent on the system used, and whether analog or digital output is used. Here is the code for the g.USBamp:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 1.&lt;br /&gt;
&lt;br /&gt;
===Visual and Audio Latency===&lt;br /&gt;
Developing new video and optical latency tests does not necessarily require adding additional code to existing modules (beyond any customization already done). &lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
A list of officially supported hardware configurations, and suggested minimum requirements is provided.&lt;br /&gt;
&lt;br /&gt;
===Supported and Tested Hardware===&lt;br /&gt;
====Amplifiers====&lt;br /&gt;
   &lt;br /&gt;
*g.USBamp  &lt;br /&gt;
*gMOBIlab (Serial RS232)  &lt;br /&gt;
*gMOBIlab (Bluetooth)  &lt;br /&gt;
*TDT Pentusa (RX5)  &lt;br /&gt;
&lt;br /&gt;
===Minimum Requirements===&lt;br /&gt;
This table shows the minimum requirements for running BCI2000.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Minimum System Requirements for BCI2000&lt;br /&gt;
! CPU&lt;br /&gt;
| 1 GHz&lt;br /&gt;
|-&lt;br /&gt;
! RAM&lt;br /&gt;
|512 MB (dependent on OS; 1 GB for Windows Vista)&lt;br /&gt;
|-&lt;br /&gt;
! Video Card&lt;br /&gt;
|32 MB VRam; Hardware OpenGL Support&lt;br /&gt;
|-&lt;br /&gt;
! Sound Card&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! Monitor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! OS&lt;br /&gt;
|Windows 2000; Windows XP SP2 or Greater; Windows Vista&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4969</id>
		<title>User Reference:BCI2000Certification</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:BCI2000Certification&amp;diff=4969"/>
		<updated>2009-05-26T14:52:34Z</updated>

		<summary type="html">&lt;p&gt;Awilson: /* Starting the Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
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 &#039;&#039;any&#039;&#039;  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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
   &lt;br /&gt;
*Support for the the g.tec series of amplifiers, including the g.USBamp, g.MOBIlab, and the g.MOBIlab+ (bluetooth) amplifiers.  &lt;br /&gt;
*The AR, P3, FFT, and Matlab signal processing modules.  &lt;br /&gt;
*The CursorTask, P3Speller, and StimulusPresentation application modules.  &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The certification procedure works by comparing the differences in time of when BCI2000 &#039;&#039;expects&#039;&#039;  an event to occur to when that event &#039;&#039;actually&#039;&#039;  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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Latencies==&lt;br /&gt;
Briefly, the different latencies inherent in the BCI2000 system include amplifier latency, processing latency, output latency, and the sum of these, the system latency. Additionally, the block duration jitter will be measured.  The figure below provides a timeline of events that occur within a single block of data, with significant time points labeled. This figure provides an accurate account of the order in which events occur within a block of data, although the time intervals are not necessarily to scale.&lt;br /&gt;
&amp;lt;span id=&amp;quot;TimeLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:timeline3.png|frame|none|Timeline of events. Time intervals are not to scale.]]&lt;br /&gt;
&lt;br /&gt;
===Defining Latencies===&lt;br /&gt;
====Amplifier Latency====&lt;br /&gt;
Amplifier Latency is the minimum delay between the time that a signal is presented at the amplifier input, to when it has been acquired in the source module. Depending on configuration, this may comprise physical signal delay in the amplifier, digitization, transmission from the amplifier to the PC, and processing time inside a hardware driver. That minimum delay occurs for the last sample of a data block, which, unlike its preceding samples in the same block, will spend only a minimum time in hardware and software buffers. In [[#TimeLine|Timeline]],&lt;br /&gt;
&lt;br /&gt;
Amplifier latency = &amp;lt;math&amp;gt;t_{0}-t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For amplifiers connected via bandwidth-limited serial interfaces, transmission latency may have a measurable impact on amplifier latency, depending on the hardware. When using USB 2.0, as is the case for the g.USBamp, transmission latency may generally neglected, as illustrated by the following example: USB 2.0 has a maximum transmission rate of 480 Mbit/s. If we are acquiring 16 channels of 32-bit data, and transmitting in blocks of 16 samples, this is 8192 bits of data; at USB 2.0 speed, this should take roughly 17 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s to transfer. However, a more realistic approximation for USB 2.0 speeds is 240 Mbit/s, which increases the transfer delay to 34 &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;s. For sampling rates below 30 kHz, this is less than a single sample&#039;s duration.&lt;br /&gt;
&lt;br /&gt;
In addition to amplifier latency, system performance will be influenced by buffering latency. Buffering latency is dependent on the sample block buffer size: When a data sample is digitized, it is not immediately transferred to the PC, but is stored in memory on the amplifier. The PC then makes the appropriate request to the amplifier, and a block of data is transferred all at once to reduce the processing load. This implies that a signal that is digitized at the start of the buffer must wait until the buffer is full to be read into the PC. For example, if the sample block size is 16 samples, the first sample must wait 15 more samples before it can be used in the application. Fortunately, this latency is always known, and can be reduced with a higher sampling rate and/or smaller block sizes, assuming the PC can handle the increased overhead. Buffering latency does not affect the acquisition-to-display latency, because processing occurs immediately after a block&#039;s last sample, which is not affected. Still, it is an important factor to keep in mind, because a large sample block size and/or a small sample rate will decrease the refresh rate for the application (e.g., at a sample rate of 256 Hz and a sample block size of 128 samples, the application will only be refreshed every 0.5 s.)&lt;br /&gt;
&lt;br /&gt;
====Processing Latency====&lt;br /&gt;
Processing Latency is the total time it takes for the data to be processed by all BCI2000 modules (SignalSource, SignalProcessing, and Application).&lt;br /&gt;
&lt;br /&gt;
Processing latency = &amp;lt;math&amp;gt;t_{2}-t_{0}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Processing latency strongly depends on CPU speed, and if this latency becomes too large, high CPU load will probably be the cause, implying decreased or unsuitable BCI2000 performance.&lt;br /&gt;
&lt;br /&gt;
====Output Latency====&lt;br /&gt;
Output Latency is the latency from the time that the Application module issues a command to change the display or issue a sound (or another output), to the time that this output actually occurs.&lt;br /&gt;
&lt;br /&gt;
Output latency = &amp;lt;math&amp;gt;t_{3}-t_{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====System Latency====&lt;br /&gt;
System Latency is the minimum time interval between a change in amplifier input, and a causally related change in application output. This is the sum of the above latencies, Amplifier, Processing, and Output. &lt;br /&gt;
&lt;br /&gt;
System latency = &amp;lt;math&amp;gt;t_{3} - t_{-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Block Duration, Block Duration Jitter====&lt;br /&gt;
Block Duration is the time interval between adjacent blocks of data, normalized to the ideal duration of a data block as determined from sampling rate and sample block size:&lt;br /&gt;
&lt;br /&gt;
Block Duration = &amp;lt;math&amp;gt;\frac{t_{5}-t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When the system operates in real time, mean Block Duration will always be 1. Measuring Block Duration has the purpose of obtaining Block Duration Jitter as its standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Measuring Latencies===&lt;br /&gt;
The procedure for measuring the system latencies are below. In general, a combination of recorded events and software time-stamps recorded in BCI2000 data files to determine when important events occur, with ms or better time resolution.&lt;br /&gt;
[[Image:OutTimeline1.png|thumb|500px|none|Recorded events used for measuring latencies.]]&lt;br /&gt;
&lt;br /&gt;
====Measuring Amplifier Latency====&lt;br /&gt;
In [[#TimeLine|TimeLine]], Amplifier Latency is the time interval between the sampling of a data block&#039;s last sample, and its acquisition into the source module&#039;s data buffer:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} = t_{0} - t_{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To measure this latency, the Source module will set a digital output on the amplifier to a high value at time &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; immediately following data acquisition, as indicated in [[#overview|Overview]]. The digital output level is 3.3 V, so a voltage divider may required to attenuate the signal level to the range of amplifier input. This signal is then recorded on an input channel on the amplifier (time &amp;lt;math&amp;gt;t_{1}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In the recorded data, we may then identify &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt;, which is the beginning of sample block &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, by its sample offset, which also coincides with BCI2000 state changes. &amp;lt;math&amp;gt;t_1&amp;lt;/math&amp;gt; may be identified by a change in the recorded signal, occurring in the channel that was connected to the digital output during measurement.&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{AmplifierLatency} \approx t_{0} - t_{-1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Processing Latency====&lt;br /&gt;
The processing latency is defined as the amount of time that it takes for the computer to process the data after acquiring it, to when the application module output is changed. In [[#TimeLine|TimeLine]], this is the time from &amp;lt;math&amp;gt;t_{0}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t_{2}&amp;lt;/math&amp;gt;. Processing latency is calculated using two timestamps saved with every block of data, &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;SourceTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, immediately following data acquisition in the Source module, and &amp;lt;math&amp;gt;StimulusTime&amp;lt;/math&amp;gt; is saved at &amp;lt;math&amp;gt;t_2&amp;lt;/math&amp;gt; immediately following application presentation in the Application module. Therefore, processing latency for each block of data is calculated as the difference between time stamps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 \mathrm{Processing Latency} = \mathrm{StimulusTime} - \mathrm{SourceTime} = t_{2} - t_{0}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring Application Output Latency====&lt;br /&gt;
&amp;lt;span id=&amp;quot;outOverview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
There are many possible application output types, including visual (i.e., the computer screen), audio, or mechanical (e.g., a robotic arm). The core BCI2000 system primarily uses visual and audio output, and so the default testing system will focus on these.&lt;br /&gt;
&lt;br /&gt;
Both visual and audio output can be measured using the g.TRIGbox signal conditioner, which accepts inputs from optical sensors, microphones, or any other input. The user sets a threshold for the input signals, and the g.TRIGbox outputs a digital pulse whenever this threshold is exceeded. This output is then recorded back into the amplifier system, so that the analysis program can measure the response times for each output.&lt;br /&gt;
&lt;br /&gt;
We identify event &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; by a change in the data channel connected to the amplifier&#039;s digital output, and event &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by a change in the data channel connected to the g.TRIGbox, and compute their difference. Also, both events are affected by Amplifier Latency in the same way, so we may ignore Amplifier Latency, and have&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
\mathrm{Output Latency} = t_{3} - t_{2} = (t_3-t_0)-(t_2-t_0) = (t_3-t_0)-\mathrm{ProcessingLatency}.&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring System Latency====&lt;br /&gt;
As defined above, System Latency is the sum of Amplifier Latency, Processing Latency, and Output Latency. It is important to realize that the system latency is dependent on the output modality used, i.e., the video system latency and the audio system latency will vary on the same system due to the differences in output latencies.&lt;br /&gt;
The system latency may be measured&lt;br /&gt;
#directly, by identifying &amp;lt;math&amp;gt;t_{-1}&amp;lt;/math&amp;gt; as the beginning of a data block by its sample index, and &amp;lt;math&amp;gt;t_3&amp;lt;/math&amp;gt; by the signal change in the channel connected to the g.TRIGbox, and then calculating&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=t_3-t_{-1}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#or indirectly, by using the previously measured quantities&amp;lt;br /&amp;gt;&amp;lt;math&amp;gt;\textrm{SystemLatency}=\mathrm{AmplifierLatency}+\mathrm{ProcessingLatency}+\mathrm{OutputLatency}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Measuring Block Duration====&lt;br /&gt;
Block Duration is measured as the time between adjacent blocks of data, divided by the theoretical ideal value, which is the sample block duration. For the actual measurement, we use the difference between subsequent &amp;lt;math&amp;gt;\textrm{SourceTime}&amp;lt;/math&amp;gt; time stamps which are recorded at &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t_8&amp;lt;/math&amp;gt; in [[#TimeLine|Timeline]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\mathrm{BlockDuration} = \frac{t_{5} - t_{0}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
=\frac{\Delta \mathrm{SourceTime}}{\mathrm{SampleBlockSize}/\mathrm{SamplingRate}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Latency Calculation Overview===&lt;br /&gt;
Latencies are calculated by comparing changes in a BCI2000 state value to changes in a recorded signal. The analysis program follows these general steps in calculating the various latencies:&lt;br /&gt;
&lt;br /&gt;
#Determine which threshold values to use based on the &#039;&#039;thresh&#039;&#039;  definition in the BCI2000Certification.cfg file, which defines a threshold based on the amplifier used. For example, the g.USBamp has an input range of -250 mV to + 250 mV, and the g.TRIGbox outputs from 0 to 200 mV, so the threshold used is about 12.5 mV.&lt;br /&gt;
#Traverse the state values for a selected state and find where the state changes from 0 to a given value (or any value). The sample at which this occurs is saved for later use in &amp;lt;math&amp;gt;stateChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#When this occurs, start looking through &amp;lt;math&amp;gt;Signal_{norm}&amp;lt;/math&amp;gt; to find when a rising edge exceeds the determined threshold value. The sample at which this occurs is saved in &amp;lt;math&amp;gt;sigChangePos&amp;lt;/math&amp;gt;.&lt;br /&gt;
#The latency for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th state change is calculated as: &lt;br /&gt;
#:&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\begin{matrix}&lt;br /&gt;
latency_n = \frac{sigChangePos_n-stateChangePos_n}{SampleRate}&lt;br /&gt;
\end{matrix}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt; &lt;br /&gt;
#:and is stored in an array.&lt;br /&gt;
#Once the entire state vector is traversed, the mean, standard deviation, minimum and maximum values for this latency are calculated and reported.&lt;br /&gt;
&lt;br /&gt;
==Getting Started With the Default Tests==&lt;br /&gt;
This section provides step-by-step instructions on running the default certification procedure. Note that some cables must be assembled before the testing can be done; see the end of this document for information on assembling the cables.&lt;br /&gt;
&lt;br /&gt;
===Set Default Parameters===&lt;br /&gt;
Using a text editor, open the CertificationMain.prm file in the BCI2000/tools/BCI2000Certification/parms/ folder. Many of the settings should be left alone, except for some of the following cases. &lt;br /&gt;
&lt;br /&gt;
====Sampling Rate====&lt;br /&gt;
This is set to 512 by default. This can be changed to another value that will apply to all tests, except those that explicitly override it in their own parameter file.&lt;br /&gt;
&lt;br /&gt;
====Display parameters====&lt;br /&gt;
These are on the lines that begin with &amp;lt;code&amp;gt;Application:Window&amp;lt;/code&amp;gt;. For many labs, the default settings should work fine; the window is setup to appear in the top-left corner of the main window (&amp;lt;code&amp;gt;WindowLeft= 0&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowTop= 0&amp;lt;/code&amp;gt; ), and is 800 wide by 800 pixels tall (&amp;lt;code&amp;gt;WindowWidth= 800&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight= 800&amp;lt;/code&amp;gt; ).&lt;br /&gt;
&lt;br /&gt;
Users with a dual-screen configuration may wish to change this so that the BCI2000 window is on the secondary monitor; to do so, the &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  parameter should be changed, which depends on the resolution and orientation of both monitors. For example, if the 2nd monitor is to the right of the primary monitor, and both monitors have a resolution of 1280x1024 pixels, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1280&amp;lt;/code&amp;gt;  will place the window on the 2nd monitor. Similarly, if the 2nd monitor is to the left of the primary monitor, setting &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;-1280&amp;lt;/code&amp;gt;  will accomplish the same thing. If the monitors have different resolutions (e.g., monitor 1 is 1600x1200 and monitor 2 is 1024x768, located to the right of the 1st monitor), the position should change accordingly. For example, in this scenario, to set the window to the right of the main window, set &amp;lt;code&amp;gt;WindowLeft&amp;lt;/code&amp;gt;  to &amp;lt;code&amp;gt;1600&amp;lt;/code&amp;gt; . Finally, set the &amp;lt;code&amp;gt;WindowWidth&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;WindowHeight&amp;lt;/code&amp;gt;  to appropriate values for full-screen, if desired. To summarize, for the dual-screen case in which monitor 1 is 1600x1200 pixels, and monitor 2, to the right of 1, is 1024x768 pixels, and the BCI2000 window should be full-screen on monitor 2, the parameters should look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code&amp;gt;Application:Window int WindowWidth= 1024 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowHeight= 768 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowLeft= 1600 ...&amp;lt;br&amp;gt;&lt;br /&gt;
Application:Window int WindowTop= 0 ...&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note that nothing following the ... needs to be changed above in the parameter file.&lt;br /&gt;
&lt;br /&gt;
===Connect the Amplifier to the Trigger Box, and Attach Sensors===&lt;br /&gt;
[[Image:connections.png|frame|none|Connections overview]]&lt;br /&gt;
&lt;br /&gt;
This section describes the steps for connecting the necessary hardware. Refer to the Connections Overview figure above for additional information; each step is numbered in this figure.&lt;br /&gt;
&lt;br /&gt;
#Connect the amplifier to the computer; the supported g.tec amps are connected via USB, RS232, or Bluetooth.&lt;br /&gt;
#Connect the Digital I/O cable (see bottom of this document) to the amplifier on the Digital I/O port.&lt;br /&gt;
#Connect the reference and ground wires from the assembled amplifier cables to the amplifier reference and ground connections.&lt;br /&gt;
#Connect the amplifier cables with the safety connectors into channels 1, 2, and 3 on the g.USBamp.&lt;br /&gt;
#Connect the digital output line to the channel 1 amplifier cable.&lt;br /&gt;
#Connect the A output from the trigger box to the channel 2 amplifier cable.&lt;br /&gt;
#Connect the B output from the trigger box to the channel 3 amplifier cable.&lt;br /&gt;
#Connect the optical sensor plug to the g.TRIGbox, using the optical sensor input channel A.&lt;br /&gt;
#Connect the computer audio output using a stereo cable to the g.TRIGbox, using the high-level input channel B.&lt;br /&gt;
&lt;br /&gt;
===Setup Sensor Thresholds===&lt;br /&gt;
The audio and optical sensors each have a threshold setting on the g.TRIGbox, along with an LED indicating whether the current input is above threshold for each channel. At rest, each trigger should be off; if any is on, turn the threshold knob counter-clockwise until the LED is off.&lt;br /&gt;
&lt;br /&gt;
====Audio Threshold====&lt;br /&gt;
To set the audio threshold, set audio volume on the computer to maximum. On Windows, to make this process easier in the future, go to the Start menu, click the Control Panel, and go to Sounds. In the Sound window, click the box that puts the volume icon in the task bar. A small speaker should now appear in the bottom-right of the screen in the task bar. Click this icon, and slide the volume up to the max; when you click on this slider, Windows emits a short beep to give an idea of the volume level, which can be used to set the threshold. To do so, make sure that the stereo audio cable is plugged into the g.TRIGbox, and click the slider to emit a sound, checking that the green LED is flashing when you click the slider. If it is not, turn the threshold knob for channel B counter-clockwise, and click the slider again. If it is still not working after several tries, unplug the audio cable from the computer, and check that you can hear the beep through the speakers. If you cannot, make sure that the sound is not muted, and that the sound drivers are properly installed. If you can hear it, plug the audio cable back into the computer audio output (NOT the microphone input), and make sure the g.TRIGbox has power; the light next to the power switch should flash momentarily if the battery levels are OK. You can also use a wall power source (see the g.TRIGbox manual for more information). The threshold is set correctly when the channel B LED is off at rest, and is on when a sound is played.&lt;br /&gt;
&lt;br /&gt;
====Video Threshold====&lt;br /&gt;
To set the video threshold, first tape the optical sensor to the monitor in approximately the correct location, based on the information in the latencyTest.prm file for the window position and dimensions. To activate the optical trigger on the g.TRIGbox, drag a white window, such as a Notepad window, in the background under the sensor. Move the threshold knob for channel A until the LED for that channel is just on (i.e., turning it down just a little turns the trigger off). The sensor will be placed more accurately in the following step.&lt;br /&gt;
&lt;br /&gt;
===Starting the Software===&lt;br /&gt;
[[image:Certificationtool.png]]&lt;br /&gt;
Navigate to BCI2000/tools/BCI2000Certification, and double-click the BCI2000Certification.exe program. The BCI2000 program should start, with the output window in the location specified in the latencyTest.prm file. If there are any errors at startup, the BCI2000 error log will report them. If there are errors, correct them, exit out of the BCI2000Certification.exe program, and restart the program.&lt;br /&gt;
&lt;br /&gt;
===Setting up the Optical Sensor===&lt;br /&gt;
Each application has a unique display configuration, where the visual target of interest is located in a specific position on the monitor. Generally, the optical sensor will not likely have to be moved far in between tasks due to the design of the parameter files. However, it is still necessary to ensure that the sensor is in the correct position for each task, and to be able to change the position if necessary. This section describes the process to find the correct location on the monitor for the sensor. To begin, the certification procedure should be started.&lt;br /&gt;
&lt;br /&gt;
====P3Speller====&lt;br /&gt;
The P3Speller task has an group of letters arranged into rows and columns. The analysis uses the letter in the 3rd column and 3rd row, which will contain the letter X when the program is run. This location should be very close to that specified for the CursorTask, described above. Fortunately, the arrangement of the letters is shown before the test starts, which allows the sensor to be adjusted if necessary. All of the following default tasks are setup so that the optical sensor does not need to be moved from this position.&lt;br /&gt;
&lt;br /&gt;
====CursorTask====&lt;br /&gt;
In the default configuration, the optical sensory does not need to be moved from the position used for the P3Speller task. For custom tests, the flashing object must either be placed under the sensor, or the sensor needs to be moved to the correct position.&lt;br /&gt;
&lt;br /&gt;
====StimulusPresentation====&lt;br /&gt;
For the StimulusPresentation tasks, a single large icon appears in the center of the screen, which will be detected by the sensor. The default location of the sensor as defined for the CursorTask should be able to capture the icon on the screen. However, if the task begins and it appears that it is outside the icon location, move the sensor to the middle of the icon. Keep in mind that it may have to be relocated for following tasks.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
Once the optical sensor is setup and calibrated for a task, begin the testing process. To start the process, press the Start button in the BCI2000 operator window. At the end of each task, the program will quit automatically, and the next one will start automatically. For each task, press the Start button to begin.&lt;br /&gt;
&lt;br /&gt;
Occasionally, the optical sensor may not be in the exact correct place for a given task.You should be able to see changes in on the video channel (channel 2 by default) in the window showing the recorded channels. If the signal is not changing when it should be (e.g., during the correct visual stimulus), you may try increasing the threshold to catch the stimulus, or you may need to place the sensor in the correct location. To do this, place the sensor in the better location, then quit the current BCI2000 test, and quit the BCI2000Certification program. The procedure will need to be restarted.&lt;br /&gt;
&lt;br /&gt;
When the testing is complete, the BCI2000CertAnalysis program will automatically start. It will analyze the data that have been collected, and return the results in the results.txt file. In general, a Pass or Fail will be written next to a task, and each task component, if it passed or failed the test. For more information on interpreting results, see below.&lt;br /&gt;
&lt;br /&gt;
==BCI2000Certification: Additional Information==&lt;br /&gt;
The previous section on Getting Started provided information to quickly setup and run the default tests. This section provides detailed information about each file used, and how to modify the files for your specific system and applications.&lt;br /&gt;
&lt;br /&gt;
===Overview of Important Files===&lt;br /&gt;
There are several important files that are used in the BCI2000 Certification procedure. These files and their contents are described in this section. &lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.ini====&lt;br /&gt;
The BCI2000Certification.ini file contains the information that defines each task configuration. It is located in the BCI2000/tools/BCI2000Certification/ folder. It specifies the parameter file, the SignalSource, SignalProcessing, and Application modules, and the analysis definitions for each task. It contains all of the default tests, although it can easily be expanded to include additional or customized task configurations.&lt;br /&gt;
&lt;br /&gt;
Each task is defined by a set of &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; , space-separated fields, as described below. A * indicates an optional field. The % character indicates a comment, and everything following that character is ignored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;name&#039;&#039;&#039; The name of the task, which should be unique. This generally describes the task. It must not contain any spaces. This value determines the path to the saved data file, and the name of the file itself. For example, the name StimulusPresentation_512 would create a file at &amp;lt;code&amp;gt;./Data/StimulusPresentation_512001/StimulusPresentation_512S001R01.dat&amp;lt;/code&amp;gt; Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;name StimulusPresentation_512&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;parm&#039;&#039;&#039;The BCI2000 *.prm file used for this task. It should be placed in the BCI2000/tools/BCI2000Certification/parms/ folder. Note that the CertificationMain.prm is included in &#039;&#039;all&#039;&#039;  configurations by default, and does not need to be listed here. This file contains the information for this specific task configuration. See above for further information.&lt;br /&gt;
**&amp;lt;code&amp;gt;parm SimpleAV.prm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SignalSource module to be used for this test. The g.tec g.USBamp system is used in all configurations by default. If the g.MOBIlab or g.MOBIlab+ are used, the SignalSource module should be changed to the appropriate executable. All BCI2000 executables are located in BCI2000/prog/. Examples:&lt;br /&gt;
**&amp;lt;code&amp;gt;&#039;source gUSBampSource.exe&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;source gMOBIlabSource.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;sigproc&#039;&#039;&#039; The SignalProcessing module that is used for this configuration. This is likely dependent on the application used as well. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;sigproc P3SignalProcessing.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;app&#039;&#039;&#039; The application for this configuration. This program should be located in BCI2000/prog/. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;app StimulusPresentation.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*amp&#039;&#039;&#039; This is a single value that gives the channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;amp 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*dAmp&#039;&#039;&#039; This is a single value that specifies a digital input channel that is used to compute the amplifier latency. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;dAmp 15&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*vid&#039;&#039;&#039; This field is followed by 3 values, that give the channel number that is recording the video output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;vid 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;*aud&#039;&#039;&#039;  This field is followed by 3 values, that give the channel number that is recording the audio output, and the state name and state value to use as a trigger for the comparison. See the example entry for more information. Example:&lt;br /&gt;
**&amp;lt;code&amp;gt;aud 1 StimulusCode 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;skip&#039;&#039;&#039; Entering &#039;&#039;&#039;skip&#039;&#039;&#039;  will cause this task to not be run or analyzed. This is used to reduce the number of tasks that are run, which helps to repeat individual tasks that may have had problems in previous sessions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; This must come at the end of each task definition.&lt;br /&gt;
&lt;br /&gt;
In addition to task-specific entries, there are several global entries that will apply to every task, unless explicitly overwritten in that task. This allows the user to quickly change settings for all tasks simultaneously, e.g., if tests will be run using a g.tec g.USBamp for one set of tests, and a g.tec g.MOBIlab for another. Global entries must be defined at the beginning of the BCI2000Certification.ini file outside of the task definitions. These entries are defined as:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;source&#039;&#039;&#039; The SourceModule to be used for all tests, unless explicitly overwritten by an individual task. Otherwise identical to the &#039;&#039;&#039;source&#039;&#039;&#039;  definition in a task entry.&lt;br /&gt;
*&#039;&#039;&#039;export&#039;&#039;&#039; This entry does not use any other parameters on the line on which it is defined. If &#039;&#039;&#039;export&#039;&#039;&#039;  is present in the BCI2000Certification.ini file, test results will be written to a comma-separated-value (CSV) text file that is located in the folder where data is saved for each task. For example, if the data folder is BCI2000/tools/BCI2000Certification/latencyData/, then the export file for the SimpleTarget task will be placed in the folder BCI2000/tools/BCI2000Certification/latencyData/SimpleTarget.&lt;br /&gt;
&lt;br /&gt;
Here is a full example entry that includes two tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source gUSBampSource&lt;br /&gt;
export&lt;br /&gt;
&lt;br /&gt;
name StimulusPresentation_512&lt;br /&gt;
parm StimulusPresentation_512.prm&lt;br /&gt;
sigproc P3SignalProcessing&lt;br /&gt;
app StimulusPresentation&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 StimulusCode 3&lt;br /&gt;
aud 2 StimulusCode 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
name CursorTask_1200&lt;br /&gt;
parm CursorTask_1200.prm&lt;br /&gt;
source gMOBIlab&lt;br /&gt;
sigproc ARSignalProcessing&lt;br /&gt;
app CursorTask&lt;br /&gt;
amp 0&lt;br /&gt;
dAmp 15&lt;br /&gt;
vid 1 TargetCode 1&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;StimulusPresentation&amp;lt;/code&amp;gt;  task uses the &amp;lt;code&amp;gt;gUSBampSource&amp;lt;/code&amp;gt;  source module, and records block-triggered digital outputs on channel 0, video output triggered off of stimulus code 3 on channel 1, and audio output triggered off of stimulus code 3 on channel 2. The &amp;lt;code&amp;gt;SimpleTarget&amp;lt;/code&amp;gt;  tasks overrides the global &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; entry, and uses its own &amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt;  definition, specifying that a gMOBIlab should be used for acquisition instead of a gUSBamp. Finally, the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt;  entry is set at the beginning, so test results for all files are output to a CSV file.&lt;br /&gt;
&lt;br /&gt;
The BCI2000Certification.ini file contains many task definitions. Each entry is read by the BCI2000Certification.exe program, and is entered as a separate task to be run and then analyzed.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.cfg====&lt;br /&gt;
The latencyTest.prm file is located in the BCI2000/tools/BCI2000Certification/ folder. It contains many default settings and definitions that determine how the results are interpreted, and should generally not be changed by the user. The timing definitions provide the absolute maximum latencies in ms for each step in the system chain, and include the Amp, ProcLat, VidOut, AudOut, VidSys, AudSys, and Jitter (see below for explanations). Timing definitions can include either one or two fields; the first field is mandatory, and is the mean value in ms, while the second field is optional, and is the standard deviation in ms.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Amp&#039;&#039;&#039; The amplifier latency.&lt;br /&gt;
*&#039;&#039;&#039;ProcLat&#039;&#039;&#039; The processing latency.&lt;br /&gt;
*&#039;&#039;&#039;VidOut&#039;&#039;&#039; The video output latency.&lt;br /&gt;
*&#039;&#039;&#039;AudOut&#039;&#039;&#039; The audio output latency.&lt;br /&gt;
*&#039;&#039;&#039;VidSys&#039;&#039;&#039; The video system latency.&lt;br /&gt;
*&#039;&#039;&#039;AudSys&#039;&#039;&#039; The audio system latency.&lt;br /&gt;
*&#039;&#039;&#039;Jitter&#039;&#039;&#039; The system jitter. This is the difference, in ms, between the actual block duration and theoretical block duration, which is determined by the block size.&lt;br /&gt;
*&#039;&#039;&#039;Threshold Source Value&#039;&#039;&#039; This is the threshold defined for a specific SignalSource module. Individual amplifiers may have different input ranges, resulting in recording signals with different ranges of magnitude. The &#039;&#039;&#039;Source&#039;&#039;&#039;  entry is a value in mV. For example, the threshold setting for the g.USBamp is &#039;&#039;&#039;Threshold gUSBampSource 12.5&#039;&#039;&#039; .&lt;br /&gt;
*&#039;&#039;&#039;ResultOut&#039;&#039;&#039; This is the file that contains the testing results.&lt;br /&gt;
*&#039;&#039;&#039;DataDir&#039;&#039;&#039; The default data directory. It defaults to latencyData in the BCI2000/tools/BCI2000Certification/ folder. &lt;br /&gt;
&lt;br /&gt;
These values should not generally be changed by the user, although they may be updated in future BCI2000 versions.&lt;br /&gt;
&lt;br /&gt;
====CertificationMain.prm====&lt;br /&gt;
This parameter file contains some of the default task parameters common to every test, including the save location, monitor configuration, sampling rate, and visualization settings. Note that these parameters can be overwritten in the *.prm files for each individual test configuration.&lt;br /&gt;
&lt;br /&gt;
====BCI2000Certification.exe====&lt;br /&gt;
This file controls the execution of each task. It parses the BCI2000Certification.ini and BCI2000Certification.cfg files to determine which files and tasks to run, and controls the CPU load monitor. When all tasks are complete, this program calls the BCI2000Analysis.exe program to handle the analysis of the collected data.&lt;br /&gt;
&lt;br /&gt;
====BCI2000CertAnalysis.exe====&lt;br /&gt;
This program analyzes the data collected, and reports results to a data file. It uses the DataDir parameter in the BCI2000Certification.cfg file to determine where the data is located. Results are output to results.txt in the BCI2000/tools/BCI2000Certification/ folder.&lt;br /&gt;
&lt;br /&gt;
====Parameter Files====&lt;br /&gt;
Each task should have it&#039;s own parameter file that contains the unique configuration and settings for that task. For example, there may be several configurations that use the g.USBamp, ARSignalProcessing, and CursorTask, each with its own parameter file. These files end in .prm, and are placed in the BCI2000/tools/BCI2000Certification/parms/ folder.&lt;br /&gt;
&lt;br /&gt;
===Interpreting Results===&lt;br /&gt;
Results are recorded to the BCI2000/tools/BCI2000Certification/results.txt file. The results for each task, and each applicable latency tested, are reported here. If the entire task  passed, then each test performed met the minimum timing requirements specified in the BCI2000Certification.cfg file. If one or more did not pass, then the specific test that did not pass the test has Fail written next to it.&lt;br /&gt;
&lt;br /&gt;
====What if a Task Did Not Pass?====&lt;br /&gt;
TO BE ADDED.&lt;br /&gt;
&lt;br /&gt;
==Certification Protocol==&lt;br /&gt;
This section describes how the testing protocol is run, the various components involved in the certification analysis, and how to interpret results.&lt;br /&gt;
&lt;br /&gt;
===Running the Tests===&lt;br /&gt;
The certification protocol consists of running several BCI2000 applications in multiple configurations to determine if each application meets the minimum requirements for BCI2000, and to determine if individual configurations of an application meet the requirements. For example, the CursorFeedback task may be tested with several combinations of sampling rates, sample block sizes, and processed channels, only some of which may work with a given computer setup.&lt;br /&gt;
&lt;br /&gt;
The testing set is run from a single batch file called LatencyAnalysis.bat. This file is located in the folder BCI2000/tools/BCI2000Certification/batch. This batch file executes additional batch files in this folder, each corresponding to a different application configuration. Each of these batch files starts the Operator module, automatically loading multiple parameter files used for a given configuration. There is a general-purpose parameter file called latencyTest.prm that all configurations use. This file configures the save location for all latency tests, as well as default window positions and sampling rates. A second parameter file is passed to the operator that contains the parameters for a unique application configuration. After starting the operator module, the batch file starts the SignalSource module, SignalProcessing module, and Application module. The loaded configuration is set automatically, and the user needs only to press the start button to start the analysis.&lt;br /&gt;
&lt;br /&gt;
==Software Templates==&lt;br /&gt;
This describes how to implement the testing protocols for your own amplifier system and custom applications. This is useful for determining if your hardware setup and software is capable of maintaining an acceptable level of performance for real-time testing.&lt;br /&gt;
&lt;br /&gt;
===Amplifier Latency===&lt;br /&gt;
The amplifier latency requires an output that can be recorded by the amplifier. In the case of the g.USBamp, a digital output line is used, although either analog or digital outputs could be used in a system. &lt;br /&gt;
&lt;br /&gt;
In the SignalSource module code for your custom amp, find the Process function. Near the beginning of this function, before any data is acquired, set the output signal to 0, either a digital low or analog value of 0 V. This will be dependent on the particular amplifier and API used; for the g.USBamp, this function call looks like: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 0.&lt;br /&gt;
&lt;br /&gt;
At the end of the Process function, the output should be set to a high level. A similar function call will be used to above, only the value is 1 instead of 0; again, the function will be dependent on the system used, and whether analog or digital output is used. Here is the code for the g.USBamp:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
GT_SetDigitalOut ( m_hdev.at(0), (UCHAR)1, (UCHAR)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the digital output 1 on device 0 to a value of 1.&lt;br /&gt;
&lt;br /&gt;
===Visual and Audio Latency===&lt;br /&gt;
Developing new video and optical latency tests does not necessarily require adding additional code to existing modules (beyond any customization already done). &lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
A list of officially supported hardware configurations, and suggested minimum requirements is provided.&lt;br /&gt;
&lt;br /&gt;
===Supported and Tested Hardware===&lt;br /&gt;
====Amplifiers====&lt;br /&gt;
   &lt;br /&gt;
*g.USBamp  &lt;br /&gt;
*gMOBIlab (Serial RS232)  &lt;br /&gt;
*gMOBIlab (Bluetooth)  &lt;br /&gt;
*TDT Pentusa (RX5)  &lt;br /&gt;
&lt;br /&gt;
===Minimum Requirements===&lt;br /&gt;
This table shows the minimum requirements for running BCI2000.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Minimum System Requirements for BCI2000&lt;br /&gt;
! CPU&lt;br /&gt;
| 1 GHz&lt;br /&gt;
|-&lt;br /&gt;
! RAM&lt;br /&gt;
|512 MB (dependent on OS; 1 GB for Windows Vista)&lt;br /&gt;
|-&lt;br /&gt;
! Video Card&lt;br /&gt;
|32 MB VRam; Hardware OpenGL Support&lt;br /&gt;
|-&lt;br /&gt;
! Sound Card&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! Monitor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! OS&lt;br /&gt;
|Windows 2000; Windows XP SP2 or Greater; Windows Vista&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Voltage Divider &amp;amp; Amplifier Input===&lt;br /&gt;
Parts List:&lt;br /&gt;
&lt;br /&gt;
*4 Male Mono Audio Connectors  &lt;br /&gt;
*6 12in Safety Connector Wires (to USB amplifier input), different colors  &lt;br /&gt;
*4 3in Wires  &lt;br /&gt;
*Soldering Iron and Solder   &lt;br /&gt;
*resistors for voltage dividers  &lt;br /&gt;
This section describes how to assemble cables that connect the output of the g.TRIGbox to the amplifier input channels.&lt;br /&gt;
&lt;br /&gt;
Strip the free ends of all 6 safety connector wires, about &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt; in. If you are not using voltage dividers, solder 4 of the wires directly  to the center signal connection on the 4 mono audio connectors. Cover the connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlug_1.png|frame|none|g.USBamp Amplifier Plug]]&lt;br /&gt;
&lt;br /&gt;
Next, twist the two remaining safety connector wire ends together, and solder them together. Solder the 4 short wires to the ground connections on the mono plugs. Finally, solder the 4 ground wires to the two safety connector wires that were twisted together and soldered previously, as shown here.&lt;br /&gt;
&lt;br /&gt;
[[Image:ampPlugs_2.png|frame|none|g.USBamp Amplifier Plugs]]&lt;br /&gt;
&lt;br /&gt;
These plugs can plug directly into the g.TRIGbox outputs, and the safety connectors plug into the channels 1-4 inputs on the g.USBamp; the ground wires plug into the ground and reference on the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
===Digital I/O Cable===&lt;br /&gt;
&lt;br /&gt;
Parts List:&lt;br /&gt;
   &lt;br /&gt;
*3 Colored Wires  &lt;br /&gt;
*7-Pin Digital Connector from g.tec  &lt;br /&gt;
*Soldering Iron and Solder  &lt;br /&gt;
*Silicone or electrical tape for insulation  &lt;br /&gt;
*1 Female Mono Audio Plug  &lt;br /&gt;
&lt;br /&gt;
In order to access the digital I/O pins on the g.USBamp, a connector needs to be assembled. The 7-pin digital I/O connector should be ordered through g.TEC, the manufacturer of the g.USBamp.&lt;br /&gt;
&lt;br /&gt;
At least three wires are needed for the circuit, which connect to the digital output 1 pin, the digital input 0 pin,  and the ground pin.&lt;br /&gt;
[[Image:DigIO.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
To start, cut three 10 in wires, preferably with  different colors to differentiate between the signal and ground wires. Cut back a small portion of the ground wire, and solder it to the center ground pin on the connector. Now, find the top of the connector by locating the small plastic notch, and locate pins 3 and 4 relative to the notch. Solder one wire to pin 3, and the remaining wire to pin 4. It may be helpful to insulate the wires from the casing using either a piece of black electrical tape, or an insulating gel, like silicone. If a gel is used, be sure to let it set for several hours or overnight. It is also probably a good idea to check the electrical connection with a multimeter prior to insulating.&lt;br /&gt;
&lt;br /&gt;
[[Image:digConnector.png|frame|none|g.USBamp Digital I/O Pins]]&lt;br /&gt;
&lt;br /&gt;
Next, attach the rubber sleeve over the end of the part with the female threads, as shown in the panel. Slide the smaller metal sleeve over the wires, then slide the larger rubber sleeve over the wires.&lt;br /&gt;
&lt;br /&gt;
For the next step, attach the two metallic pieces that surround the cables, shown laying to the sides below. One of the metal pieces has a small groove in it, which should be placed over the notch on the connector; the other metal piece fits on the opposite side of the connector. Push the small metal sleeve up to the side piece with the groove, and rotate the sleeve until the notch fits in the groove.&lt;br /&gt;
&lt;br /&gt;
Place the  end piece over the connector, with the red dot on top and aligned with the connector notch. Finally, slide the rubber sleeve over the connector, and screw the sleeve into the end piece.&lt;br /&gt;
&lt;br /&gt;
[[Image:finalDigCable.png|frame|none|g.USBamp Digital I/O Cable]]&lt;br /&gt;
&lt;br /&gt;
The plug is assembled next. Solder the signal wire from Pin 3 (Digital Out 1) on the digital I/O connector to the signal connector on the female mono plug, and solder the ground wire to the outer ground connector on the plug. The below figure shows this; in this figure, the red wire is the signal wire, and the brown wire is the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:digPlug.png|frame|none|g.USBamp Digital Wire Plug]]&lt;/div&gt;</summary>
		<author><name>Awilson</name></author>
	</entry>
</feed>