A method of analysis of X-ray spectra in an instrument fits a measured sample spectrum using a combination of at least one measured reference spectrum with at least one calculated function. The method includes measuring a reference spectrum as a plurality of measured values Rpr(i) for a plurality of energy bins i from at least one reference sample; selecting npr region or regions of interest indexed by j corresponding to a plurality of bins i and recording the profile Rprj(i) for the respective plurality of bins from the measured reference spectrum, where npr is a positive integer; measuring a sample spectrum as a plurality of intensity values Rspe(i) for a plurality of energy bins i; and fitting the measured sample spectrum Rspe(i) to a fit function including the at least one profile Rprj(i) in at least one respective region of interest as well as at least one calculated function Rgrj(i).
展开▼