Peak finding

Work on finding peaks in 1D curves to support automatic calibration.
I think better to use dist_sample instead of d , because of d spacing