Skip to main content
. 2022 Dec 5;9(12):769. doi: 10.3390/bioengineering9120769
Algorithm 1: Preliminary Screening Algorithm
Require:
1: sigfull: original signal; sigfiltered: bandpass filtered signal
2: env: Hilbert envelope of smoothed bandpass signal
3: stdata: sigfull 81–500 Hz Stockwell transform
4: fs: Sampling frequency; x: any time; Eol: event of interest
5: threshold: ripple is 30, fastripple is 20
Ensure:
  7: prob=|stdata|2f[81,500]log[stdata] ▷ Relative energy, the ratio of the energy occupied by a certain frequency at that moment
  8: S=f[81,500]log[prob] ▷ Signal energy entropy
  9: if  t[x,x+fs100], sigfull  0.9Smax & sigfiltered 10
10:   baseline  env(t); baselineFiltered  sigfiltered(t)
11:   thr  baseline experience accumulation function 95% threshold
12:   thrFilt  baselineFiltered experience accumulation function 99% threshold
13: end if
14: if  t[x,x+0.02fs], env(t)  0.99thr & env(t)max<threshold
15:   event  env(t)
16:   number  The number of times each event crossed thrFilt
17:   if number 6
18:     Eol  event
19:   end if
20: end if
21: for distance[Eol1,Eol2]<10ms do
22:   Eol1=Eol1Eol2
23: end for