peaks function

Find the proportion of local minima/maxima common to both time series and compute its significance via Monte Carlo randomizations