Vertexes to time course

Hi
I believe its a simple and naive question. I am using the code below (taken from the tutorial as it is). The aud_lh variable has details of 1097 vertices. Moreover stc_lh has only 33 time courses, How those many number of vertices result in 33 time courses ? Furthermore, is there a way to calculate the euclidean distance between vertices that contributed to these 33 time courses ?
Thanks

import mne
from mne.datasets import sample
import matplotlib.pyplot as plt

print(__doc__)

data_path = sample.data_path()
subjects_dir = '/network/lustre/home/mne_data/MNE-sample-data/subjects'
meg_path = '/network/lustre/home/mne_data/MNE-sample-data/MEG/sample'

# load the stc
stc = mne.read_source_estimate('/network/lustre/home/mne_data/MNE-sample-data/MEG/sample/sample_audvis-meg')

# load the labels
aud_lh = mne.read_label('/network/lustre/home/mne_data/MNE-sample-data/MEG/sample/labels/Aud-lh.label')
aud_rh = mne.read_label('/network/lustre/home/mne_data/MNE-sample-data/MEG/sample/labels/Aud-rh.label')

# extract the time course for different labels from the stc
stc_lh = stc.in_label(aud_lh)
stc_rh = stc.in_label(aud_rh)

This has to do with the different sampling densities of the source space. The label aud_lh generally has all vertices from the highest resolution source space, while this STC is based on a lower density source space. When you call stc.in_label() it’s going to take only the vertices that are in the label and in the STC.

assert set(stc.lh_vertno).intersection(set(aud_lh.vertices)) == 33

see The typical M/EEG workflow β€” MNE 1.3.0 documentation for more info on source space density.

1 Like