-
Notifications
You must be signed in to change notification settings - Fork 2
07. SEEG electrode analysis
NOTE: These are data processing scripts based on the SEEG data collected on subject "s031" using an audio-visual stimulation paradigm. The working directory is /Users/fhlin_admin/workspace/seeg/s031/analysis
.
[This script file] converts the electrode contact coordinates from post-surgery MRI to pre-surgery MRI. This procedure is typically required because electrode contact coordinates should be easily identified by the black holes in the post-surgery MRI. After locating all electrode contacts in post-surgery MRI, we need to convert these coordinates to the pre-surgery MRI for better visualization and calculation.
[This script file] converts the electrode contact coordinates from post-surgery MRI to the MNI template MRI, which is the "fsaverage" subject in FreeSurfer. This procedure is typically required for rendering electrodes across participants.
[This script file] reads multiple cortical labels (regions-of-interest) and find the electrode contacts that are close to each label. The distance metrics is the Euclidean distance in the 'orig' brain volume of the pre-surgery MRI, which is considered with less image distortion. For each specified cortical label, we calculate both 1) the minimal distance: the distance between all electrode contacts to any part within the label and 2) the center-of-mass (com) distance: the distance between all electrode contacts to the center-of-mass (COM) of the label. The electrode contact with the least minimal distance and the center-of-mass distance will be identified. If the SEEG electrode data are supplied, these time series will be exact.
The output roi
is the structure for each cortical label. Each ROI includes the following fields:
- name: the name of the ROI
- hemi: the hemisphere of ROI; left (LH) or right hemisphere (RH).
- idx: the vertex index (0-based) for the ROI
- electrode_min_dist_electrode_name: the name of the electrode that has the least minimal distance
- electrode_min_dist_electrode_contact: the contact of the electrode that has the least minimal distance
- electrode_min_dist: the minimal distance (mm)
- erf_electrode_min_dist: the time series of the SEEG at the shortest minimal distance; Depending on the number of conditions, it is a cell object with the field
data
, which gives the time series - electrode_com_dist_electrode_name: the name of the electrode that has the least COM distance
- electrode_com_dist_electrode_contact: the contact of the electrode that has the least COM distance
- electrode_com_dist: the COM distance (mm)
- erf_electrode_com_dist: the time series of the SEEG at the shortest COM distance; Depending on the number of conditions, it is a cell object with the field
data
, which gives the time series
[This script file] displays the brain volume model in a semi-transparent color with the ROI in orange and electrodes contact in dark brown, dark blue, and blue, representing all electrodes, all contacts at the electrode closest to the ROI, and the electrode contact closest to the ROI, respectively. In this case, we show the T3 contact (blue) the third contact from the medial aspect of the brain at the T electrode (dark blue) at the temporal lobe around the vicinity of the auditory cortex ROI (orange).
[This script file] displays the MNI template brain volume model in a semi-transparent color with the ROI in orange and electrodes contact in dark brown, dark blue, and blue, representing all electrodes, all contacts at the electrode closest to the ROI, and the electrode contact closest to the ROI, respectively. See ##1 for the procedure to map electrode coordinates to the MNI brain.
[This script file] calculates the time-frequency representation (TFR) of the SEEG evoked responses across trials at the electrode contacts close to the left and right auditory cortices. The TFR was calculated using the Morlet wavelet transform. This example specifically calculates the TFR at three conditions: auditory stimulus only, visual stimulus only, and combined audiovisual stimulus.
[This script file] and [this script file] read and render the coordinates of the selected electrode in the MNI template at the left and right hemisphere, respectively. The cortical label of interest can be displayed as well.
The calculated TFR for each participant can be averaged using [this script file] across different conditions.