Hello i need to find the fourth valleys in those noisy datas. I tried with find_peaks_cwt from scipy but i didn't succeed. I also try with detect_peaks from here http://nbviewer.ipython.org/github/demotu/BMC/blob/master/notebooks/DetectPeaks.ipynb
Asked
Active
Viewed 777 times
2
-
1How didn't you "succeed"? What exactly did you try? Why didn't it work? Did you look at [this thread](https://stackoverflow.com/questions/25571260/scipy-signal-find-peaks-cwt-not-finding-the-peaks-accurately)? What about [this gist](https://gist.github.com/endolith/250860#file-peakdetect-py)? – wflynny Nov 24 '15 at 21:35
-
To do this you are going to have to define specifically what you mean by peak or valley. For example, how separate should local minimums be from each other for them to be considered "valleys"? How deep do they have to be? etc. It would be nice to see what you've tried. Put some code in your question. – derricw Nov 24 '15 at 21:35
-
if you have troubles differentiating noisy data, you could convolve with a gaussian kernel: http://stackoverflow.com/questions/18991408/python-finite-difference-functions. – Moritz Nov 24 '15 at 23:19
-
Alternatively, you could write a peak finder based on the centroid of a (negative) peak: Intersect your line with a floating average and calculate the centroids between the intersections as `(x*data).sum() / x.sum()` – jojonas Nov 24 '15 at 23:36
-
@razoool [this is a question that could help you...](http://stackoverflow.com/q/19122157/832621) – Saullo G. P. Castro Nov 25 '15 at 01:24