I have the following data, containing a wide spike and a narrow spike:
a = [0,2,6,10,6,2,0,0,0,9,0]
If I run the following:
peaks, properties = find_peaks(a, height=9, prominence=9, width=(0,1), distance=6)
I get a single peak returned, the narrow spike, as expected. However, if I increase the distance to 7, I no longer get any peaks returned which I wasn’t expecting.
So thinking about it, the behaviour I am seeing is that I am returned narrow spikes that are not near taller spikes. However, this is not what I am looking for. I want to find narrow spikes that are not near taller narrow spikes. Is this possible?