Skip to content

FIX: correct sensor name ordering in plot_topomap when using Info object#13686

Open
Famous077 wants to merge 7 commits intomne-tools:mainfrom
Famous077:fix/plot-topomap-sensor-names
Open

FIX: correct sensor name ordering in plot_topomap when using Info object#13686
Famous077 wants to merge 7 commits intomne-tools:mainfrom
Famous077:fix/plot-topomap-sensor-names

Conversation

@Famous077
Copy link

Reference issue (if any)

What does this implement/fix?

--> When passing an Info object as pos to mne.viz.plot_topomap() with the
names argument, the sensor names were not reordered to match the
reordered channel positions. This caused a mismatch between displayed
names and their actual positions on the topomap.

The fix reorders the names array to match the picks ordering when:

  • Regular channels: names reordered to match picks
  • Gradiometer pairs: names reordered to match picks[::2]

Additional information

--> The data values were always correct , only the displayed sensor names
were mismatched. The fix is minimal and targeted, only affecting the
names reordering when pos is an Info object.

@Famous077
Copy link
Author

Famous077 commented Feb 25, 2026

Hi @agramfort , Would appreciate your review when you get a chance. Happy to update based on your feedbac.k. Thank you

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant