External Email - Use Caution
Thank you so much!! It worked!
but I've faced with another problem making custom epochs. Could you give me
some advice?
Thank you!!
I see this error even though I picked 18 channels :
ValueError: All picks must be < n_channels (30), got 30
This is my code :
event_id = {'S 4':4, 'S 6':6, 'S 7':7, 'S 1':1, 'S 5':5, 'S
3':3, 'S 2':2}
events= mne.events_from_annotations(raw)
n_channels = 32
sampling_rate = 500
info = mne.create_info(n_channels, sampling_rate)
channel_names = ['Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4',
'O1', 'O2', 'F7', 'F8', 'T7', 'T8', 'P7', 'P8', 'Fz', 'Cz', 'Pz',
'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6', 'TP9', 'TP10',
'EOG', 'M1', 'M2']
channel_types = ['eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eog', 'bio', 'bio']
sfreq = 500
info['description'] = 'My custom dataset'
info['bads'] = ['Fp1', 'Fp2', 'F7', 'F8', 'T7', 'T8', 'TP9', 'TP10']
include = ['F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'P7', 'P8',
'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6']
picks = mne.pick_channels(channel_names, include=include,
exclude=info['bads'], ordered=False)
tmin= -0.2
tmax = 0.8
custom_epochs = mne.EpochsArray(raw, info, picks, events, event_id)
2019? 5? 22? (?) ?? 10:26, Brunner, Clemens (clemens.brunner at uni-graz.at) <
clemens.brunner at uni-graz.at>?? ??: