Jump to content

Contributions:CCEPFilter: Difference between revisions

From BCI2000 Wiki
No edit summary
No edit summary
Line 19: Line 19:
*Broken since: --
*Broken since: --


==Integration into BCI2000==
==Installation==
Confirm your BCI2000 svn is up to date and you have built the most recent version.
See [[Python Visualizations#Installation|the Installation section on the Python Visualization page]] to see how to install the necessary packages and how to run demo files! Once that is all set up, you can return to this page to understand the specific parameters for the CCEPs.
Insert <code>Start executable CCEPFilter --local</code> as the SignalProcessing filter into the batch file that you want to run.
 
==Important Limitations==
The CCEP filter processing time should be below the block size timing. There are certain parameters that increase the time it takes to process the desired data for the CCEP visualization. Here are the parameters that as they are increased, they increase the necessary block size timing:
*'''Sampling Rate'''
*All ''Duration Settings'': '''BaselineEpochLength''', '''TriggerLatencyLength''', and '''CCEPEpochLength'''
*'''VisMaxWindows'''
 
The parameter '''HoldPlots''' won't increase the block size timing, however making it too large will increase the round-trip timing. This can make all BCI2000 visualizations delayed, including the Raw Signal and the Timing Window. However, even if the real-time visualization is messed up, the data will still be saved correctly.
 
To be sure using the filter won't cause a disruption of the block-size timing, test your desired parameters before an experiment.


==Parameters==
==Parameters==
Line 64: Line 53:
====OnsetPeriod====
====OnsetPeriod====
Count every number of times the OnsetExpression is evaluated true. In other words, skip every OnsetPeriod - 1. This is helpful if you want to visualize a time range in which the OnsetExpression is met multiple times. If you are also averaging the plots, it will only average the signals specified by this period.
Count every number of times the OnsetExpression is evaluated true. In other words, skip every OnsetPeriod - 1. This is helpful if you want to visualize a time range in which the OnsetExpression is met multiple times. If you are also averaging the plots, it will only average the signals specified by this period.
====HoldPlots====
The number of plots to hold. If it is 0 or 1, only the most recent signal will be shown. Any number higher, and that amount of signals will be shown. The most recent signal will always be white/yellow, while the others will be darker grey, with the oldest as the darkest.
===<u>''Visualization''</u>===
<gallery mode="packed" widths=250px heights=450px>
File:CCEPVisualizationImg.png|A demonstration of the three visualization parameters of the CCEP filter. The specific channels are chosen through the Source parameter Online Processing.
</gallery>
====VisImageWidth====
The total width in pixels that the CCEP visualization will fill. Each sub-window will be adjusted accordingly.
====VisImageHeight====
The total height in pixels that the CCEP visualization will fill. Each sub-window will fill a portion.
====VisMaxWindows====
The maximum amount of windows that are desired to be visualized. To choose which windows are visualized, use the parameter in the Source tab, in the ''Online Processing'' section, '''TransmitChList'''. This lists the channels that are sent to the SignalProcessing filter and on. If VisMaxWindows is less than the number of channels in this list (and non-zero), the first number of windows will be shown.


==See also==
==See also==
[[User Reference:Filters]], [[Contributions:SignalProcessing]]
[[User Reference:Filters]], [[Contributions:SignalProcessing]], [[Python Visualizations]], [[Contributions:PAC]]


[[Category:Contributions]]
[[Category:Contributions]]

Revision as of 22:14, 5 April 2024

An example video showing one channel of the CCEP filter.

Introduction

Cortico-cortical evoked potentials (CCEPs) are generated as a response to stimulation within the cortical zone. To best view this response, the CCEP filter time locks the signal to the stimulation and allows the user to view the CCEPS from every recording electrode. There are many adaptable parameters to include flexibility for a variety of experiments.

Location

http://www.bci2000.org/svn/trunk/src/contrib/SignalProcessing/CCEPFilter

Versioning

Authors

  • Will Engelhardt (engelhardt@neurotechcenter.org)

Version History

  • 05/17/2023 - First working version

Source Code Revisions

  • Initial development: 7199
  • Tested under: 7303
  • Known to compile under: 7364
  • Broken since: --

Installation

See the Installation section on the Python Visualization page to see how to install the necessary packages and how to run demo files! Once that is all set up, you can return to this page to understand the specific parameters for the CCEPs.

Parameters

General Configuration

ChannelThreshold

Magnitude threshold which defines a CCEP. Specify the units, such as uV or mV. The surpassing of this threshold is calculated with the CCEPEpochLength data (after the specified TriggerLatencyLength) after being subtracted from the average baseline value (the data during the BaselineEpochLength). If the threshold is surpassed, the channel is yellow. A horizontal bar is also displayed to show where the signal surpasses the threshold. If both the high and low thresholds are surpassed, both bars are displayed. If the signal stays below the threshold, it stays white.

OnsetExpression

Expression that defines the stimulus onset. See the Expression syntax page for more information. This expression should be true when the stimulation is triggered.

Stimulator

An optional setting that configures parameters for a certain device. Currently, only the NeuroOmega is implemented. This setting helps fills in other settings that are "auto" (such as TriggerLatencyLength), and configures the visualization to show which channels are stimulating in light blue. Keep it as auto if the device is not listed.

Duration settings

These parameters all should have units of time (e.g. milliseconds), or auto.

BaselineEpochLength

The duration of desired baseline data. This baseline data is helpful for visualizing the data before the stimulation, and is also used to calculate the average signal value from which the threshold is calculated.

TriggerLatencyLength

Approximate latency of the hardware stimulation from the OnsetExpression. The timing should surpass the stimulation artifact of the signal, so the CCEP is accurately calculated. If the length is too small, then the scaling of the visualization will be off, and the calculation of detecting CCEPs will also be inaccurate.

CCEPEpochLength

Duration of time after the baseline and latency. Essentially the amount of time that is needed to view the CCEP.

Counting settings

These parameters must be integers, they specify a quantity to count.

EpochsToAverage

Number of times the OnsetExpression is met to average together. The resulting average will then be displayed once the number is met. This is helpful if the OnsetExpression is frequently true within a short period of time.

OnsetPeriod

Count every number of times the OnsetExpression is evaluated true. In other words, skip every OnsetPeriod - 1. This is helpful if you want to visualize a time range in which the OnsetExpression is met multiple times. If you are also averaging the plots, it will only average the signals specified by this period.

See also

User Reference:Filters, Contributions:SignalProcessing, Python Visualizations, Contributions:PAC