Skip to content

Commit

Permalink
add chpi to known channel list
Browse files Browse the repository at this point in the history
  • Loading branch information
skjerns committed Oct 22, 2024
1 parent a99fe4d commit 6d7eca7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions mne_bids/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,35 @@ def test_get_ch_type_mapping():
with pytest.raises(ValueError, match='specified from "bogus" to "mne"'):
_get_ch_type_mapping(fro="bogus", to="mne")

# check that all mne types have a corresponding BIDS translation
# last update from mne 0.19.0. The following have been removed:
# dipole, fnirs, gof, we could add them to BIDS conversion though
mne_valid_types = [
"bio",
"chpi",
"dbs",
"dipole",
"ecg",
"ecog",
"eeg",
"emg",
"eog",
"exci",
"eyetrack",
"gsr",
"ias",
"misc",
"meg",
"resp",
"seeg",
"stim",
"syst",
"temperature",
]
map_mne_to_bids = _get_ch_type_mapping(fro="mne", to="bids")
for ch_type in mne_valid_types:
assert ch_type in map_mne_to_bids


def test_handle_datatype():
"""Test the automatic extraction of datatype from the data."""
Expand Down
1 change: 1 addition & 0 deletions mne_bids/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def _get_ch_type_mapping(fro="mne", to="bids"):
megrefgradaxial="MEGREFGRADAXIAL",
meggradplanar="MEGGRADPLANAR",
megrefmag="MEGREFMAG",
chpi="MEGOTHER",
ias="MEGOTHER",
syst="MEGOTHER",
exci="MEGOTHER",
Expand Down

0 comments on commit 6d7eca7

Please sign in to comment.