org-arl / arlpy

ARL Python Tools
BSD 3-Clause "New" or "Revised" License
119 stars 37 forks source link

Add detect_impulses() #36

Closed ymtoo closed 4 years ago

ymtoo commented 4 years ago

This function is useful to detect impulses such as snapping shrimp noise.

mchitre commented 4 years ago

What is the advantage of this over find_peaks?

ymtoo commented 4 years ago

detect_impulses first transforms an input signal into envelope and then detects peaks from the signal envelope using find_peaks with minimum peak height defined by multiple of median absolute deviation (robust standard deviation) and minimum time difference between neighbouring impulses in seconds.

It's a specific function of find_peaks with a preprocessing procedure (to get the signal envelope).

mchitre commented 4 years ago

OK, merging