the invention relates to an automatic calibration method related to spectra of a spectrometer for examining substances in the pharmaceutical , chemical , cosmetic , dye , plastics , rubber , and foodstuff industries .