This is a Python implementation of the Robust peak detection algorithm.
The initialization and the computational parts are split up, only the filtered_y
array has been kept, that has a maximum size equals to lag
, so there is no memory increase. (Results are the same of above answers).
In order to plot the graph, also the labels
array is kept.