How to define the peaks of a graph?

Hi @joziask, I think I answered a similar question some time ago:

How do you define a peak, that would be the question.

Scipy has actually module for peak detection:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html

A first search on stackoverflow shows some example usages: