Skip to content

De-duplicate channel types #4851

Closed
Closed

Description

@cbrnr

As a follow-up to #4842, we should de-duplicate various definitions of valid channel types. Currently, these can be found in

  • mne.io.pick: get_channel_types, pick_types, _PICK_TYPES_DATA_DICT, ... There are many more possibly relevant objects, but I need feedback which should be refactored and which should be left as is.
  • mne.io.meas_info: _kind_dict

Anywhere else I forgot?

There should be only one place where valid channel types are defined. I suggest using mne.io.pick (currently it is inside get_channel_types, but this could be moved to a global dict in this module if desired.

Activity

  1. agramfort commented on Jan 1, 2018

    @agramfort
    SponsorMember
  2. cbrnr commented on Jan 8, 2018

    @cbrnr
    ContributorAuthor

    @agramfort did you think of anything in particular in addition to the functions in pick.py I mentioned above? I think we should go through the whole module and choose what to refactor and what to leave alone.

  3. agramfort commented on Jan 8, 2018

    @agramfort
    SponsorMember
  4. agramfort commented on Aug 4, 2018

    @agramfort
    SponsorMember

    @cbrnr I am not sure what you had in mind here? can you point to a code duplication or possible inconsistency?

  5. cbrnr commented on Aug 6, 2018

    @cbrnr
    ContributorAuthor

    Currently the mapping between channel type and FIFF constants is implemented multiple times (at least in mne.io.pick.get_channel_types and mne.io.meas_info._kind_dict). There should be only one place where this mapping is defined.

  6. agramfort commented on Aug 6, 2018

    @agramfort
    SponsorMember
  7. added this to the 0.19 milestone on Aug 21, 2019
  8. modified the milestones: 0.19, 0.20 on Sep 11, 2019
  9. larsoner commented on Mar 4, 2020

    @larsoner
    Member

    We'll want to do this at the start of a new release cycle rather than right before release so I'm bumping to 0.21

  10. modified the milestones: 0.20, 0.21 on Mar 4, 2020
  11. modified the milestones: 0.21, 0.22 on Aug 31, 2020
  12. added 3 commits that reference this issue on Nov 17, 2020
    e939aa6
    01fceaf
    c61d6e8
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions