Open hoechenberger opened 3 years ago
Friendly ping @agramfort @larsoner, I need advice on how to best approach this :)
I just ran into the same problem with find_ecg_events
with qrs_thresh
set to 'auto'
(default); setting it to 1e-15
fixed it.
Discussion with @agramfort: I'll implement a thresholding at 100 * eps
of the respective dtype.
Hi Richard, can I just check if this only affects data that have non-existent ECG and EOG data? (I'm assuming that is the scenario based on the empty epoch plot above); or spurious ECG/EOG events can also arise at a non-negligible level in a data with present ECG and EOG activity? I am asking because these events are primary to my current work.
Problem description & MWE
Output:
We can even create Epochs …
I assumed this has something to do with the filtering that happens in
find_eog_events()
, so I changed the filter length:Output:
Ok so I thought the problem could be related to small numerical fluctuations during filtering. So I looked at the thresholding we use for peak detection:
And with the following, all went as expected:
Output:
Bingo.
Proposal
thresh
should get a lower boundary, so it cannot become "0." and floating point imprecisions won't trigger peak detection.