14651
Comment:
|
19022
|
Deletions are marked like this. | Additions are marked like this. |
Line 63: | Line 63: |
* The two sets of fiducials we usually have to define interactively are here set automatically. | * The two sets of fiducials we usually have to define interactively are here automatically set. |
Line 65: | Line 65: |
* '''AC/PC/IH''': Identified automatically using the SPM affine registration with an MNI template. | * '''AC/PC/IH''': Automatically identified using the SPM affine registration with an MNI template. |
Line 70: | Line 70: |
* All the anatomical atlases [[Tutorials/LabelFreeSurfer|generated by FreeSurfer]] were imported automatically: the surface-based cortical atlases and the atlas of sub-cortical regions (ASEG). <<BR>><<BR>> {{attachment:anatomy_atlas.gif||height="211",width="550"}} | * All the anatomical atlases [[Tutorials/LabelFreeSurfer|generated by FreeSurfer]] were automatically imported: the surface-based cortical atlases and the atlas of sub-cortical regions (ASEG). <<BR>><<BR>> {{attachment:anatomy_atlas.gif||height="211",width="550"}} |
Line 73: | Line 73: |
=== Link the recordings === | |
Line 80: | Line 81: |
== Channel classification == | === Channel classification === |
Line 88: | Line 89: |
== MRI registration == | === MRI registration === |
Line 95: | Line 96: |
== Spectral evaluation == | === Import triggers === * Right-click on the "Link to raw file" > '''MEG (all) > Display time series'''. <<BR>><<BR>> {{attachment:events_add.gif||height="183",width="537"}} * In the Record tab, menu '''File > Add events from file''': * Select the file format: "'''FieldTrip trial definition (*.txt''';'''*.mat)'''" * Select the '''first''' text file: '''Sub01/MEEG/Trials/run_01_trldef.txt''' * There are two event categories created for each condition: the first one (eg. "Famous") represents when the stimulus was sent to the subject, the second (eg. "Famous_trial") is an extended event that represents the trial information that was present in the file. <<BR>><<BR>> {{attachment:events_file.gif||height="170",width="596"}} * We are going to use only the single events (triggers): '''Delete the 3 last categories''' ("_trial"). <<BR>><<BR>> {{attachment:events_select.gif}} * Close all the figures. YES, save the modifications. == Pre-processing == === Spectral evaluation === |
Line 107: | Line 118: |
== Remove line noise == | === Remove line noise === |
Line 113: | Line 124: |
== EEG reference and bad channels == | === EEG reference and bad channels === |
Line 116: | Line 127: |
* Repeat with '''EEG007''' and '''EEG015''', select them and mark them as bad. | |
Line 120: | Line 130: |
== Artifact detection == | == Artifact correction with SSP == === Artifact detection === |
Line 124: | Line 135: |
* '''Artifacts > Detect eye blinks''': Channel name='''EEG062''', All file, Event name=blink<<BR>>The first category of events detected from the EOG is related with the blinks. The second one (blink2) is related with different types of eye movements, probably saccades. * '''Artifacts >''' '''Remove simultaneous''': Remove "'''cardiac'''", too close to "'''blink'''", delay '''250ms'''. <<BR>><<BR>> {{attachment:artifacts_detect.gif||height="153",width="475"}} |
* In many of the other tutorials, you will have detected the blink category and used the SSP process to remove the blink artifact. In this experiment, we are particularly interested in the subject's response to seeing the stimulus. Therefore we will mark eyeblinks and other eye movements as BAD. * '''Artifacts > Detect events above threshold''': Channel name='''EEG062''', All file, Event name='''blink_BAD''', Maximum threshold='''100''', Threshold units='''uV''', Filter='''[0.30,20.00]Hz''', Use '''absolute value is checked'''<<BR>> <<BR>> {{attachment:artifact_detect_blink_thresh.png||height="325",width="200"}} <<BR>><<BR>> {{attachment:artifacts_blink_bad.png||height="186",width="545"}} |
Line 128: | Line 141: |
== Artifact correction with SSP == | |
Line 137: | Line 149: |
* In category '''cardiac/MEG MAG''': Select '''component #1'''. * In category '''cardiac/MEG GRAD''': Select '''component #1'''.<<BR>><<BR>> {{attachment:ssp_ecg_topo.gif||height="175",width="604"}} |
* In category '''cardiac/MEG MAG''': Select '''component #1''' and view topography. * In category '''cardiac/MEG GRAD''': Select '''component #1 '''and view topography. <<BR>><<BR>> {{attachment:ssp_ecg_topo.gif||height="175",width="604"}} |
Line 141: | Line 154: |
=== Eye blinks === * Process1>Run: Select the following processes and run the pipeline: * Artifacts > '''SSP: Eye blinks''' > Sensor type: '''MEG MAG''' * Artifacts > '''SSP: Eye blinks''' > Sensor type: '''MEG GRAD''' * Artifacts > '''SSP: Eye blinks''' > Sensor type: '''EEG''' <<BR>><<BR>> {{attachment:ssp_eog_process.gif||height="251",width="298"}} * Double-click on the continuous file to show all the MEG sensors. <<BR>>In the Record tab, select sensors "Left-frontal". * Menu Artifacts > Select active projectors. * In category '''cardiac/MEG MAG''': Select '''component #1'''. * In category '''cardiac/MEG GRAD''': Select '''component #1'''. * In category '''cardiac/EEG''': Select '''component #1'''.<<BR>><<BR>> {{attachment:ssp_eog_topo.gif||height="303",width="519"}} * Make sure that selecting the components removes the ocular artifacts. Then click '''[Save]'''. |
=== Additional bad segments === * Process1>Run: Select the process "'''Events > Detect other artifacts'''". This should be done separately for MEG and EEG to avoid confusion about which sensors are involved in the artifact. <<BR>><<BR>> {{attachment:artifacts_detect_other.png||height="235",width="276"}} * Display the MEG sensors. Review the segments that were tagged as artifact, determine if each event represents an artifact and then mark the time of the artifact as BAD. This can be done by selecting the time window around the artifact, Right-click > '''Reject time segment'''. Note that this detection process marks 1-second segments but the artifact can be shorter.<<BR>><<BR>> {{attachment:artifacts_mark_bad.png||height="200",width="640"}} |
Line 153: | Line 158: |
== Additional bad segments == * Process1>Run: Select the process "'''Events > Detect other artifacts'''". <<BR>><<BR>>{{attachment:artifacts_other_process.gif}} * Display the MEG and EEG sensors simultaneously, review the segments that were tagged as bad. * In the Record tab, rename the two new categories to add the tag "_BAD". <<BR>><<BR>>{{attachment:artifacts_other_result.gif}} |
* Once all the events in the two categories are reviewed and bad segments are marked, the two categories (1-7Hz and 40-240Hz) can be deleted. * Do this detection and review again for the EEG. * __'''SQUID SENSOR ARTIFACTS'''__''' (SQUID JUMPS): '''Because of the different sensor technologies, one can expect that the different MEG systems may produce different types of artifact. With the Neuromag system, used for this experiment, one can see an artifact produced by the sensors which is exaggerated by the pre-processing completed with Max Filter, seen here in the examples below. The spacial filtering of Max Filter causes the artifact to be speard across most sensors and also spread a bit in time. Ideally, the offending should be marked bad before applying the Max Filter. In the case of this dataset, we have the artifacts - sometimes more frequent than others. The 1-7Hz artifact detection employed here will usually catch them, but it is important to review all the sensors and all the time in each recording to be sure these events are marked as bad segments.<<BR>><<BR>> {{attachment:artifact_jump_example.png||height="200",width="640"}} <<BR>> {{attachment:artifacts_jump_example2.png||height="200",width="640"}} |
Line 158: | Line 162: |
== Import triggers == * Right-click on the "Link to raw file" > '''MEG (all) > Display time series'''. <<BR>><<BR>> {{attachment:events_add.gif||height="183",width="537"}} * In the Record tab, menu '''File > Add events from file''': * Select the file format: "'''FieldTrip trial definition (*.txt''';'''*.mat)'''" * Select the '''first''' text file: '''Sub01/MEEG/Trials/run_01_trldef.txt''' <<BR>><<BR>> {{attachment:events_file.gif||height="170",width="596"}} * There are two event categories created for each condition: the first one (eg. "Famous") represents when the stimulus was sent to the subject, the second (eg. "Famous_trial") is an extended event that represents the trial information that was present in the file. |
== Prepare all runs == Complete the above steps for Runs 2-6: <<BR>> [[#Access_the_recordings|Access the recordings]]<<BR>> [[#Pre-processing|Pre-processing]]<<BR>> [[#Artifact_detection|Artifact detection]] |
Line 166: | Line 166: |
* Drag and drop the 6 pre-processed raw folders in Process1 > Run * Run the two processes together: '''Import recordings > Import MEG/EEG: Events''' and '''Pre-process > Remove DC offset'''<<BR>><<BR>> {{attachment:import_process1box_allruns.png||height="120",width="180"}} {{attachment:import_events.png||height="325",width="225"}} {{attachment:import_events_removedc.png||height="170",width="225"}} * Drag and drop all the imported trials in Process1. Since we want to be sure we have an equal number of trials in the average for each condition, we will select a uniform number of trials and then average across runs. '''File > Select uniform number of trials:''' '''By trial group (subject)''', Uniformly distributed. Then add the process '''Average > Average files''': '''By trial groups (subject average)''' <<BR>><<BR>>{{attachment:average_process1_alltrials.png||height="400",width="240"}} {{attachment:average_select_uniform_ntrials.png||height="320",width="225"}} {{attachment:average_trials_group_subject.png||height="400",width="225"}} * The average files will be in the ''Intra-subject'' folder. '''NOTE: The average of the trials across runs is not the best way to analyze your MEG responses. This average is valuable only for EEG.''' * Apply a low-pass filter to the sensor data to remove the higher frequencies from the display. Then extract the time [-100,800]ms, therefore eliminating 200ms on each edge (to avoid edge effects from the filtering). Drop the average files in Process1 and Run '''Pre-process > Band-pass filter: Lower cutoff=0, Upper cutoff=32, then add the process extract > Extract time, [-100,800]Hz '''<<BR>><<BR>> {{attachment:average_lp_filter.png||height="245",width="225"}} {{attachment:average_extract_time.png||height="245",width="225"}} * EEG evoked response (famous, scrambled, unfamiliar): <<BR>><<BR>> {{attachment:average_EEG_ERP_topo.png||height="453",width="640"}} * Make a cluster with channel EEG065 and overlay the channel across the three conditions. * Display the '''EEG time series''' for one of the averages. * Select '''EEG065''' * In the '''Cluster tab''', select the new selection button '''(NEW SEL)''' and check the box, '''overlay conditions'''<<BR>><<BR>> {{attachment:average_EEG_select_cluster.png||height="200",width="402"}} * Select the cluster then select three average files and '''right click > Clusters time series'''<<BR>><<BR>>{{attachment:average_select_cluster_conditions.png||height="320",width="350"}}{{attachment:average_EEG65_overlay_conditions.png||height="320",width="300"}} == Empty room recordings == * Link the empty room recordings * Apply the same notch filter * Compute the noise covariance * Copy the noise covariance to the other conditions |
|
Line 167: | Line 186: |
* Head model: OpenMEEG BEM (EEG) and Overlapping spheres (MEG) * Inverse model: ? == Scripting == Corresponding script in the Brainstorm distribution:<<BR>> '''brainstorm3/toolbox/script/tutorial_visual_single.m''' |
MEG visual tutorial: Single subject
Authors: Francois Tadel, Elizabeth Bock.
The aim of this tutorial is to reproduce in the Brainstorm environment the analysis described in the SPM tutorial "Multimodal, Multisubject data fusion". The data processed here consists in simulateneous MEG/EEG recordings of 16 subjects performing simple visual task on a large number of famous, unfamiliar and scrambled faces.
The analysis is split in two tutorial pages: the present tutorial describes the detailed analysis of one single subject and another one that the describes the batch processing and group analysis of the 16 subjects.
Note that the operations used here are not detailed, the goal of this tutorial is not to teach Brainstorm to a new inexperienced user. For in depth explanations of the interface and the theory, please refer to the introduction tutorials.
Contents
License
These data are provided freely for research purposes only (as part of their Award of the BioMag2010 Data Competition). If you wish to publish any of these data, please acknowledge Daniel Wakeman and Richard Henson. The best single reference is: Wakeman DG, Henson RN, A multi-subject, multi-modal human neuroimaging dataset, Scientific Data (2015)
Any questions, please contact: rik.henson@mrc-cbu.cam.ac.uk
Presentation of the experiment
Experiment
- 16 subjects
- 6 runs (sessions) of approximately 10mins for each subject
- Presentation of series of images: familiar faces, unfamiliar faces, phase-scrambled faces
- The subject has to judge the left-right symmetry of each stimulus
- Total of nearly 300 trials in total for each of the 3 conditions
MEG acquisition
Acquisition at 1100Hz with an Elekta-Neuromag VectorView system (simultaneous MEG+EEG).
- Recorded channels (404):
- 102 magnetometers
- 204 planar gradiometers
- 70 EEG electrodes recorded with a nose reference.
MEG data have been "cleaned" using Signal-Space Separation as implemented in MaxFilter 2.1.
- A Polhemus digitizer was used to digitise three fiducial points and a large number of other points across the scalp, which can be used to coregister the M/EEG data with the structural MRI image.
- The distribution contains 3 sub-directories of empty-room recordings of 3-5mins acquired at roughly the same time of year (spring 2009) as the 16 subjects. The sub-directory names are Year (first 2 digits), Month (second 2 digits) and Day (third 2 digits). Inside each are 2 raw *.fif files: one for which basic SSS has been applied by maxfilter in a similar manner to the subject data above, and one (*-noSSS.fif) for which SSS has not been applied (though the data have been passed through maxfilter just to convert to float format).
Subject anatomy
- MRI data acquired on a 3T Siemens TIM Trio: 1x1x1mm T1-weighted structural MRI
Processed with FreeSurfer 5.3
Download and installation
The data is hosted on this FTP site (use an FTP client such as FileZilla, not your web browser):
ftp://ftp.mrc-cbu.cam.ac.uk/personal/rik.henson/wakemandg_hensonrn/- Download only the following folders (about 75Gb):
EmptyRoom: MEG empty room measurements.
SubXX/MEEG/*_sss.fif: MEG and EEG recordings in FIF format, corrected with SSS.
SubXX/MEEG/Trials: Trials definition files.
Publications: Reference publications related with this dataset.
README.TXT: License and dataset description.
The FreeSurfer segmentations of the T1 images are not part of this package. You can either process them by yourself, or download the result of the segmentation from the Brainstorm website.
Go to the Download page, and download the file: sample_group_anat.zip
Unzip this file in the same folder where you downloaded all the datasets.- Reminder: Do not put the downloaded files in the Brainstorm folders (program or database folders).
Start Brainstorm (Matlab scripts or stand-alone version). For help, see the Installation page.
Select the menu File > Create new protocol. Name it "TutorialVisual" and select the options:
"No, use individual anatomy",
"No, use one channel file per condition".
Import the anatomy
- Switch to the "anatomy" view.
Right-click on the TutorialAuditory folder > New subject > Sub01
- Leave the default options you set for the protocol
Right-click on the subject node > Import anatomy folder:
Set the file format: "FreeSurfer folder"
Select the folder: Anatomy/Sub01 (from sample_group_anat.zip)
- Number of vertices of the cortex surface: 15000 (default value)
- The two sets of fiducials we usually have to define interactively are here automatically set.
NAS/LPA/RPA: The file Anatomy/Sub01/fiducials.m contains the definition of the nasion, left and right ears. The anatomical points used by the authors are the same as the ones we recommend in the Brainstorm coordinates systems page.
AC/PC/IH: Automatically identified using the SPM affine registration with an MNI template.
If you want to double-check that all these points were correctly marked after importing the anatomy, right-click on the MRI > Edit MRI.
At the end of the process, make sure that the file "cortex_15000V" is selected (downsampled pial surface, that will be used for the source estimation). If it is not, double-click on it to select it as the default cortex surface. Do not worry about the big holes in the head surface, parts of MRI have been remove voluntarily for anonymization purposes.
All the anatomical atlases generated by FreeSurfer were automatically imported: the surface-based cortical atlases and the atlas of sub-cortical regions (ASEG).
Access the recordings
Link the recordings
- Switch to the "functional data" view.
Right-click on the subject folder > Review raw file.
Select the file format: "MEG/EEG: Neuromag FIFF (*.fif)"
Select the first FIF files in: Sub01/MEEG
Events: Ignore
We will load the trial definition separately.
Refine registration now? NO
The head points that are available in the FIF files contain all the points that were digitized during the MEG acquisition, including the ones corresponding to the parts of the face that have been removed from the MRI. If we run the fitting algorithm, all the points around the nose will not match any close points on the head surface, leading to a wrong result. We will first remove the face points and then run the registration manually.
Channel classification
A few non-EEG channels are mixed in with the EEG channels, we need to change this before applying any operation on the EEG channels.
Right-click on the channel file > Edit channel file. Double-click on a cell to edit it.
Change the type of EEG062 to EOG (electrooculogram).
Change the type of EEG063 to ECG (electrocardiogram).
Change the type of EEG061 and EEG064 to NOSIG.
MRI registration
Right-click on the channel file > Digitized head points > Remove points below nasion.
Right-click on the channel file > MRI registration > Refine registration.
MEG/MRI registration, before (left) and after (right) this automatic registration procedure:
Right-click on the channel file > MRI registration > EEG: Edit...
Click on [Project electrodes on surface]
- Close all the windows (use the [X] button at the top-right corner of the Brainstorm window).
Import triggers
Right-click on the "Link to raw file" > MEG (all) > Display time series.
In the Record tab, menu File > Add events from file:
Select the file format: "FieldTrip trial definition (*.txt;*.mat)"
Select the first text file: Sub01/MEEG/Trials/run_01_trldef.txt
There are two event categories created for each condition: the first one (eg. "Famous") represents when the stimulus was sent to the subject, the second (eg. "Famous_trial") is an extended event that represents the trial information that was present in the file.
We are going to use only the single events (triggers): Delete the 3 last categories ("_trial").
- Close all the figures. YES, save the modifications.
Pre-processing
Spectral evaluation
Run process "Frequency > Power spectrum density (Welch)" with the options illustrated below.
Right-click on the PSD file > Power spectrum.
- Observations:
- Three groups of sensors, from top to bottom: EEG, MEG gradiometers, MEG magnetometers.
Power lines: 50 Hz and harmonics
- Alpha peak around 10 Hz
Artifacts due to Elekta electronics: 293Hz, 307Hz, 314Hz, 321Hz, 328Hz.
Suspected bad EEG channels: EEG016
- Close all the windows.
Remove line noise
- Keep the "Link to raw file" in Process1.
Select process "Pre-process > Notch filter" to remove the line noise (50-200Hz).
Add immediately after the process "Frequency > Power spectrum density (Welch)"
Double-click on the PSD for the new continuous file to evaluate the quality of the correction.
- Close all the windows (use the [X] button at the top-right corner of the Brainstorm window).
EEG reference and bad channels
Right-click on link to the processed file ("Raw | notch(50Hz ...") > EEG > Display time series.
Select channel EEG016 and mark it as bad (using the popup menu or pressing Delete key).
In the Record tab, menu Artifacts > Re-reference EEG > "AVERAGE".
At the end, the window "select active projectors" is open to show the new re-referencing projector. Just close this window. To get it back, use the menu Artifacts > Select active projectors.
Artifact correction with SSP
Artifact detection
In the record tab, run the following menus:
Artifacts > Detect heartbeats: Channel name=EEG063, All file, Event name=cardiac
- In many of the other tutorials, you will have detected the blink category and used the SSP process to remove the blink artifact. In this experiment, we are particularly interested in the subject's response to seeing the stimulus. Therefore we will mark eyeblinks and other eye movements as BAD.
Artifacts > Detect events above threshold: Channel name=EEG062, All file, Event name=blink_BAD, Maximum threshold=100, Threshold units=uV, Filter=[0.30,20.00]Hz, Use absolute value is checked
- Close all the windows (using the [X] button).
Heartbeats
Empty the Process1 list (right-click > Clear list).
- Drag and drop the continuous processed file ("Raw | notch(50Hz...)") to the Process1 list.
- Select the following processes and run the pipeline:
Artifacts > SSP: Heartbeats > Sensor type: MEG MAG
Artifacts > SSP: Heartbeats > Sensor type: MEG GRAD
Double-click on the continuous file to show all the MEG sensors.
In the Record tab, select sensors "Left-temporal".Menu Artifacts > Select active projectors.
In category cardiac/MEG MAG: Select component #1 and view topography.
In category cardiac/MEG GRAD: Select component #1 and view topography.
Make sure that selecting the two components removes the cardiac artifact. Then click [Save].
Additional bad segments
Process1>Run: Select the process "Events > Detect other artifacts". This should be done separately for MEG and EEG to avoid confusion about which sensors are involved in the artifact.
Display the MEG sensors. Review the segments that were tagged as artifact, determine if each event represents an artifact and then mark the time of the artifact as BAD. This can be done by selecting the time window around the artifact, Right-click > Reject time segment. Note that this detection process marks 1-second segments but the artifact can be shorter.
- Once all the events in the two categories are reviewed and bad segments are marked, the two categories (1-7Hz and 40-240Hz) can be deleted.
- Do this detection and review again for the EEG.
SQUID SENSOR ARTIFACTS (SQUID JUMPS): Because of the different sensor technologies, one can expect that the different MEG systems may produce different types of artifact. With the Neuromag system, used for this experiment, one can see an artifact produced by the sensors which is exaggerated by the pre-processing completed with Max Filter, seen here in the examples below. The spacial filtering of Max Filter causes the artifact to be speard across most sensors and also spread a bit in time. Ideally, the offending should be marked bad before applying the Max Filter. In the case of this dataset, we have the artifacts - sometimes more frequent than others. The 1-7Hz artifact detection employed here will usually catch them, but it is important to review all the sensors and all the time in each recording to be sure these events are marked as bad segments.
Prepare all runs
Complete the above steps for Runs 2-6:
Access the recordings
Pre-processing
Artifact detection
Epoching and averaging
Drag and drop the 6 pre-processed raw folders in Process1 > Run
Run the two processes together: Import recordings > Import MEG/EEG: Events and Pre-process > Remove DC offset
Drag and drop all the imported trials in Process1. Since we want to be sure we have an equal number of trials in the average for each condition, we will select a uniform number of trials and then average across runs. File > Select uniform number of trials: By trial group (subject), Uniformly distributed. Then add the process Average > Average files: By trial groups (subject average)
The average files will be in the Intra-subject folder. NOTE: The average of the trials across runs is not the best way to analyze your MEG responses. This average is valuable only for EEG.
Apply a low-pass filter to the sensor data to remove the higher frequencies from the display. Then extract the time [-100,800]ms, therefore eliminating 200ms on each edge (to avoid edge effects from the filtering). Drop the average files in Process1 and Run Pre-process > Band-pass filter: Lower cutoff=0, Upper cutoff=32, then add the process extract > Extract time, [-100,800]Hz
- Make a cluster with channel EEG065 and overlay the channel across the three conditions.
Select the cluster then select three average files and right click > Clusters time series
Empty room recordings
- Link the empty room recordings
- Apply the same notch filter
- Compute the noise covariance
- Copy the noise covariance to the other conditions
Source estimation
- Head model: OpenMEEG BEM (EEG) and Overlapping spheres (MEG)
- Inverse model: ?
Scripting
Corresponding script in the Brainstorm distribution:
brainstorm3/toolbox/script/tutorial_visual_single.m