Jump to content

Contributions:BlackrockGemini: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
Created page with "==Synopsis== The Blackrock Gemini acquisition module enables signal acquisition from Blackrock Microsystems Gemini acquisition hardware through the "cbsdk" C++ API. ==Location== http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/BlackrockGemini ==Versioning== ===Author=== Griffin Milsap (griffin.milsap@gmail.com), Jürgen Mellinger (mellinger@neurotechcenter.org) ===Source Code Revisions=== *Initial development: 4365/8061 *Tested under: 8522 *Known to compile und..."
 
Nluczak (talk | contribs)
Updated to reflect on changes to gemini
Line 35: Line 35:
===SamplingRate===
===SamplingRate===
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.
The sample group can mix neural channels and analog input channels (such as sync, eye-tracking, or photodiode signals).  Any channel you have enabled for continuous streaming in Central at the selected rate will be picked up, regardless of which bank it lives on.  In the BCI2000 signal, neural channels are listed first, followed by the analog input channels, in the order shown by Central.


===SampleBlockSize===
===SampleBlockSize===

Revision as of 16:31, 20 April 2026

Synopsis

The Blackrock Gemini acquisition module enables signal acquisition from Blackrock Microsystems Gemini acquisition hardware through the "cbsdk" C++ API.

Location

http://www.bci2000.org/svn/trunk/src/contrib/SignalSource/BlackrockGemini

Versioning

Author

Griffin Milsap (griffin.milsap@gmail.com), Jürgen Mellinger (mellinger@neurotechcenter.org)

Source Code Revisions

  • Initial development: 4365/8061
  • Tested under: 8522
  • Known to compile under: 8522
  • Broken since: N/A

Functional Description

The BlackrockGemini source module is used for acquiring recordings from Blackrock Gemini systems using CBSDK as provided through official Blackrock channels, or through CereLink (https://github.com/dashesy/CereLink). This documentation explains the parameterization and specifics on how to set up the system.

System Setup

Building the BlackrockGemini module should copy .bat files for standard experiments into the batch directory.

Ensure your machine is connected to a switch or router that the Gemini Hub is also connected to. This module communicates to the Gemini Hub using UDP, and is susceptible to packet loss. Ensure you have a commercial grade switch to avoid dropping packets. You can also use a crossover cable to connect directly to the Gemini Hub, but this prevents other computers from receiving data from the Gemini Hub.

You will also need to change your interface's network configuration:

  • IP address: 192.168.137.XXX where XXX is less than 128. This number needs to be below 16 and not 10. Ensure no other computers have this same address on this switch.
  • Subnet Mask: 255.255.255.0
  • Default Gateway: <Blank>

To test your network configuration, open a terminal or command prompt and type ping 192.168.137.128. This is the Gemini Hub's default network address. If you can ping the Gemini Hub, you should be able to run the module.

Parameters

Blackrock systems are very configurable, and it appears to make little sense to reproduce each individual setting as a BCI2000 parameter. Rather, you will configure the recording setup using the Blackrock "Central" software, and BCI2000 will auto-configure to match the SampleGroup dictated by the SamplingRate parameter. Gemini Hubs always acquire data at 30Khz, but channels can be added to a SampleGroup which is downsampled (with antialiasing) in real-time by the Gemini Hub before being streamed over ethernet to receivers. You can add channels to these channel groups in the Central software by enabling continuous streaming on individual channels, and selecting the sampling rate.

The following parameters are available for configuring the BlackrockGemini source module. You will find these parameters in the Source -- Signal Properties section.

SamplingRate

In standard use, this is one of two parameters you need to play with. This is where you select the sample group you want BCI2000 to record from. Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz. When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.

The sample group can mix neural channels and analog input channels (such as sync, eye-tracking, or photodiode signals). Any channel you have enabled for continuous streaming in Central at the selected rate will be picked up, regardless of which bank it lives on. In the BCI2000 signal, neural channels are listed first, followed by the analog input channels, in the order shown by Central.

SampleBlockSize

There are a bunch of default SampleBlockSizes for the different SamplingRates, which you will get if you use 'auto' as the value of this parameter. They are roughly set to clock BCI2000 at about 50 Hz. Depending on the processing you're doing, you may want to lengthen the block size. Any number of samples is valid here: even 1. You may want to not do that, however. Clocking the system above 50 Hz is a bad choice. The default block size for different sample groups is as follows:

   int gGroupRates[] = { 0, 500, 1000, 2000, 10000, 30000 }; // samples per second
   int gBlockSizes[] = { 0, 10,  20,   40,   200,   600   }; // samples per block (50 Hz)

ChannelNames

These will be pulled from the Channel Label property set in the Central Software. Use 'auto' to configure this parameter.

SourceChOffset/SourceChGain

Again, these are populated automatically. Use 'auto' to configure this parameter.

NSPInstances

This parameter determines how many NSPs you intend to record from. This is the other parameter that you might want to play with, but only if you have more than one NSP. Using more than 2 NSPs is untested.

DigitalOutput

This parameter specifies a matrix of expressions that will be evaluated once per SampleBlock to set the digital output channels. Each row of this matrix defines an expression for one digital output. If that expression evaluates true for that block, the associated digital output will be set high, and vice versa for false. See User Reference:Expression Syntax for help with BCI2000 Expressions. An example matrix is provided below.

   Instance Output Expression
   1        1      StimulusCode!=0 // Will set output 1 on NSP1 high whenever a stimulus is on screen
   2        3      KeyDown!=0 // Will set output 3 on NSP2 high whenever a key is pressed.

States

BlackrockTimeStampHigh

The higher 32 bits of the 64-bit per-sample timestamp sent by the Gemini Hub.

BlackrockTimeStampLow

The lower 32 bits of the 64-bit per-sample timestamp sent by the Gemini Hub. The time stamp itself represents the amount of time since the UNIX epoch (1.1.1970), with a resolution of 1ns (one nanosecond, 1e-9 seconds).

See also

User Reference:Filters, Contributions:ADCs, Contributions:Blackrock