'find_eog_events' threshold value

Hi everyone,
I have been using the find_eog_events() function to determine how many eye blinks contain the signal. Specifically, I’m setting as channels in the function ch_name = Fp1 and Fp2

I’m using the DEAP dataset.

Could someone explain what the parameter thresh in this function means? Why is it [max(eog)-min(eog)]/4 by default? Why was 4 chosen?
I read through the documentation, but I am still unsure about these parameters.

Information:

  • MNE version: 1.3.1
  • operating system: Windows 11

Thank you!

Hi @SabCri to the best of my knowledge [max(eog)-min(eog)]/4 is simply a good “rule of thumb” that works reasonably well for most datasets (hence it’s the default value).

You may (and perhaps should) derive a thresh value that fits well for your data. Usually that can be done by trying a few values close to the default, and inspecting how your results change: are the eog events that you capture physiologically meaningful … or are they false positives?

I don’t know who initially set the default for thresh, one would have to dig a bit deeper into the git history for that. The thresh parameter seems to have been added here: [MRG+2] Added threshold option for find_eog_events() and create_eog_epochs() by pmolfese · Pull Request #5461 · mne-tools/mne-python · GitHub

I merely added the thresh option to find_eog_events() as the peak_finder() function that does the heavy lifting for finding them allows a threshold option. I believe peak_finder() always used that [max(eog)-min(eog)]/4 default…

The default threshold doesn’t tend to work great for my EEG data so I always set a value specifically. I’ve pondered other ideas but haven’t committed to putting them into eog.py or autoreject, though perhaps I should.

2 Likes