Peak detection version 3: measuring slopes