Skip to content

Instantly share code, notes, and snippets.

@dusita
dusita / peakdetect.py
Created Aug 10, 2011 — forked from endolith/peakdet.m
Peak detection in Python
View peakdetect.py
import sys
from numpy import NaN, Inf, arange, isscalar, asarray
def peakdet(v, delta, x = None):
"""
Converted from MATLAB script at http://billauer.co.il/peakdet.html
Currently returns two lists of tuples, but maybe arrays would be better
function [maxtab, mintab]=peakdet(v, delta, x)