Peak finding

Work on finding peaks in 1D curves to support automatic calibration.
I'm trying to make `line 113` friendlier