MNE Version 1.6.0
Operating system: Windows 10 Pro
I have been trying to visualise my own custom placed EEG sensors using mne.viz.plot_alignment. In this case, I have copied the locations from an example layout. when I try to visualise this layout I get the following error message:
RuntimeError: info channel name inconsistency detected, please notify mne-python developers
Here is my code:
import mne
from mne.datasets import sample
import numpy as np
data_path = sample.data_path()
# the raw file containing the channel location + types
sample_dir = data_path / "MEG" / "sample"
raw_fname = sample_dir / "sample_audvis_raw.fif"
# The paths to Freesurfer reconstructions
subjects_dir = data_path / "subjects"
subject = "sample"
# The transformation file obtained by coregistration
trans = sample_dir / "sample_audvis_raw-trans.fif"
details = mne.io.read_info(raw_fname)
fs=10000
ch_names=[f"EEG{n:03}" for n in range(1,61)]
ch_types=["eeg"]*60
custom_sensors = mne.create_info(ch_names, ch_types=ch_types, sfreq=fs)
custom_sensors['chs'][0:60]=details['chs'][315:375]
mne.viz.plot_alignment(
info=custom_sensors,
trans=None,
subject=subject,
dig=True,
meg=["sensors"],
subjects_dir=subjects_dir,
surfaces="head",
)