mne version 1.3.1
operating system Windows10
Hello, I am using mne.preprocessing.find_eog_events to detect and reject eyeblinks in the data. In some subjects however, it marks the data before the start of the blink and not at the peak. Images attached as example. Below is some of the code I used detect the eog events:
mne_alleeg.set_eeg_reference('average')
mne_alleeg.filter(l_freq=0.3, h_freq=40, picks=['eeg','eog'])
### regress Eyeblink artifact
thresh = (max([max(mne_alleeg.get_data()[0]),max(mne_alleeg.get_data()[1]),max(mne_alleeg.get_data()[2])]) - min([min(mne_alleeg.get_data()[0]),min(mne_alleeg.get_data()[1]),min(mne_alleeg.get_data()[2])])) /100
eog_events = mne.preprocessing.find_eog_events(mne_alleeg, event_id=998, thresh=thresh) #(myevents[0,0]/250)-1 ch_name = 'EOGh',
#check that the threshold is good for each sub
mne.viz.plot_raw(mne_alleeg, events=eog_events, event_color='cyan', n_channels=30)
#make eog epochs
eog_epochs = mne.preprocessing.create_eog_epochs(mne_alleeg, thresh=thresh)
eog_evoked = eog_epochs.average("all")
eog_evoked.plot("all")