Customize coil type in coregistration gui

Hello everyone,

We are using our own MEG sensor configurations to perform source localization. For mne.viz.plot_alignment() and mne.make_forward_solution(), we can simply use mne.use_coil_def() with our coil.dat file. However, when it comes to mne.gui.coregistration, it failed to work.

with mne.use_coil_def(coil_def_fname):
    mne.gui.coregistration(subject='Anatomy', subjects_dir=subjects_dir)

We tried to run the code above and in the gui window the sensors were not showing with error message:

RuntimeError: Desired coil definition not found (type = 1898 acc = 1)
  • MNE version: 1.7.0
  • operating system: Windows 10

We appreciate any suggestions. Thank you!

1 Like