External Email - Use Caution
I have a source estimate file. (stc)
<SourceEstimate | 8175 vertices, subject : sub-CC721377_T1w, tmin : 60.0
(ms), tmax : 239.0 (ms), tstep : 1.0 (ms), data shape : (8175, 180)>
and label, according to desikan atlas,
label = mne.read_labels_from_annot('sub-CC721377_T1w', hemi='both',
parc='aparc', subjects_dir=subjects_dir, regexp=None)
I need source points corresponding to labels in variable label. To obtain
this I use the following line of code:
abc = mne.extract_label_time_course(stc, label, src, mode='mean_flip',
allow_empty=False, return_generator=False, verbose=None)
The output is abc = (68, 180) (matrix)
To generate source file again with this data, I use, mne.labels_to_stc(
*labels*, *values*, *tmin=0*, *tstep=1*, *subject=None*, *verbose=None*)
stcc = mne.labels_to_stc(label0, abc, tmin=0, tstep=1,
subject='sub-CC721377_T1w', verbose=None)
The output in stcc contains the following data:
<SourceEstimate | 296592 vertices, subject : sub-CC721377_T1w, tmin : 0.0
(ms), tmax : 179000.0 (ms), tstep : 1000.0 (ms), data shape : (296592, 180)>
stcc.shape
(296592, 180)
but the values provided is (68,180) and the labels are also 68, then why
the number of vertices is 296592.
How I can I obtain final source estimate file of shape (68,180) i.e., 68
vertices only