codZeus
(Kelvin)
January 5, 2024, 4:32pm
1
Hi everyone,
MNE version: 1.0.3
operating system: Windows 11
numpy version: 1.22.4
I am trying to get the Epoch using mne.Epoch but when I use the code snippet below i get an error
infoTopo = mne.create_info(ch_names=chNames[:24], sfreq = sfreq_eeg,ch_types=“eeg”).set_montage(montage, match_case=False)
raw = mne.io.RawArray(soiFltrd[i_f][:24], infoTopo)
raw.set_eeg_reference(projection=True)
eventEEG = array([[ 0., 0., 0.], [251., 0., 1.]])
epochs = mne.Epochs(raw,eventEEG,event_id=None,firstFrame_tMap,lenSoiRaw,proj=True, picks=(“eeg”), baseline=baseline,reject=reject)
I get
events should be a NumPy array of integers, got <class ‘numpy.ndarray’>
Any help will be appreciated. Thanks
richard
(Richard Höchenberger)
January 5, 2024, 6:45pm
2
codZeus:
eventEEG = array([[ 0., 0., 0.], [251., 0., 1.]])
This creates an array of floats. Simply drop the periods after each number and I think it should work. Alternatively, add dtype=int
to the array()
call.
Best wishes,
Richard
codZeus
(Kelvin)
January 5, 2024, 7:15pm
3
Thanks a lot Richard. That worked. I spend hours trying to know what they issue is. However after that, I had another issue saying
“NO GRAD channel found. Cannot reject based on GRAD”.
what do you suggest I do? So I ask ask another question with this issue?
richard
(Richard Höchenberger)
January 5, 2024, 7:26pm
4
Hi, yes, please post a new question for this issue
Thanks!
Richard
1 Like