Size: 7019
Comment:
|
← Revision 128 as of 2022-08-22 14:15:40 ⇥
Size: 0
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= 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 == * It is considered that you followed all the basic tutorials and that you already have a fully working copy of Brainstorm installed on your computer. * Go to the [[http://neuroimage.usc.edu/brainstorm3_register/download.php|Download]] page of this website, and dowload the file "bst_sample_mind_neuromag.zip". * Unzip it in a folder that is not in any of the Brainstorm folders (program folder or database folder). This is really important that you always keep your original data files in a separate folder: the program folder can be deleted when updating the software, and the contents of the database folder is supposed to be manipulated only by the program itself. * Start Brainstorm (Matlab scripts or stand-alone version) * Select the menu File > Create new protocol. Name it "!TutorialRawViewer", set "MNI Colin27" as the default anatomy, and select the options: "Yes, use protocol's default anatomy", "No, use one channel file per condition". * Just close the MRI Viewer window and the dialog box that asks to define the fiducials, there is no need for fine registration in this tutorial. == Access to the raw file == * Select the "Anatomy" exploration mode (first button in the toolbar above the database explorer). * Right-click on the protocol node and select "New subject". Leave the default name and options and click on Save. * Right-click on the subject node, and select: "Review raw file". Select the "Neuromag FIFF" file type, and open the only .fif file in the folder sample_mind_neuromag/data.<<BR>><<BR>> {{attachment:menuReview.gif}} * A dialog window appears asking where to get the time markers (=events) from. Select "Event channel", and then "STI 001", to create a list of events based on the inputs that were recorded on the channel "STI 001".<<BR>><<BR>> {{attachment:fifEventsDialog1.gif}} {{attachment:fifEventsDialog2.gif}} * Answer "No" to the question "Save the events extract from this channel?". Or you can say "yes" if you prefer, it doesn't really matter.<<BR>><<BR>> {{attachment:fifEventsDialog3.gif}} * A new folder with two files appears in the database explorer:<<BR>><<BR>> {{attachment:linkInTree.gif}} * The channel file contains the definition of the sensors, exactly as when importing the files in the database with the "Import MEG/EEG" menu. * The node named "Link to raw file" contains all the information that was read from the continous file (file format, time vector, sampling frequency, events, bad channels, path to the original file, etc.), but no recordings. The MEG and EEG values recorded will be read directly from the native file, using the function in_fread. == Review the recordings == === Open the file === Right-click on the data file > MEG (all) > Display time series. {{attachment:displayTsMenu.gif}} You can see a new tab "Event" and a time series figure. {{attachment:rawPanel.gif}} * Only a small block of the continuous recordings has been loaded in memory. This small time window can be modified with the tab "Event": the slider "Start" represents the beginning of the time window, and the text box "Samples" its length in number of time samples. The usual Brainstorm time controls (right-left corner of the main window) can be used to move the current time within that reduced time window. * The panel "Recordings" in the Event tab lists the events that were detected on the "STI 001" input channel: * on the left, the groups of events (only one group here, Event #5, representing the electric stimulation of the right arm); * on the right, all the occurrences of the selected event group, described by the time instant at which they occur (here, the arm was stimulated 323 times). * The time series figure is similar to the ones that were presented in the previous tutorials, with two new elements: * the events occurring in the current time window are shown at the top of the figure: if you click on a marker, it gets selected in the Event tab as well; * the navigation bar at the bottom represents the time of the entire raw file, where the events are also represented by smaller dots: The '<<' and '>>' buttons jump to the pervious/next segments, clicking on the bar change the current time window. === 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. {{attachment: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...) {{attachment:tsChannelSelection.gif}} === 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: {{attachment: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 an occurrence with one of the three methods: * In the Event tab: select the menu Events > Add event * In the time series figure: right-click > Add event * In the time series figure: press Control + A === Keyboard and mouse shortcuts === Online filter Topography |