Raw recordings viewer

This tutorial describes how to review a continuous file and edit the markers before importing it in the Brainstorm database. It is based on median nerve stimulation acquired at MGH in 2005 with a Neuromag Vectorview 306 system. The sample dataset contains the results for one subject for both arms.

The basic tutorials you read before explain how to import recordings in the database: this operation creates a copy of all the data in Matlab .mat files in the Brainstorm database folders. You could process continuous recordings in the same way, but the .mat format has this limitation that the entire file has to be read even when you want to access just a portion of it. Long recordings usually cannot fit in memory and have to be split in small blocks of a few seconds, which makes it very difficult to review and to process.

Brainstorm offer the possibility to visualize continuous MEG/EEG recordings in any of the supported file formats without having to fully "import" them. A link to the native file is created in the database, which can be then manipulated almost like the "imported" recording blocks. Only the description of the file is saved in the database, and when displaying it the recording values are read directly from the native file.

In addition, an interface allows to edit the time markers that are saved in the file. Those markers can then be used to import the recordings in the database (ie. to do the segmentation of the continous recordings in epochs/trials). Only the imported epochs/trials (hard copies in .mat format) can be pre-processed and averaged.

Download and installation

Access to the raw file

Review the recordings

Open the file

Right-click on the data file > MEG (all) > Display time series.

displayTsMenu.gif

You can see a new tab "Event" and a time series figure.

rawPanel.gif

Channel setup

Let's switch to a nicer representation of the recordings time series: click on the "Display mode" button in the toolbar of the main Brainstorm window.

tsColumn.gif

All the channels are displayed in the same figure, which makes it unreadable. Select a subset of channels by right-clicking on the figure > Display setup, or by using one of the keyboard shortcuts (Shift+A, B, C...).

tsChannelSelection.gif

You can then adjust the vertical scale of the time series by holding the Shift key and moving the mouse wheel. The amplitude scale is represented on the right of the figure.

Adding/removing events

First create a group of events, define its name (test) and its color (red), with the "Events" menu in the Event tab:

addGroup.gif addGroup_done.gif

Then set the current time were you want to add a new Test even, by clicking on the figure (current time = where the vertical red line is). Select the group event "Test" and add a few occurrences with any of the three methods:

addEvent_done.gif

Now remove all the events occurrences, but not the group "Test":

You can also use this interface to create events that have a temporal extension, ie. they last for more than one time sample. This is usually used to define bad/artifacted segments in the data.

extEventSel.gif extEvent.gif

Keyboard shortcuts

Select the event group "Event #5", then click on the time series figure and test all those shortcuts.

Mouse shortcuts

Saving modifications

When you close the raw file viewer, or the last figure that shows a part of the raw file, the dataset is unloaded, the file is released and the memory is freed.

If you edited the events for this file, you would be asked whether to save the modifications or not. If you answer "Yes", the modifications to the events are only saved in the Brainstorm definition of the file, not in the raw file itself. So you would see your changes the next time you open the file with Brainstorm, but not if you open the raw file again with an external program.

saveModif.gif

Display options

When a block of recordings is loaded in memory, a few basic operations can be applied on it on the fly.

Event tab / Display menu

displayOptions.gif

Online filter

With the Filter tab in the main Brainstorm window, you can apply a band-pass filter to the recordings. Set the filter bounds and click on the Apply.

onlineFilter.gif

EEG Average reference

When reviewing EEG recordings, you can switch between the original values and the average reference by clicking on the "AVG REF" button in the toolbar of the main Brainstorm window.

Average reference computation: at each time point, the average of all the electrodes values is removed to each electrode.

avgRef.gif

Other views

Topography views

Exactly as introduced in the ?tutorial #4 "Exploring the recordings", you can display a variety of 2D/3D mappings of those recordings. Right-click on the node "Link to raw file" > MEG (all) > ...

topo.gif

Cortical sources

As presented in tutorial #5 to #7, you can compute successively for this raw file: a head model, a noise covariance matrix, and an inverse model.

At the end you can see three new files in the database. Right-click on the sources and try the different visualization menus.

Important: Remember that you probably still have the online filter on; the band-pass options you specify in the Filter panel are kept until you close Brainstorm.

sourcesTree.gif sourcesView.gif

Import in database

The raw file viewer provides a rapid access to the recordings and can be a very a very useful tool. But most of operations cannot be performed directly on the raw files: all the pre-processing functions, averaging, time-frequency analysis and statistical tests can only be applied on blocks of data that are saved in the database (ie. "imported").

After reviewing the recordings and editing the event markers, you have to "import" the recordings in the database to go with further analysis. The two following operations produce the same result:

You could also right-click on the subject node > Import EEG/MEG, and select the tutorial FIF file, exactly as presented in the the previous tutorials. But this operation would not give you access to your modified events list, it would use only the events that were already defined in the raw file.

For details about the "Import file" window and the associated processes, please refer to the next tutorial ?Import and process raw Neuromag recordings.

Tutorials/TutRawViewer (last edited 2010-09-09 20:09:56 by hirkania)