Tutorial 3: Importing MEG recordings

We are now going to import the recordings you downloaded in the previous tutorial (bst_sample_ctf): the averaged reponses to electric stimulation of the thumbs on both hands, 400 trials for each hand. Stimulus occurs at time 0.

Import recordings

  1. Select the TutorialCTF protocol, and go to the Functional data (sorted by subject) view of the database.

    dbFunctionalData.gif

  2. Right-click on Subject01, select Import MEG/EEG...

    File format: "MEG/EEG: CTF .ds (*.meg4;*.res4)"
    File: bst_sample_ctf/data/somMDYO-18av.ds (select the the full directory and click on Open)

    panelImportCtf.gif

    • Two blocks of data are available in this file. The names are not really meaningful, so you have to know what was saved in the file. In this specific case, the first "epoch" is the average, the second is the standard deviation for the same trials. Keep both "epochs" selected.
    • Check the "Remove DC offset" option, together with "Time range", between -49.6 and 0. For each sensor, this will compute the average value across the time (on the for the pre-trigger period, ie. where times < 0), and substract this mean to all the time values.
      => In MEG, this operation is always needed, unless it was already applied during one of the pre-processing steps.

    • Click on Import.
  3. A condition was created, called after the filename. It contains three items:

    panelRenameCond.gif

    • The first is the channel file: description of the positions, names, types, and various properties of the sensors that recorded the data. The value (182) means that there are 182 channels of data in the data files. They are not necessarily MEG channels, it may also includes EEG, EOG, stimulation lines, references, etc.

    • The last two represent the recordings associated with the stimulation of the Right thumb (average and standard deviation).
    • Having the channels defined in the same file as the recordings is specific to MEG. Those systems always store all the available information at the same time. When dealing with EEG, you have to import separately the positions of the electrodes. This will be developped in another tutorial.
    • Rename the condition into Right (F2, or successive left clicks, or right-click>Rename)

Display channel file

Let's explore what you can do with the first file. Right-click on the CTF channels file and try all the menus.

The two menus in the Display menu display the same thing, but in a different way. You can add the scalp surface easily with the toolbar in the Surfaces tab, in the main window (Add a surface button).

channelCtf.gif channelMeg.gif

Display a table with all the information about the individual channels. You can use this window to view and edit the channels properties.

channelEdit.gif

The channel file describes each channel separately, with the following information:

Some other fields are present in the channel file that cannot be accessed with the Channel editor window. You can explore those other fields with the File menu, selecting View file contents or Export to Matlab. As we saw in previous tutorial.

channelViewMat.gif

Some fields you may find there:

For the moment, the registration between anatomy and sensors is based only on three points that are manually positioned (nasion and ears). This rough alignment technique is quite robust but also very unprecise, and depends on the precision with which the people defined the fiducials, both during the data acquisition and on the MRI slices.For this reason, it is sometimes necessary to correct the position of the sensors. Two options:

Automatic Registration

Menu MRI Registration > Auto registration (using head points).
If some digitized head points are available, this menu launches an iterative algorithm that uses those points to try to get a better MRI/sensors registration. Here, there are no such points that were acquired, and you will get an error message if you select this menu.

Manual registration

From a scientific point of view it is not a really rigorous operation, but sometimes it is much better than using wrong default positions.

There are two menus: one to check the alignment head surface/sensors, and one to fix it. The Manual MEG-MRI registration menu works exactly the same way as the surface alignment tools introduced in previous tutorial (select buttons in the toolbar and right-click+move in the windows).

channelAlignCheck.gif channelAlign.gif

Nothing to change here, but remember to always check the registration scalp/sensors just after you import MEG or EEG recordings.

Display recordings

To understand what is stored in the two recording files: double-click on the first, then double-click on the second.

recordingsErp.gif recordingsStd.gif

Now have a look to what is inside a recording file: right-click on Right/ERP > File > View file contents.

dataFileMat.gif

All the recordings display tools will be introduced in the next tutorial.

Managing conditions

You have already imported the average response for the stimulation of the right thumb. Let's also import the left thumb, but proceeding in a slightly different way.

  1. Create a new condition for your Subject01, called Left. To do that: right-click on Subject01 > Add condition...

  2. Import the second file (somMGYO-18av.ds) in the Left condition. Rename the recordings in ERP and Std.

  3. Switch to the Functional data (sorted by condition), by click on the third button in main Brainstorm toolbar.

    dbSortByCond.gif

  4. This view is not very useful when you have one subject and two conditions. But remember this option for later, it will be very useful when you will have 60 subjects and 12 conditions per subject in your database.

Next

Everything is now loaded in TutorialCTF protocol : subject anatomy (MRI and surfaces), recordings and channels description.

The next tutorial will present all the tools available to ?explore the recordings.

Tutorials/TutImportRecordings (last edited 2011-05-11 00:41:48 by hirkania)