Skip to content

Bug: plot_compare_evokeds, issue with Neuromag-122-data (rename_channels) #6344

Description

@marsipu

Describe the bug

When I try to do the mne.viz.plot_compare_evokeds() with data from our Neuromag122-MEG (only planar-gradiometers), the following Error-Message occurs:
ValueError: New channel names are not unique, renaming failed

The traceback goes to rename_channels which is called within combine_grads.
I assume, the problem is, that the naming of the channels is here very simple:
MEG 001, MEG 002, MEG 003, [...] MEG 122

In _combine_grad(1545), the last letter of the ch_name ist changed to 'X', which leads for this data to the same ch_names.

I didn't understand the purpose of the 'X', so I hope, you can help me with fixing this.
Below is a code snippet with some Neuromag-122-data.
Thank you!

Steps and/or code to reproduce

Neuromag122_test.zip

import mne
from os.path import join

path_to_file = '<your_path_to_test_file>'
data_path = join(path_to_file, 'Neuromag122_test-ave.fif')

evokeds = mne.read_evokeds(data_path)
mne.viz.plot_compare_evokeds(evokeds)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions