Peak detection in Python
Calculate the derivation of your sample points, for example for every 5 points (THRESHOLD!) calculate the slope of the five points with Least squares methods (search on wiki if you dont know what it is. Any lineair regression function uses it). And when this slope is almost (THRESHOLD!) zero there is a peak.
In time series we can find peak (min and max values). There are algorithms to find peaks. My question is:
In python are there libraries for peak detection in time series data?
or 
something in R using RPy?