A peak finding algorithm in arrays
Code: "mining_peak_finder.py". Programming language: Python
DMelt Version 1. Last modified: 12/08/2015. License: Pro
https://datamelt.org/code/cache/mining_peak_finder_758.py
To run this script using the DMelt IDE,
copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.
"""
Peak finder algorithm. Given a spectrum and search parameters, performs a digital filter peak search as specified in V. Hnatowicz et al in Comp Phys Comm 60 (1990) 111-125. Setting the sensitivity to a typical value of 3 gives a 3% chance for any peak found to be false.Maximum separation in sigma between peaks is 1.3.
See: https://datamelt.org/api/doc.php/jhpro/tseries/PeakFinder
"""
from jhplot import *
from jhpro.tseries import *
# create input data
spectrum=[10,10,10,10,10,10,10,40,10,10,10,10,10,50,10,11,10,10,10]
p=PeakFinder("test", spectrum, 1.2, 1.2)
mu=p.getPeaks()
print mu.tolist()
You see the box below because you did not login.