Skip to content

RFC: get_channel_types polysemy #7487

@drammock

Description

@drammock

I've stumbled on a not-so-nice aspect of the API when working on #7486:

  1. mne.io.pick.get_channel_types (source) takes no input, gets all known channel types as dict keys (values are FIFF constants for kind and coil_type).
  2. mne.io.pick._get_channel_types (source) takes an Info, picks, boolean unique, and boolean whether to restrict to data channels only. Returns a list or set depending on unique.
  3. <Raw/Epochs/Evoked>.get_channel_types (source) method (via the ContainsMixin). Returns list of channel types.

Number 1 is called once in a test, and nowhere else in the codebase. I'd like to propose renaming it from get_channel_types to get_all_channel_types, show_all_channel_types, or get_channel_types_dict. I prefer the first option. This is a public function so it would be an API change w/ deprecation cycle. If acceptable, I could roll it into #7486 or do it in a separate PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions