- MNE version: 1.6.1
-OS: MacOS sonoma 14.4.1
Hello everyone,
I am working with MEG data and epochs. After a typical preprocessing, I created the stc object using dSPM (not relevant).
inv = mne.minimum_norm.make_inverse_operator(info=raw.info,
forward=forward,
noise_cov=noise_cov,
loose=‘auto’,
depth=0.8,
fixed=‘auto’,
rank=None,
use_cps=True
)
stc = mne.minimum_norm.apply_inverse_epochs(epochs = epochs,
inverse_operator = inv,
lambda2 = lambda2,
method = method
)
everything works perfectly. Then I use the parcel (Schaefers200) with the method mean_flip:
sub_labels = mne.read_labels_from_annot(‘fsaverage’,parc = parc_met,
subjects_dir=mri_subj_dir)
subject_labels = mne.morph_labels(sub_labels, subject_to = pnum_subj,
subjects_dir = mri_subj_dir)
mne.write_labels_to_annot(subject_labels, subject = pnum_subj,
parc=parc_met, subjects_dir = mri_subj_dir,
overwrite=True)
stc_parcels = mne.extract_label_time_course(labels = subject_labels, src = src, stcs = stc, mode=‘mean_flip’)
a few questions:
1: the plot of stc has some negative time course (why?)
2: if I want to know what virtual sensor are inside a parcel, I found this association of virtual sensors and vertices: vertices_id_lh = inv[‘src’][0][‘vertno’]
Is it correct?
3: if yes to 2 I reversed the info to grab the virtual sensors in vertices_id_lh from sub_labels[parcel_index].vertices.
The problem is that if I plot the average of the activity of the time series of the virtual sensors obtained this way, I have a different plot with respect to this plot:
plt.plot(stc[epoch_index].times,stc_parcels[epoch_index][parcel_index].T)
why?
Thanks a lot in advance,
Ivano