Peak finding

Work on finding peaks in 1D curves to support automatic calibration.
is `R*R` and more sensible than `R2`? Perhaps `R^2` would work too?