Skip to content

rename_channels method should have a on_missing parameter #13455

@sappelhoff

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".

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