I'm trying to find peaks in a series of data akin to how scipy.signal.find_peaks works (ideally by peak "prominence"): give it an array and it returns an array of indices into the data indicating where the peaks are.
Is there existing library code for arduino for this, or do I need to code my own?
(Edit to add: I'm not interested in real-time peak finding, this is a static data set the Arduino has already gathered, so it has plenty of time to go over the data to find peaks. I'm finding some stream-based peak libraries, but that's not what I'm seeking.)
Thank you for the response -- If I understand correctly what it's doing, it won't work; I need real peak detection (with indices and ideally with prominence values), not just finding maximum values in a set.
There is no Arduino library for peak detection, but it is a very important topic, so there is plenty of discussion and code "out there" for you to study. Search phrase "peak detection algorithm".
Thanks @jremington -- I'll get to work on my own version.
To be more clear -- I want peaks as found by the scipy library. That is, an array containing indices that point to peaks, with a configurable number of peaks found, where those peaks are ranked by topographic prominence and returned in descending order of prominence. Sounds like it doesn't exist in library form... too bad, I was hoping to save the time.
Yeah, thanks -- I had thought to do that. I wonder if it might be easier to just DIY it rather than try to parse their code, given my simpler/more restricted needs, but I'll find out soon.