- William Engelhardt (firstname.lastname@example.org)
- Alexander Belsten (email@example.com)
- 2024/01/30: Enable DynamicStimulation to use BCI2000 States as stimulation parameters.
- 2022/10/18: Changed to BufferedADC to prevent data loss.
- 2022/07/18: StimMarker 1 and Ports 1 and 2 are written to BCI2000 States.
- 2021/06/17: Initial working release R6310.
Source Code Revisions
- Initial development: 6274
- Known to compile under: 6969
- Broken since: --
Known Issues/Important Things to Know
- Recording from channels with different sampling rates is not possible.
- The Neuro Omega is not able to immediately switch stimulating an electrode as a cathode to an anode. If this is desired, you must introduce a sham stimulation in-between, which can be done to a channel that is not used
- It has been seen with the computer used for Certification Testing , that if it has been powered on for more than a couple of days (or perhaps another reason, we are not totally sure), it fails to stream consistent data to the Neuro Omega. This creates an irregular block size timing, loss of data, and occasional crashing. This was fixed by restarting the computer. The theory for the source of the problem is that something was wrong with the AO driver, and restarting fixed it.
This source module allows you to collect electrophysiological data from the Alpha Omega Neuro Omega clinical recording system. The Neuro Omega can record from a variety of modalities, such as ECoG, sEEG, micro, and macro contacts. It is often used for the placement of deep brain stimulating electrodes, facilitated by its ability to sonify local field potentials and drive the DBS lead to precise depths.
Edits since the video creation
- You no longer need the BCI2000 computer's MAC address, you only need the Neuro Omega's.
Integration into BCI2000
- Install the NeuroOmega System SDK - The SDK must be downloaded in order to run this source module. The executable "Neuro Omega System SDK .exe" must be obtained to download the SDK.
- Compile the source module - You will need both the Neuro Omega clinical system and a PC with BCI2000 installed and the NeuroOmegaADC source module compiled. Compile the source module on the BCI2000 PC by enabling
BUILD_PRIVATEin your CMake configuration and generating the BCI2000 solution. Access to the private directory in the SVN is necessary. Then compile the source module, and make
NeuroOmegaADCthe source module in your batch file.
Connection to BCI2000 PC
- Connection of Ethernet Cable - The BCI2000 PC connects to the Neuro Omega via a CAT6 ethernet cable. On the back of the Neuro Omega, you will find three ethernet ports. Connect the CAT6 cable into one that is not currently occupied, and connect the other end to the BCI2000 PC. It is a good idea to use an ethernet isolator to prevent transfer of significant current between the two systems.
- Configuring IPv4 address - Now that the two systems are connected physically, the BCI2000 PC's IPv4 address can be configured such that it is on the same subnet as the Neuro Omega. This can be done by checking the IPv4 address and subnet mask on the Neuro Omega system ethernet adapter and setting the BCI2000 PC's ethernet adapter to the same subnet mask and setting an appropriate IPv4 address.
- Installation of SDK - Alpha Omega provides an SDK installer for the Neuro Omega that must be installed. Acquire this installer and carry out the installation process.
- Setting MAC addresses - Now that the two systems are configured, and everything is installed, launch your batch file that has the NeuroOmegaADC as the source module. Open the Config window and navigate to the source tab. You will need to enter the Alpha Omega's MAC address into the NeuroOmegaMAC parameter. This can be located by looking at the sticker on the bottom of the Alpha Omega, near where ethernet ports are.
- Setting Recording Channels - On the Neuro Omega, launch the data acquisition software. Press
Ctrl-Shift-Mto show the menu bar. In the Options tab, open the settings dialog box for the channel type you want to record from. You should see a box like this:
There are two columns in the box that are of particular importance to recording with BCI2000. The first is the Channel ID column. To record from a channel, you will need to enter its corresponding integer Channel ID in the RecordingChIDs parameter in BCI2000. The other important column is the SR (sampling rate) column. All of the channels you record from in BCI2000 must have the same sampling rate. You must enter this sampling rate in the SamplingRate parameter in BCI2000.
This parameter is where stimulation pulses are defined. The pulse shapes are defined according to Fig. 2.
- If only one pulse is desired, Train Duration and Train Frequency don't have to be specified, or they can be set to 0.
- NeuroOmega has a bug where a channel cannot immediately switch from being a cathode to anode, or vice versa. To overcome this restriction, you can introduce a sham stimulation to a channel you are not using. This means you can set both the stimulation amplitudes to 0, and trigger it in-between the two stimulations. For example, if you did bipolar stimulation with Ch 1 and Ch 8 and wanted to switch which channel is the return channel. You could do the first stimulation to Ch 1 (with Ch 8 as the return channel), the sham stimulation, then the second stimulation to Ch 8 (with Ch 1 as the return channel).
- Channel Names are set by the NeuroOmega system. They can be found by following the steps resulting in Figure 1.
- DynamicStimulation: Enable to skip Preflight checks and change stimulation parameters during the run. This can easily be done with BCI2000 States. The State's value is evaluated when the StimulationTrigger Expression is true. This can be useful if you have a custom application which modifies States, then you can set one of the parameters as that State.
To help out with creating the BCI2000 parameters, a GUI has been made which should make it easy to translate your stimulation specifications into BCI2000 parameter files. The GUI also visualizes the stimulation from three different perspectives, making it easy to tell if your parameters are really what you want. There is a Stimulation Configuration tool user reference which will further tell you how to use this tool.
- SourceCh - This parameter should be "auto", as it is determined by the size of the "RecordingChIDs" parameter.
- SampleBlockSize - Number of samples that are transmitted at a time.
- SamplingRate - Some channels on the Neuro Omega are recorded at different sampling rates, so this parameter is dictated by the configuration of the clinical system and must be manually entered accordingly. Information on how to check the sampling rate of a given channel is coming soon.
- ChannelNames - This should be set to auto, as the names of the channels will be automatically acquired from the Neuro Omega.
- SourceChOffset - Use 'auto', or needs to be the length of number of channels in RecordingChIDs.
- SourceChGain - Use 'auto', or needs to be the length of number of channels in RecordingChIDs.
- RecordingChIDs - This parameter should be a list of channel IDs corresponding to the channels you want to record from. Each of these channels must have the same sampling rate.
- NeuroOmegaMAC - This parameter should be the MAC address of the Neuro Omega system.
- SaveMPX - Enabling will save a data file on the Neuro Omega system using their own data format.
- FilePath - Where to save the file on the Neuro Omega system. A tested path has been "C:\Surgeries_Data\<patient ID>"
- FileName - Name of the file on the Neuro Omega system. Will saved where the File Path specifies.
- EnablePortInputs - Enabling this parameter will record from both 16-bit D-Sub digital input connectors to the Port1 and Port2 states.
- ChannelInfo - This is a read-only parameter that will be populated with channel information from the Neuro Omega (namely, the mapping between channel IDs (integers) and channel names).
- ReadDriveDepth - Enable if you would like to read the driver depth from device. Only enable if the driver is connected.
- EnableNeuroOmegaStimulation - If disabled, no stimulation will be performed.
- DynamicStimulation - Described above.
- StimulationConfigurations - Described above.
- StimulationTriggers - Described above.
The 32-bit time at which the channels are read from the Neuro Omega.
From 0 - 100, the quality of the connection between the systems in percentage. Higher is better, and it might be useful for determining the cause of an issue if data isn't able to be streamed.
A state that contains the number of the channel that is being stimulated. It will only be triggered when stimulation is occurring, otherwise it will be zero.
The timestamp at which StimMarker1 occurs. For every StimMarker event, there will be a corresponding time stamp.
Port1 and Port2
These are 16-bit states recorded from the 16-bit D-Sub digital input 1 and input 2 connector on the Neuro Omega. The states record each pin as a 1 or 0, and stored in a certain bit. To decode this data, analyze as binary. For example, if Port1 was 8, this would mean only the 4th pin of Port1 was high and the rest were low.
Port1Time and Port2Time
The timestamps at which Port1 and Port2 are triggered.
There are currently three timestamps logged: NeuroOmega timestamp, StimMarker timestamp, and the Ports 1 and 2 timestamps. The NeuroOmega timestamp is 32 bits, and corresponds to the time at which each block of data is read. Since both the StimMarkers and the Ports are read asynchronously to the signal source, they each have their own timestamps to accurately mark when the event occurred. These states are 16-bit, and increase twice as fast as the NeuroOmegaTimeStamp. To align them, shift every other peak up by 2^15.
Here is a published Matlab script that aligns the data for you: File:AlignNeuroOmegaStimMarkerTime.pdf. The pdf shows an example of how it should look like, but to use it yourself you must change the file path.
The units of the NeuroOmega time are currently unknown, however you can easily convert it to milliseconds by using the SourceTime state at the same index.
The AmpServerPro certification was performed to give a better understanding of the restraints that must be placed on the system when using this device. Certification success criteria was determined internally and without rigor, and reflects our experience with psychophysical experiments and the performance we expect to need for the system. More information about certification testing can be found on the certification wiki page.
- Desktop Windows 10
- Processor: AMD Ryzen 7 5700G with Radeon Graphics 3.80 GHz
- Installed Ram: 32.00 GB
- Graphics Card: AMD Radeon(TM) Graphics
- System Type: 64-bit operating system, x64-based processor
- BCI2000 compiled with MSVC2019 and Qt 5.15.2
- g.USBamp UB with driver version 3.16.00 installed
Certification Tests Performed
Certification testing varied task (P3Spell (7x7 grid), P3Spell (1x1 grid), CursorTask, CursorTaskLow, and StimulusPresentation) with a block size of 100ms, and tested audio and video latency, for a total of 12 performed tasks. The audio latency and video latency are partitioned into separate windows, as we tested them in different runs.
Success Criteria and Overall Results
|Timestamp Latency Mean
|Timestamp Latency STD
|Processing Latency Mean
|Processing Latency STD
|Video Latency Mean
|Video Latency STD
|Audio Latency Mean
|Audio Latency STD
The individual task breakdown can be found commented out in the Wiki code below, for additional information.
To measure the acquisition latency, the Audio and Video Latency were compared between the Neuro Omega and the g.USBAmp, which is considered to have an acquisition latency of 0. Performing this comparison, the Neuro Omega was found to have an average acquisition latency of 11 ± 5 ms.
Two tests were performed to measure the Stimulation Latency: 1) the latency of the StimMarker (the response from the Neuro Omega), and 2) the latency of the actual stimulation.
The two tests were performed at a block size of 100 ms, while stimulating the ECOG High Frequency channel #2 (numbered 10272). As you can observe, the StimMarker recognizes the stimulation before the stimulation actually occurs, by almost half the time.