User Tutorial:Performing a Time-Domain Offline Analysis of ECoG Data
In this section of the tutorial, we perform a time-domain offline analysis of a dataset recorded using an ECoG. As in the case of EEG data, we expect the basic properties of the P300 evoked potential to be the same for all individuals while the response's latency, width, and spatial pattern may vary. As in User Tutorial:Performing a Time-Domain Offline Analysis of EEG Data, we will use BCI2000 Offline Analysis to help determine the P300 parameters for a given subject.
This tutorial will make use of the ecog2_1.dat session that is included as part of the supplementary sample files downloadable here. Please download this file and extract the contents to data/samplefiles/.
In the ecog2 session the subject was placed in front of a monitor displaying a P300 speller matrix. A test sequence, consisting of a string of letters with a single letter highlighted, was also displayed. In each run of the experiment, the subject was asked to focus on the symbol in the speller matrix that was currently highlighted in the test sequence. This way, it was possible to label evoked responses according to whether they occurred for the highlighted symbol or for some other symbol in the matrix. Such labels can be attached to BCI2000 data using state variables. In the case of the ecog2 data, we used the state variable StimulusType such that StimulusType is equal to 1 when the letter that flashes is the letter that the subject is focused on (i.e., the letter that is currently highlighted). When the symbol that flashes is not the symbol of focus, StimulusType will not be equal to 1. If you are relatively new to BCI2000, you may find it helpful to inspect the data files we'll be using with the BCI2000 Viewer. Using this tool, you will be able to see how state variables change with respect to the data over time. For instruction on how to inspect data using the BCI2000 Viewer, please see User Reference:BCI2000Viewer.
In User Tutorial:Performing an Offline Analysis of EEG Data we manually entered all the analysis parameters. In this tutorial we will make use of the BCI2000 Offline Analysis "Load Settings" feature that allows us to load previously saved settings. In order to load the settings for this tutorial, please do the following:
- Open BCI2000 Offline Analysis. If this is your first time using BCI2000 Offline Analysis, you may want to review the instructions on how to install and run this application: User Reference:BCI2000 Offline Analysis.
- Click the "Add" button next to "Data Files" and navigate to data/samplefiles/. From there, select the file ecog2_1.dat and click "Open". If this file isn't present, please download the supplementary sample files and extract them to data/samplefiles/.
- Click File>Load Settings
- Navigate to data/samplefiles/
- Double-click or otherwise open ecog2Analysis.bws
At this point BCI2000 Offline Analysis should look like this:
Typically in a P300 analysis, we would not use a CAR filter because it would remove too much of the signal. In this case, as we will find later, the response is primarily on a single channel and performing a CAR filter will provide significant noise reduction without sacrificing the signal quality. Now, click "Generate Plots". Once your analysis is complete, you should see feature, waveform and topography plots similar to those below:
In designing this analysis, we followed a similar procedure to the procedure outlined in User Tutorial:Performing a Time-Domain Offline Analysis of EEG Data. We begin by looking for clusters of high r-squared values. Again, these clusters are typically the first indication that the time/channel pairs that comprise the cluster may be good features for on-line analysis. In the generated feature plot, we see that one of the clusters with the highest r-squared values is centered around (260 ms, Channel 1). So, we continue by creating a topography at 260 ms and a waveform for channel 1.