Dear MNE users,
I am creating volume source space of whole brain and then obtain stc using apply_lcmv, and then morphing to fsaverage. But an error about src arised.
Following is the snippet,
fs_dir = fetch_fsaverage(verbose=True)
subjects_dir = op.dirname(fs_dir)
subject = ‘fsaverage’
src = op.join(fs_dir, ‘bem’, ‘fsaverage-vol-5-src.fif’)
src_volume = mne.read_source_spaces(src)
fname_fwd = op.join(fpath, subject + “-volume_fwd.fif”)
fwd = mne.read_forward_solution(fname_fwd)
fname_src = op.join(fpath, subject + “-volume_src.fif”)
src = mne.read_source_spaces(fname_src)
data_cov = mne.compute_covariance(epochs_rs, tmin=0.01, tmax=0.60, method=‘empirical’)
noise_cov = mne.compute_covariance(epochs_rs, tmin=-0.5, tmax=-0.1, method=‘empirical’)
filters = make_lcmv(evoked.info, fwd, data_cov, reg=0.05, noise_cov=noise_cov, pick_ori=‘max-power’, weight_norm=‘unit-noise-gain’, rank=None)
stc_LCMV = apply_lcmv(evoked, filters)
morph = mne.compute_source_morph(src=fwd[‘src’], subjects_dir=subjects_dir, niter_affine = [10, 10, 5], niter_sdr = [10, 10, 5], src_to=src_volume, verbose=True)
stc_LCMV_fs = morph.apply(stc_LCMV)
whenever I am trying to apply the morphing [for example: morph = mne.compute_source_morph(src=fwd[‘src’], …) or src=src], the code lands up with an error:
RuntimeError: MRI interpolator not present in src[0], cannot use mri_resolution=True
What could be the possible solution? I don’t know why src or fwd[‘src’] not working for mne.compute_source_morpy.
Best,
Sherry
- MNE version: 1.0.3
- operating system: Centos Linux 7