morph to fsaverage volume source after apply_lcmv

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

Dear MNE users,

Unfortunately, I havenā€™t solved this error yet. Therefore, I want to clarify the question and to see if anyone has any idea about it.

The error is:

RuntimeError: MRI interpolator not present in src[0], cannot use mri_resolution=True

when I run:

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)

fwd is loaded by:

fname_fwd = op.join(fpath, subject + ā€œ-volume_fwd.fifā€)
fwd = mne.read_forward_solution(fname_fwd)

Best,
Sherry