| Size: 10103 Comment:  | Size: 8556 Comment:  | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 1: | Line 1: | 
| = Review continuous files = ''Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet'' | = Tutorial 5: Review continuous files = ''Authors: Francois Tadel, Elizabeth Bock, ''''''John C Mosher, ''Sylvain Baillet'' | 
| Line 6: | Line 6: | 
| == Access the raw file == 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 process. Brainstorm offers 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 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 continuous recordings in epochs/trials). Then the imported epochs/trials (hard copies in .mat format) can be pre-processed and averaged. * Select the exploration mode: "Functional data (sorted by subject)"<<BR>><<BR>> {{attachment:view_functional.gif}} * Right-click on the subject node, and select: "Review raw file". Select the "MEG: CTF" file type, and pick the ds folder in "/sample_raw/Data". . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawViewer?action=AttachFile&do=get&target=menuReview.gif|menuReview.gif|class="attachment"}} * Then you're asked if you want to "Refine the registration with the head points". This operation improves the initial MRI/MEG registration by fitting the head points digitized before the MEG acquisition on the scalp surface with an ICP algorithm. Answer yes. Even if the result is not perfect, it usually improves the positioning of the head in the MEG helmet. The grey surface represents the head extracted from the MRI, the yellow surface represents the inside of the MEG helmet, and the green dots are the head shape points digitized with the Polhemus device; the goal is to align the green points on the grey surface. . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawViewer?action=AttachFile&do=get&target=refine.gif|refine.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawViewer?action=AttachFile&do=get&target=refineBefore.gif|refineBefore.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawViewer?action=AttachFile&do=get&target=refineAfter.gif|refineAfter.gif|class="attachment"}} * Two new files appeared in the database explorer: . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawViewer?action=AttachFile&do=get&target=linkInTree.gif|linkInTree.gif|class="attachment"}} * The channel file contains the definition of the sensors, exactly as when importing the files in the database with the "Import MEG/EEG" menu. It is saved in the folder ''(Common files)'', because the subject was created using the option "Yes, use one channel file per subject". Therefore, the same channel file will be used for all the folders of Subject01. * The node named "Link to raw file" contains all the information that was read from the continuous 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. | |
| Line 24: | Line 7: | 
| Line 44: | Line 26: | 
| Now the traces are displayed in columns, but all the channels are displayed in the same figure, which makes it unreadable. Select a subset of channels by right-clicking on the figure > '''Montages''', with the drop-down menu in the Record tab or with a keyboard shortcut ('''Shift+A, B, C'''...). Default groups of sensors are available for some MEG systems, but you can also create your own groups of sensors with the menu "Edit montages". | Now the traces are displayed in columns, but all the channels are displayed in the same figure, which makes it unreadable. Select a subset of channels by right-clicking on the figure > '''Montages''', with the drop-down menu in the Record tab or with a keyboard shortcut ('''Shift+A, B, C'''...). Default groups of sensors are available for some MEG systems, but you can also create your own groups of sensors with the menu "Edit montages". The montage editor is described in the next tutorial. | 
| Line 76: | Line 58: | 
| == Shortcut summary == | |
| Line 77: | Line 60: | 
| === Keyboard shortcuts === * '''Left / right arrows''': * No other key: Change current time, sample by sample * With '''Control '''key: Jump to previous/next time segment (same as the "<<<" and ">>>" buttons) * With '''Shift '''key: Jump to next event of the selected group * On MacOS, these shortcuts are different: please read the tooltips from the buttons ">", ">>", and ">>>" in the time panel to get the appropriate shortcuts. * '''Page-up / page-down''': * Same as left/right arrows, but faster (10 samples at a time) * If epochs are defined in the file: '''Control + page-up/page-down''' jumps to the next/previous epoch. * '''F3/Shift+F3''': Jump to the next/previous epoch or page * '''F4/Shift+F4''': Jump to the next/previous half-page * '''Plus / minus''': Adjust the vertical scale of the time series * '''Control + E''': Add / delete event occurrence * '''Control + T''': Open a 2D topography window at the current time * '''Shift + Letter''': Changes the set of electrodes currently displayed in the figure (list available by right-clicking on the figure > Display setup > ...) * '''Enter''': Display the selected channels in a separate figure (selected channels = lines on which you clicked, that are shown in red) * '''Escape''': Unselect all the selected channels * '''Delete''': Mark the selected channels as bad | |
| Line 78: | Line 79: | 
| <<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/ChannelFile&next=Tutorials/EventMarkers")>> | === Mouse shortcuts === * '''Mouse click on a channel''': Select the channel * '''Mouse click''': Change current time * '''Mouse click + Shift''': For the selection of the current time (do not select any sensor, even when clicking on a line) * '''Mouse click + move''': Select time range * '''Mouse wheel''': Zoom around current time * '''Control + mouse wheel''': Zoom vertically * '''Shift + mouse wheel''': Adjust the vertical scale of the time series * '''Right-click''': Display popup menu * '''Right-click + move''': Move in a zoomed figure * '''Double click''': Restore initial zoom settings (but do not restore the vertical scale of the time series) <<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/ChannelFile&next=Tutorials/MontageEditor")>> | 
Tutorial 5: Review continuous files
Authors: Francois Tadel, Elizabeth Bock, John C Mosher, Sylvain Baillet  Contents   
 
 Right-click on the data file > MEG (all) > Display time series.  You can see new information in the tab "Record" and a figure showing the recordings.  
 As described  in the basic tutorials, you can set the current time by using either  the time panel (buttons and text field), or the figure (click on the  white or grey areas of the figure). But you can notice that only a few  seconds are visible in the figure, while the time panel (top left of the  previous figure), indicates that we have 360s of recordings. Only a  small block of the continuous file has been loaded in memory. This small  time window can be configured with the tab Record/Page settings, with the text boxes Start and Duration.  The  time series figure is similar to the ones that were presented in the  previous tutorials, with a few new elements. The navigation bar at the  bottom represents the time of the entire raw file, where the events are  also represented by dots. The '<<<' and '>>>'  buttons are the same as the ones in the time panel, and jump to the  previous/next segment in the file. Clicking on the bar or dragging the  red cursor change the current time window as well.  
 Let's switch  to a nicer representation of the recordings time series: click on the  "Display mode" button in the toolbar of the Record tab.  Now  the traces are displayed in columns, but all the channels are displayed  in the same figure, which makes it unreadable. Select a subset of  channels by right-clicking on the figure > Montages, with the drop-down menu in the Record tab or with a keyboard shortcut (Shift+A, B, C...).  Default groups of sensors are available for some MEG systems, but you  can also create your own groups of sensors with the menu "Edit  montages". The montage editor is described in the next tutorial.  
 In this display mode, the amplitude scale is represented on the right of the figure. You can adjust this vertical scale:  Use the buttons "^" and "v"  on the right side of the figure. The shortcuts for those buttons are  indicated in the tooltips (leave the mouse for a short while over a  button)  Hold the Shift key and move the mouse wheel, or use the keys "+" and "-".  Use the button "..." on the right side of the figure ("Set scale manually") to set the scale to a precise level.  When  scrolling in time to a different page, the amplitude scale is by  default kept. You can change this behavior to re-evaluate automatically  an optimal scale each time you change the current time window. This  option is called "Auto-scale amplitude" and is disabled by default. To  activate it: click on the "AS" button on the right of the figure, or check the menu "Display > Auto-scale amplitude" in the Record tab.  
 Remove DC offset:  Button [DC] in the Record tab. When selected, for each channel, the  average value over the  entire current time window is subtracted from  the channel values. This means that if you change the length of  the  time window, the value that is removed from each channel may change.  It  doesn't make much sense to disable this option for unprocessed MEG  recordings.  Apply CTF compensation:  Button [CTF] in the Record tab. Enable/disable the CTF noise correction   based on the reference sensors, when it is not already applied in the   file. In the current file, the CTF 3rd order gradient compensation is   already applied, therefore this option is not available.  Flip +/-: Button in the right part of the time series figure. Exchange the direction of the Y axis, useful mostly for clinical EEG.  Set scale manually: Button [...] in the figure. Forces a defined amplitude scaling.  Auto-scale amplitude:  Button [AS] in the figure. When  selected, the vertical scale is  adapted to the maximum value over the time window when the time window  changes. When  not selected: the vertical scales keeps its last value  when you jump to  another part of the file.  
 With  the  Filter tab, you can apply a band-pass  filter to the recordings, or  remove a set of specific frequencies  (example: the 50Hz or 60Hz power  lines contamination and their harmonics). The filters are applied only  to the time window that is currently loaded; hence if the segment is too  short for the required filters, the results could be inaccurate.  The option "Mirror signal before filtering"  triples artificially the length of the signal with a mirror symmetry on  each side, to avoid the strong edge effects that those filters can  generate. Those online filters are not very accurate, they just provide a  quick estimate for visualization only, the results are not saved  anywhere. To filter properly the continuous files, please use the  Process1 tab.  After  testing the high-pass, low-pass and notch filters, uncheck them. If not  you will probably forget about them, and they will stay on until you  restart Brainstorm.  
 
 Left / right arrows:  With Control key: Jump to previous/next time segment (same as the "<<<" and ">>>" buttons)  With Shift key: Jump to next event of the selected group  On  MacOS, these shortcuts are different: please read the tooltips from the  buttons ">", ">>", and ">>>" in the time panel to get  the appropriate shortcuts.  Page-up / page-down:  If epochs are defined in the file: Control + page-up/page-down jumps to the next/previous epoch.  F3/Shift+F3: Jump to the next/previous epoch or page  F4/Shift+F4: Jump to the next/previous half-page  Plus / minus: Adjust the vertical scale of the time series  Control + E: Add / delete event occurrence  Control + T: Open a 2D topography window at the current time  Shift + Letter:  Changes the set of electrodes currently displayed in the figure (list  available by right-clicking on the figure > Display setup > ...)  Enter: Display the selected channels in a separate figure (selected channels = lines on which you clicked, that are shown in red)  Escape: Unselect all the selected channels  Delete: Mark the selected channels as bad  
 Mouse click on a channel: Select the channel  Mouse click: Change current time  Mouse click + Shift: For the selection of the current time (do not select any sensor, even when clicking on a line)  Mouse click + move: Select time range  Mouse wheel: Zoom around current time  Control + mouse wheel: Zoom vertically  Shift + mouse wheel: Adjust the vertical scale of the time series  Right-click: Display popup menu  Right-click + move: Move in a zoomed figure  Double click: Restore initial zoom settings (but do not restore the vertical scale of the time series)  
Review the recordings
Open the file
 
  
 Navigate in time
Sensor selection
 
  
 Amplitude scale
Display options
 
 Online filter
 
 Shortcut summary
Keyboard shortcuts
Mouse shortcuts
 
 
