Jump to content

User Tutorial:Performing an Offline Analysis of ECoG Data

From BCI2000 Wiki

In this section of the tutorial, we perform a similar offline analysis of a dataset recorded using an ECoG. As in the case of EEG data, we expect the basic properties of the Mu rhythm to be identical for all humans, while the rhythm's spatial pattern and exact frequency range will differ. BCI2000 Offline Analysis helps to determine the frequencies and locations that correlate best with a given instruction.

Experimental Design

This tutorial will make use of the ecog1_1.dat, ecog1_2.dat and ecog1_3.dat sessions that are included with BCI2000 and can be found in data/samplefiles/. In these sessions, the subject was asked to move each hand in a predefined pattern. The resulting data was recorded using BCI2000 and labeled using the StimulusCode state variable such that TargetCode is equal to 1 when the subject is responding to the instruction to move his/her left hand, 2 when the subject is responding to the instruction to move his/her right hand and 0 when the subject is responding to the instruction to rest. 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.

The Results

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 a useful feature of BCI2000 Offline Analysis - loading previously saved settings. In order to load the settings for this tutorial, please do the following:

  1. Click File>Load Settings
  2. Navigate to data/samplefiles/
  3. Double-click or otherwise open ecog1Analysis.bws

At this point BCI2000 Offline Analysis should look like this:

Now, click "Generate Plots". Once your analysis is complete, you should see feature, spectra and topography plots similar to the plots below:

In designing this analysis, we followed a similar procedure to the procedure outlined in User Tutorial:Performing an Offline Analysis of EEG Data. First, we can see distinct clusters of high r-squared values in the feature plot. Again, these clusters are typically the first indication that the frequency/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 (25 Hz, Channel 14). So, we continue by creating a topography at 25 Hz and a spectra for channel 14. In the previous tutorial, we used these plots to evaluate the physiological plausibility of this response. We first note that there are significant changes in the spectra between movement and rest. Also, the most significant of these changes occur around the beta frequency range. When inspecting the topographies resulting from the EEG-based analysis, we were able to relate the spatial response to areas of the motor cortex known to control the muscle being moved. We can do this in ECoG as well. In this case, however, the location of an electrode will differ based on where the grid was placed. We must also be aware that an ECoG grid is subject to shifts in position over time. Because the above response is related to movement of the right hand, we expect the response to appear over the motor cortex of the left-hemisphere. There are, however, many reasons why this may not be the case. One simple reason is that the subject may not be performing the requested instruction. Regardless, it is reasonable to conclude from our analysis that (25 Hz, Channel 14) may be an effective feature for use in an on-line recognition task.