import mne import numpy as np # create array data = np.random.randn(10, 1000) # create info structure ch_names = ['Fz', 'Cz', 'Pz'] ch_types = ['eeg', 'eeg', 'eeg'] sfreq = 250 # Hz info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types) # create raw object raw = mne.io.RawArray(data, info) # plot raw data raw.plot()
import mne # load raw data from file filename = 'file_raw.fif' raw = mne.io.read_raw_fif(filename) # select and plot EEG data from specific channels and time range picks = mne.pick_channels(raw.info['ch_names'], include=['Fz', 'Cz']) start, stop = raw.time_as_index([0, 5]) raw.plot(picks=picks, start=start, stop=stop)In this example, we load EEG raw data from a file and create a RawArray object. Then we select specific EEG channels and a time range of the data and plot the selected data. The above examples demonstrate the creation of a RawArray object and the selection and visualization of specific data channels and time ranges. The package library used is MNE.