emazep

Primo valore sopra soglia

Jul 6th, 2022 (edited)
714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def detect_toa(sig, t=0.007797017686042674, dec=0.99):
  2.     while True:
  3.         i = np.argmax(abs(sig)>t)
  4.         if i or abs(sig[0])>t:
  5.             return i
  6.         t *= dec
Add Comment
Please, Sign In to add comment