RFC: get_channel_types polysemy
See original GitHub issueI’ve stumbled on a not-so-nice aspect of the API when working on #7486:
mne.io.pick.get_channel_types(source) takes no input, gets all known channel types as dict keys (values are FIFF constants forkindandcoil_type).mne.io.pick._get_channel_types(source) takes anInfo, picks, booleanunique, and boolean whether to restrict to data channels only. Returns a list or set depending onunique.<Raw/Epochs/Evoked>.get_channel_types(source) method (via theContainsMixin). 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Not possible, they do completely different things, which is why I proposed to rename one of them.
What I have done is deduplicate the instance methods and the private function, which were doing (roughly) the same thing.
this is now what the PR from Dan does. Except using a short function name