Skip to content

rename_channels method should have a on_missing parameter #13455

Closed

Description

@sappelhoff

When renaming channels via https://mne.tools/stable/generated/mne.rename_channels.html and a particular channel is present in the renaming map but not the object, then an error is raised.

It would be convenient to control this behavior with an on_missing parameter like we have for example for set_annotations: https://mne.tools/stable/generated/mne.Epochs.html#mne.Epochs.set_annotations

The options would be "raise" (default, backward compatible), "warn", and "ignore".

Activity

  1. larsoner commented on Oct 22, 2025

    @larsoner
    Member

    Sounds good to me!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions