\(SPKI = 0.125\,PEAKI + 0.875\,SPKI\) for signal peaks and the
same 1/8 recursion for noise, with detection threshold
\(NPKI + 0.25(SPKI - NPKI)\) floating between them. Mirrors
morie.fn.rng190.
Examples
morie_pan_tompkins_update(c(1, 1, 0.05), SPKI = 1, NPKI = 0.05)$threshold
#> [1] 0.2875
