Exporting Leadfield sensitivity values for customized scouts

Dear brainstorm experts,

Is there an easy way to export each subject’s MEG leadfield sensitivity values for customized scout regions? I would like to calculate the average leadfield sensitivity values for several customized scouts across all sensors. Or, alternatively, is there an easy way for me to multiply the gain matrix from the head model to the vertices within the ROIs, and average values across vertices within the ROI, and then sum it across sensors?

In exploration of how to do that, I also export the list of vertices for each scout, and got some numbers in the list. I assume those numbers of the vertex index number that corresponds to the GridLoc in the head model (e.g., 15003 vertices x 3 matrix, assuming the row # is the vertex index #)?

Thank you!

best, Yuhan

Hi @yuhanmc

Brainstorm does not currently offer this option.

However, you can script it using the scout of the cortex that you used as the source space.

To do this, you need to export the cortex from Brainstorm to MATLAB and export the computed leadfield.

You can read here how the scouts are saved in the surface file here: https://neuroimage.usc.edu/brainstorm/Tutorials/Scouts#On_the_hard_drive

And the structure of the leadfield here: https://neuroimage.usc.edu/brainstorm/Tutorials/HeadModel#On_the_hard_drive

In summary, you need to extract the LF values from the Gain matrix associated with the vertices [sources] of scouts listed in the filed: surfaceFile.Atlas.Scouts.Vertices

I hope this is helpful.

Best,

Takfarinas

Hi Takfarinas,

Thank you. I will script to extract Gain Matrix with the vertices in the customized scouts.

Just want to confirm, when I export the list of vertices of the scout (Scout.Vertices), it’s a row of numbers like the screenshot below. Is it correct to assume those numbers are corresponding exactly to the number indices of columns in HeadModel.GridLoc (a # of sources * 3 orientations matrix)?

image

Thank you!

Yuhan