Hey there,
I was given .eeg and .vhdr files from an EEG experiment to get some practice. My problem is, that I have struggles reading them into MNE python.
- MNE-Python version: 3.9.2
- operating system: Windows 10
1.) .vhdr
→ As suggested here http://predictablynoisy.com/mne-python/manual/io.html, I tried
raw = mne.io.read_raw_brainvision("C:/Users/S_Hei/Documents/Python_Folder/B068a_VP2_EEG.vhdr")
but it tells me:
FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\S_Hei\Documents\Python_Folder\B068a_VP2_EEG.vmrk’
But there is a file called B068a_VP2_EEG.vhdr in C:\Users\S_Hei\Documents\Python_Folder. I also checked the working directory
os.getcwd()
‘C:\Users\S_Hei\Documents\Python_Folder’
and this:
ls
Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: 5E39-650EVerzeichnis von C:\Users\S_Hei\Documents\Python_Folder
13.05.2021 08:58 .
13.05.2021 08:58 …
12.05.2021 16:57 .ipynb_checkpoints
13.05.2021 08:58 24.796 B068.ipynb
12.05.2021 16:00 424.175.360 B068a_VP2_EEG.eeg
12.05.2021 15:59 1.849 B068a_VP2_EEG.vhdr
05.05.2021 09:20 5.991 csv einlesen.ipynb
16.04.2021 09:13 462 environment.yml
22.04.2021 11:53 108.402.432 my_data.npy
10.05.2021 09:23 pybrain_mne-main
11.05.2021 10:11 Tutorials
6 Datei(en), 532.610.890 Bytes
5 Verzeichnis(se), 300.559.220.736 Bytes frei
I don’t understand why it cannot find the file
2.) .eeg
→ I tried it with Importing data from EEG devices — MNE 1.6.0 documentation
raw_eeg = mne.io.read_raw_nihon("C:/Users/S_Hei/Documents/Python_Folder/B068a_VP2_EEG.eeg")
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xfa in position 0: ordinal not in range(128)
→ and mne.io.read_raw_eeglab — MNE 1.6.0 documentation
raw_eeg = mne.io.read_raw_eeglab("C:/Users/S_Hei/Documents/Python_Folder/B068a_VP2_EEG.eeg")
ValueError: Mat 4 mopt wrong format, byteswapping problem?
→ and also with
runs = [2, 4, 6, 8]
files = eegbci.load_data(runs, "C:/Users/S_Hei/Documents/Python_Folder/B068a_VP2_EEG.eeg")
TypeError: unsupported format string passed to list.__ format __
I chose the numbers because I thought they would code the condition: (crossed/uncrossed)
Do I have to convert them into .edf files? Or maybe set EEG references (I do not really understand what that is used for or what it does)?
I also thought about using pybv, but if I understood it correctly, MNE should be able to handle those files.
I am running out of ideas
Thanks for reading