If you have a question or issue with MNE-Python, please include the following info:
NME version: 1.7.1
Operating system: Windows 10 22H2
IDE: myCharm
Hi, regarding the code below, just want to confirm that
it is correctly converting the eeg data in the bdf file into a txt file.
Code:
import numpy as np
import mne
converted_path = ‘C:\MyEEG\Newtest17-256.bdf’
mybdf = mne.io.read_raw_bdf(converted_path)
header = ‘,’.join(mybdf.ch_names)
converted_path_txt = ‘C:\MyEEG\Newtest17-256.txt’
np.savetxt(converted_path_txt, # (‘C:\MyEEG\Newtest17-256.txt’,
mybdf.get_data().T, delimiter=‘,’, header=header)
print(‘Done!’)