Skip to content

Commit

Permalink
closes mne-tools#7487 (rename get_channel_types -> get_channel_type_c…
Browse files Browse the repository at this point in the history
…onstants)
  • Loading branch information
drammock committed Mar 21, 2020
1 parent 5cb65e9 commit 254f0ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mne/io/pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
_check_option)


def get_channel_types():
def get_channel_type_constants():
"""Return all known channel types.
Returns
Expand Down
4 changes: 2 additions & 2 deletions mne/io/tests/test_pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
read_info)
from mne.io.pick import (channel_indices_by_type, channel_type,
pick_types_forward, _picks_by_type, _picks_to_idx,
get_channel_types, _DATA_CH_TYPES_SPLIT,
get_channel_type_constants, _DATA_CH_TYPES_SPLIT,
_contains_ch_type, pick_channels_cov,
_get_channel_types)
from mne.io.constants import FIFF
Expand Down Expand Up @@ -71,7 +71,7 @@ def _channel_type_old(info, idx):
# iterate through all defined channel types until we find a match with ch
# go in order from most specific (most rules entries) to least specific
channel_types = sorted(
get_channel_types().items(), key=lambda x: len(x[1]))[::-1]
get_channel_type_constants().items(), key=lambda x: len(x[1]))[::-1]
for t, rules in channel_types:
for key, vals in rules.items(): # all keys must match the values
if ch.get(key, None) not in np.array(vals):
Expand Down

0 comments on commit 254f0ab

Please sign in to comment.