Jump to content

User Tutorial:Performing an Offline Analysis of MEG Data

From BCI2000 Wiki
Revision as of 02:49, 19 January 2008 by Jfialkoff (talk | contribs)

In this section of the tutorial, we perform a similar offline analysis of a dataset recorded using an MEG. 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 meg1_1.dat session that is included with BCI2000 and can be found in data/samplefiles/. In this session, the subject was asked to perform the right justified box (LJB) task - a 1-D task available through BCI2000. For this task, the subject must move a cursor up or down in order to hit a target on the right side of the screen. The cursor begins on the left side of the screen and travels toward the target at a constant speed determined by the operator. In this particular experiment, the subject was asked to open and close his/her left hand to move the cursor up and right hand in order to move the cursor down. The task was controlled using BCI2000 and the data was recorded and labeled using the TargetCode state variable. For trials where the subject was attempting to move the cursor up (i.e., left-hand movement) TargetCode is equal to 1. For trials where the subject is attempting to move the cursor down (i.e., right-hand movement) TargetCode is equal to 2. For intervals between trials (i.e., when the subject is at rest), TargetCode is equal to 0. 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 meg1Analysis.bws

At this point BCI2000 Offline Analysis should look like this:

Now, click "Generate Plots". Once your analysis is complete, you should see 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 look for 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, one such cluster is centered around (13 Hz, Channel 4). So, we continue by creating a topography at 13 Hz and a spectra for channel 4. As in previous tutorials, we use these plots to evaluate the physiological plausibility of this response. First note that there are significant changes in the spectra between movement and rest. Also, the most significant of these changes occur around the mu and beta frequency ranges. From the topography, we see that the response is largely present over the motor cortex of the left hemisphere. Such a response should be expected since the movement occurred on the right side of the body. Therefore, we conclude that (13 Hz, Channel 4) will likely be an effective feature for on-line control tasks.

See also

User Tutorial:Obtaining Mu Rhythm Parameters in an Initial Session