diff --git a/mne_bids/dig.py b/mne_bids/dig.py index 49169415f..84a86522f 100644 --- a/mne_bids/dig.py +++ b/mne_bids/dig.py @@ -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 ' diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index 383926353..014d74f8c 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -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'),