- MNE version: 1.7.1
- operating system: Windows 10
Hello,
Iām trying to use the mne.fit_dipole function, after having computed a bem solution with the āopenmeegā solver, is it possible? Iām having the following error:
model = mne.make_bem_model(subject=subject, ico=4, conductivity=conductivity, subjects_dir=subjects_dir)
bem = mne.make_bem_solution(model, solver='openmeeg')
mne.write_bem_solution(bem_path, bem, overwrite=True)
dip = mne.fit_dipole(evoked, cov_path, bem_path, trans_path)[0]
File "mypath\site-packages\mne\dipole.py", line 1656, in fit_dipole
fwd_data = _prep_field_computation(
File "<decorator-gen-387>", line 10, in _prep_field_computation
File "mypath\site-packages\mne\forward\_compute_forward.py", line 761, in _prep_field_computation
solution = _bem_specify_coils(bem, coils, cf, mults, n_jobs)
File "mypath\site-packages\mne\forward\_compute_forward.py", line 217, in _bem_specify_coils
sol = np.zeros((bins[-1] + 1, bem["solution"].shape[1]))
IndexError: tuple index out of range
I had no issue when I tried to use the āmneā bem solution in the mne.fit_dipole function.
From my understanding, the bem[āsolutionā] in the openmeeg case is a 1D array, but it seems to me that the mne.fit_dipole function doesnāt take this possibility into account. Or maybe Iām just doing something wrong!
Thank you for your help,
Maria