findpeaks icon indicating copy to clipboard operation
findpeaks copied to clipboard

How detect the TOPs?

Open 9kwon opened this issue 3 years ago • 1 comments

Hi, Thank you first for your great library. I am trying to simmulate it with the documents. The problem is there are BOTTOM detections on the graph. I used my data instread of yours and other is the same on the document. Please let me know how to adjust them.

image

9kwon avatar Oct 13 '22 07:10 9kwon

Good point. In the plot, the whitelisting did not work. I updated the plotting function to plot only what is whitelisted. update to the latest version with:

pip install -U findpeaks

from findpeaks import findpeaks
X = [1,1,1.1,1,0.9,1,1,1.1,1,0.9,1,1.1,1,1,0.9,1,1,1.1,1,1,1,1,1.1,0.9,1,1.1,1,1,0.9,1,1.1,1,1,1.1,1,0.8,0.9,1,1.2,0.9,1,1,1.1,1.2,1,1.5,1,3,2,5,3,2,1,1,1,0.9,1,1,3,2.6,4,3,3.2,2,1,1,0.8,4,4,2,2.5,1,1,1]

fp = findpeaks(method='peakdetect', lookahead=1, verbose=3, whitelist=['peak'])
results = fp.fit(X)
fp.plot(xlabel='x-axis', ylabel='y-axis')

Does this solve your issue?

erdogant avatar Oct 14 '22 20:10 erdogant

I am closing this issue. Please reopen if required.

erdogant avatar Jan 11 '23 19:01 erdogant