I’m trying to build the MNE data structure from an array using mne.io.RawArray.
This works well when setting ch_types = ‘misc’.Hhowever, when setting ch_types = ‘eeg’ (and change nothing else), the output from raw.plot() only shows vertical lines (while it showed nice signals in the first case).
The same happens when running this tutorial:
https://mne.tools/stable/auto_tutorials/simulation/10_array_objs.html#sphx-glr-auto-tutorials-simulation-10-array-objs-py
See in particular this section:
times = np.linspace(0, 1, sampling_freq, endpoint=False)
sine = np.sin(20 * np.pi * times)
cosine = np.cos(10 * np.pi * times)
data = np.array([sine, cosine])
info = mne.create_info(ch_names=['10 Hz sine', '5 Hz cosine'],
ch_types=['misc'] * 2,
sfreq=sampling_freq)
simulated_raw = mne.io.RawArray(data, info)
simulated_raw.plot(show_scrollbars=False, show_scalebars=False)
I then run the same code again while replacing ch_types=[‘misc’] * 2 with ch_types=[‘eeg’] * 2 and it fails, see pictures attached.
Any ideas what’s going wrong here?