- MNE-Python version: 0.24.0
- operating system: pycharm
Now I have .csv files which measured by Hitachi ETG 4000 OTS. It gets some errors when using mne.io. read_raw_hitachi to read files.
The data structure: [redacted]
Code and errors as following pic.
It is weriod about the figure I drawed for EEG original data. I don’t know why.
Codes as follows.
import mne import numpy as np import scipy.io import h5py sampling_freq = 5.2 # in Hertz ch_names = ['Fp1', 'AF7', 'AF3', 'AF4', 'AF8', 'F7', 'F5', 'F3', 'F4', 'F6', 'F8', 'FC5', 'FC3', 'FC4', 'FC6', 'C5', 'C6', 'T7', 'T8', 'TP7', 'CP5', 'CP6', 'TP8', 'P7', 'P5', 'P6', 'P8', 'PO7', 'PO8'] # +['auxiliary_CH']*4 ch_types = ['eeg'] * 29 info = mne.create_info(ch_names, ch_types=ch_types, sfreq=sampling_freq) info = info.set_montage('standard_1020') data = h5py.File(r'E:\ds课程资料\programming\codes\SMD\EEG-Data\Control001-1.mat')['Data'] data = np.transpose(data,(1,0)) raw = mne.io.RawArray(data[:-4],info) raw.plot(n_channels=29, duration=400, block=True) raw.plot_psd(average=True) print('Shape of Dataset: ',raw.get_data().shape) print('Number of channels: ',raw.info.get('nchan'))
Here is the picture(just for raw.plot() instruction)
I’m a freshman in the research of this area. Hope you can help me. Thank you.