Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrockhill committed Mar 29, 2022
1 parent 482918e commit 9424143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mne_bids/dig.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ def _write_dig_bids(bids_path, raw, montage=None, acpc_aligned=False,
"and left and right pre-auricular point "
"landmarks")

if bids_path.datatype == 'ieeg' and mne_coord_frame == 'ras':
if bids_path.datatype == 'ieeg' and bids_path.space in (None, 'ACPC') and \
mne_coord_frame == 'ras':
if not acpc_aligned:
raise RuntimeError(
'`acpc_aligned` is False, if your T1 is not aligned '
Expand Down
2 changes: 1 addition & 1 deletion mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,7 @@ def test_event_storage(tmp_path):
@pytest.mark.parametrize(
'dir_name, fname, reader, datatype, coord_frame', [
('EDF', 'test_reduced.edf', _read_raw_edf, 'ieeg', 'mni_tal'),
('EDF', 'test_reduced.edf', _read_raw_edf, 'ieeg', 'mri'),
('EDF', 'test_reduced.edf', _read_raw_edf, 'ieeg', 'ras'),
('EDF', 'test_reduced.edf', _read_raw_edf, 'eeg', 'head'),
('EDF', 'test_reduced.edf', _read_raw_edf, 'eeg', 'mri'),
('EDF', 'test_reduced.edf', _read_raw_edf, 'eeg', 'unknown'),
Expand Down

0 comments on commit 9424143

Please sign in to comment.