Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
'Setting to None.',
cnt_warning2='ignore:.*Could not define the number of bytes automatically.'
' Defaulting to 2.',
cnt_warning3='ignore:.*Coordinate frame could not be inferred.*',
no_hand='ignore:.*Not setting subject handedness.:RuntimeWarning:mne',
no_montage=r'ignore:Not setting position of.*channel found in '
r'montage.*:RuntimeWarning:mne',
Expand Down Expand Up @@ -3234,6 +3235,7 @@ def test_convert_meg_formats(dir_name, format, fname, reader, tmp_path):
warning_str['channel_unit_changed'],
warning_str['cnt_warning1'],
warning_str['cnt_warning2'],
warning_str['cnt_warning3'],
warning_str['no_hand'],
)
@testing.requires_testing_data
Expand Down
2 changes: 1 addition & 1 deletion mne_bids/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _channels_tsv(raw, fname, overwrite=False):
ch_type.append(map_chs[_channel_type])
description.append(map_desc[_channel_type])
low_cutoff, high_cutoff = (raw.info['highpass'], raw.info['lowpass'])
if raw._orig_units is not None:
if raw._orig_units:
units = [raw._orig_units.get(ch, 'n/a') for ch in raw.ch_names]
else:
units = [_unit2human.get(ch_i['unit'], 'n/a')
Expand Down