Hi @richard,
Sure! I am referring to the stc plot in this section https://mne.tools/stable/auto_tutorials/machine-learning/50_decoding.html#projecting-sensor-space-patterns-to-source-space
especially the image below:
Here is a snippet of my code that I use to plot my stc objects:
event_id = {'shape': 2, 'semantic': 3}
read_raw = mne.io.read_raw_fif(some_raw_file, preload=True)
read_raw.filter(1, 40)
read_ica = mne.preprocessing.read_ica(some_ica_file, verbose=None)
read_ica.apply(read_raw)
events = mne.find_events(read_raw)
read_fwd = mne.read_forward_solution(some_fwd_file)
anat = 'anat'
tmin=0
tmax=1.0
epochs = mne.Epochs(read_raw, events, event_id, tmin=tmin, tmax=tmax, proj=True, picks=('grad'), baseline=(tmin, 0.), preload=True, decim=10)
epochs.pick_types(meg=True)
X = epochs.get_data()
y = epochs.events[:, 2] # target: task 2 vs task 3
clf = make_pipeline(StandardScaler, LinearModel(LogisticRegression(solver='lbfgs')))
time_decod = SlidingEstimator(clf, n_jobs=1, scoring='roc_auc', verbose=True)
time_decod.fit(X, y)
coef = get_coef(time_decod, 'patterns_', inverse_transform=True)
evoked_time_gen = mne.EvokedArray(coef, epochs.info, tmin=epochs.times[0])
time_gen = GeneralizingEstimator(clf, n_jobs=1, scoring='roc_auc', verbose=True)
scores = cross_val_multiscore(time_gen, X, y, cv=5, n_jobs=1)
scores = np.mean(scores, axis=0)
cov = mne.compute_covariance(epochs, tmax=None)
inv = mne.minimum_norm.make_inverse_operator(evoked_time_gen.info, read_fwd, cov, loose=0.8)
stc = mne.minimum_norm.apply_inverse(evoked_time_gen, inv, 1. / 9., 'dSPM')
brain = stc.plot(subject=anat, hemi='split, views=('lat', 'med, initial_time=0, subjects_dir=sub_dir)This text will be hidden
brain.add_text(0.1, 0.9, "Projecting src est. grand average to src space for events {}".format(event_id), 'title', font_size=7)
As you can see, the plotted stc object in the image above just shows the contrast or difference between two conditions, but what is not clear to me is whether that difference is asymmetric, symmetric, or something else.
Thank you!
Best,
Aqil