detect_localmaxima function

detect local maxima in univariate time series data