Building a robust calibration model for heterogeneous spectral data