Python findpeaks–find maxima of data with adjacency condition

If you’re looking for a Python function that works like Matlab’s “findpeaks” checkout SciPy argrelmax.

Note: since writing this I’ve come across a more detailed discussion of Python vs. Matlab vs. Octave with code.

Here is a comparative example between Python, Octave, and Matlab. The example does not demonstrate the need to filter the data in the case of highly noisy data, which may be accomplished with a Savitzky-Golay filter.

data with peaks found by findpeaks() highlighted
Matlab findpeaks().
data with peaks found by findpeaks() highlighted
Python findpeaks.