OS: Windows 10
Python: 3.8
MNE: 0.22.0
Hello,
I am experiencing some difficulty creating a ‘raw’ object from a Matlab file that contains my preprocessed EEG data. When I try to plot the raw data with raw.plot(), the signal is completely garbled. However, when I remove the ‘ch_types’ parameter of the info object and have the raw object consist entirely of ‘misc’ channels, the data is rendered normally. Interestingly, raw.plot_psd() seems to function normally regardless of whether I specify channel types. Has anybody else experienced this issue? Any advice would be appreciated.
Plot backend settings
matplotlib.use(‘Qt5Agg’)
Import data
mat_data = read_mat(r’C:\Users\Desktop\EEG_cut_proc\PreprocessedFiles\001_self_preprocessed.mat’)
data = np.array(mat_data[‘EEG’][‘data’])
Create info and raw objects
ch_names = mat_data[‘EEG’][‘chanlocs’][‘labels’]
sampling_freq = 500
info = mne.create_info(ch_names, ch_types=[‘eeg’]*64 , sfreq=sampling_freq)
raw = mne.io.RawArray(data,info)
raw.set_montage(‘standard_1005’)
%matplotlib qt
raw.plot()
Thank you