User Tutorial:Performing an Offline Analysis of MEG Data
In this section of the tutorial, we will take you through the steps for performing a frequency-domain analysis of data recorded using an MEG. Regardless of the selected recording technique, 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. As in User Tutorial:Performing an Offline Analysis of EEG Data, we will use BCI2000 Offline Analysis to help determine the frequencies and locations that best facilitate response classification for online control.
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 datafiles 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 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:
- Click File>Load Settings
- Navigate to data/samplefiles/
- 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 those below:
In designing this analysis, we followed a similar procedure to the procedure outlined in User Tutorial:Performing an 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 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 occurs 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 online control tasks.
See also
User Tutorial:Obtaining Mu Rhythm Parameters in an Initial Session

