Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions mne_bids/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ 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.
mne_valid_types = [
"bio",
"chpi",
"dbs",
# "dipole", # currently not converted
"ecg",
"ecog",
"eeg",
"emg",
"eog",
"exci",
# "eyetrack", # currently not converted
# "fnirs", # currently not converted
# "gof", # currently not converted
"gsr",
"ias",
"misc",
# "meg", # inferred in more detail
"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="HLU",
ias="MEGOTHER",
syst="MEGOTHER",
exci="MEGOTHER",
Expand Down