I am trying to find out the sensor specific gain/leadfield matrix
corresponding to some particular dipole location in a label.
When I try to read the leadfield matrices from forward solution, I have a
shape of (L): sensors x dipoles (i.e., 122 x 61452 in my case) where, each
dipole has 3 orientations.
Is there any tracker that I can use to get the individual dipole index
along with its orientation's components that I can match later on to the
vertices in a given label?
Plus, it would be nice know whether that particular dipole is placed in
left or right hemisphere. Any lead would be helpful.
I am trying to find out the sensor specific gain/leadfield matrix corresponding to some particular dipole location in a label.
When I try to read the leadfield matrices from forward solution, I have a shape of (L): sensors x dipoles (i.e., 122 x 61452 in my case) where, each dipole has 3 orientations.
Is there any tracker that I can use to get the individual dipole index along with its orientation's components that I can match later on to the vertices in a given label?
fwd['src'][0]['rr'][fwd['src'][0]['vertno']]
will give you the position of dipoles
fwd['src'][0]['nn'][fwd['src'][0]['vertno']]
will give you the normal to the cortex at dipoles in the source space.
Plus, it would be nice know whether that particular dipole is placed in left or right hemisphere. Any lead would be helpful.
left hemisphere is first in the fwd['data'] array.
wd['src'][0]['vertno'].size will tell you when you move to the right
hemisphere.