diff --git a/mne_bids/io.py b/mne_bids/io.py index 28f3b196f..83e70a662 100644 --- a/mne_bids/io.py +++ b/mne_bids/io.py @@ -90,11 +90,13 @@ def _read_raw(raw_fname, electrode=None, hsp=None, hpi=None, config=None, raw = io.read_raw_cnt(raw_fname, montage=montage) # MEF3 format + # only iEEG elif ext == '.mef3': raise ValueError("MEF3 format not yet supported. ", "Please contact the MNE-BIDS developers.") # Neurodata without borders .nwb format + # only iEEG elif ext == '.nwb': raise ValueError("Neurodata without borders .nwb format not yet ", " supported. Please contact the MNE-BIDS developers.") diff --git a/mne_bids/tests/test_mne_bids.py b/mne_bids/tests/test_mne_bids.py index 8ccd1d369..26e0b9c97 100644 --- a/mne_bids/tests/test_mne_bids.py +++ b/mne_bids/tests/test_mne_bids.py @@ -289,3 +289,46 @@ def test_nwb(): raw_to_bids(subject_id=subject_id, session_id=session_id, run=run, task=task, acquisition=acq, raw_file=raw_fname, output_path=output_path, overwrite=True, kind='ieeg') + + +def test_vhdr_ieeg(): + """Test raw_to_bids conversion for BrainVision data (ieeg).""" + output_path = _TempDir() + data_path = op.join(base_path, 'brainvision', 'tests', 'data') + raw_fname = op.join(data_path, 'test.vhdr') + + raw_to_bids(subject_id=subject_id, session_id=session_id, run=run, + task=task, acquisition=acq, raw_file=raw_fname, + output_path=output_path, overwrite=True, kind='ieeg') + + cmd = ['bids-validator', '--bep010', output_path] + run_subprocess(cmd, shell=shell) + + +def test_edf_ieeg(): + """Test raw_to_bids conversion for European Data Format data (ieeg).""" + output_path = _TempDir() + data_path = op.join(testing.data_path(), 'EDF') + raw_fname = op.join(data_path, 'test_reduced.edf') + + raw_to_bids(subject_id=subject_id, session_id=session_id, run=run, + task=task, acquisition=acq, raw_file=raw_fname, + output_path=output_path, overwrite=True, kind='ieeg') + + cmd = ['bids-validator', '--bep010', output_path] + run_subprocess(cmd, shell=shell) + + +def test_set_ieeg(): + """Test raw_to_bids conversion for EEGLAB data (ieeg).""" + # standalone .set file + output_path = _TempDir() + data_path = op.join(testing.data_path(), 'EEGLAB') + raw_fname = op.join(data_path, 'test_raw_onefile.set') + + raw_to_bids(subject_id=subject_id, session_id=session_id, run=run, + task=task, acquisition=acq, raw_file=raw_fname, + output_path=output_path, overwrite=True, kind='ieeg') + + cmd = ['bids-validator', '--bep010', output_path] + run_subprocess(cmd, shell=shell)