Optimising spectral calibration