find peaks above certain threshold in a curve