- MNE version: 1.4.0
- operating system: Windows-10-10.0.19045-SP0
I am computing inverse solution (method dSPM) on several subjects. I have done with 4 subjects, their explained variance are all around 70-80%, however , there is one subject, whose inverse solution 's explained variance is only 2-3%. But the codes are all the same, and i have check that the T1 template was right for the subject.
the code return information looked like these :
Applying inverse operator to "1"...
Picked 306 channels from the data
Computing inverse...
Eigenleads need to be weighted ...
Computing residual...
Explained 2.3% variance
Combining the current components...
dSPM...
[done]
The codes are below:
evoked = epochs.average(by_event_type = True)
noise_cov = mne.compute_covariance(epochs, tmax=0.0, method=["shrunk", "empirical"], rank='info', verbose=True)
singleevent = 0 # list start from 0
subjects_dir =r"G:\MEG_analysis\sub_mni_freesurfer"
## inverse
inverse_operator = make_inverse_operator(
evoked[singleevent].info, fwd, noise_cov, loose=0.2, depth=0.8
)
method = "dSPM"
snr = 3.0
lambda2 = 1.0 / snr**2
stc, residual = apply_inverse(
evoked[singleevent],
inverse_operator,
lambda2,
method=method,
pick_ori=None,
return_residual=True,
verbose=True,
)
what 's more, when i want to morph the subject’data to fsaverage , it return error:
ValueError: dimension mismatch.
the code is like these :
## morph subject surface to group surface
morph = mne.compute_source_morph(
stc,
subject_from=subject,
spacing = 5,
subject_to="fsaverage",
subjects_dir=subjects_dir,
)
stc_fsaverage = morph.apply(stc)