Integration of peaks of a spectrum