A method for detecting the presence of at least one compound in a composition to be identified by means of a spectrometer, the method comprising the following steps of: - performing at least one spectrometry measurement of at least one reference sample including said at least one compound and providing from said spectrometry measurement at least one reference spectrum at a first resolution, - identifying, for the or each of the compounds, at least one first peak of interest from said at least one first reference spectrum corresponding to said compound, the peak of interest having a wavelength of interest, - extracting, for the or each compound and the or each peak of interest identified for said compound, first reference characteristic points from said at least one first reference spectrum in a wavelength range of interest corresponding to the at least one first peak of interest and comprising said first wavelength of interest, - performing a spectrometry measurement of the composition to be identified and providing at least one first measurement spectrum, - for the or each compound and for the or each first peak of interest identified for said compound, extracting first measurement characteristic points of the at least one first measurement spectrum in the wavelength range of interest comprising said first wavelength of interest, - for the or each compound and the or each first peak of interest identified, performing a correlation calculation between the first reference characteristic points and the first measurement characteristic points and determining a first correlation value of the composition for said compound and said peak of interest, - detecting the presence or not of the compound in the composition to be identified from the first correlation value obtained for the at least one compound and from the at least one first peak of interest identified for said compound. - performing at least one spectrometry measurement of at least one reference sample including said at least one compound and providing from said spectrometry measurement at least one reference spectrum at a first resolution, - identifying, for the or each of the compounds, at least one first peak of interest from said at least one first reference spectrum corresponding to said compound, the peak of interest having a wavelength of interest, - extracting, for the or each compound and the or each peak of interest identified for said compound, first reference characteristic points from said at least one first reference spectrum in a wavelength range of interest corresponding to the at least one first peak of interest and comprising said first wavelength of interest, - performing a spectrometry measurement of the composition to be identified and providing at least one first measurement spectrum, - for the or each compound and for the or each first peak of interest identified for said compound, extracting first measurement characteristic points of the at least one first measurement spectrum in the wavelength range of interest comprising said first wavelength of interest, - for the or each compound and the or each first peak of interest identified, performing a correlation calculation between the first reference characteristic points and the first measurement characteristic points and determining a first correlation value of the composition for said compound and said peak of interest, - detecting the presence or not of the compound in the composition to be identified from the first correlation value obtained for the at least one compound and from the at least one first peak of interest identified for said compound.