I just directly translated to Python from this MATLAB script, which I've also included here. The original is public domain, so my translation is, too.
Also see Frequency estimation methods in Python for interpolating to get sharp intersample peaks
sixtenbe has posted a more powerful version here
and there's a PyPI repo
有关峰值点检测的研究促进这一领域的快速发展,我希望有志之士团结合作共同推进,同时我正在做峰值检测的学术课题,希望与有意者交流探讨,联系方式:[email protected],谢谢