Analysis of X-ray spectra using fitting
11210366 · 2021-12-28
Assignee
Inventors
Cpc classification
G01N23/223
PHYSICS
G01N23/2252
PHYSICS
International classification
G06F17/17
PHYSICS
G01N23/2252
PHYSICS
Abstract
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 for a plurality of energy bins from at least one reference sample; selecting a region or multiple regions of interest corresponding to a plurality of the energy bins and, for each region of interest, recording the profile for the respective plurality of energy bins from the measured reference spectrum. The method further comprises measuring a sample spectrum as a plurality of intensity values for a plurality of energy bins; and fitting the measured sample spectrum to a fit function, the fit funtion including the at least one profile in at least one respective region of interest of the measured spectrum as well as the at least one calculated function.
Claims
1. A method of measuring one or more components in a measured sample in an instrument adapted to measure X-ray scattering, comprising: measuring, in the instrument, a reference spectrum as a plurality of measured values R.sub.pr(i) for a plurality of energy bins i from at least one reference sample; selecting, by a controller coupled to the instrument, n.sub.gr region or regions of interest from the measured reference spectrum indexed by j corresponding to a plurality of energy bins i and recording, in a data storage by the controller, a profile R.sub.pr.sup.j(i) for the respective plurality of energy bins, where n.sub.pr is a positive integer; measuring, in the instrument, a sample spectrum from the measured sample as a plurality of intensity values R.sub.spe(i) for a plurality of energy bins i; fitting, by the controller, the measured sample spectrum R.sub.spe(i) to a fit function to obtain a fitted sample spectrum; determining, by the controller, the one or more components in the measured sample based upon the fitted sample spectrum; and recording, in the data storage by the controller, the determined one or more components, wherein: the fit function is:
2. A method according to claim 1, wherein there is a single profile (n.sub.pr=1) corresponding to the complete spectrum.
3. A method according to claim 1 comprising measuring the reference spectrum in a plurality of samples and taking as the plurality of measured intensity values of the profile a sum or average of the measurements of the reference spectrum of the plurality of samples.
4. A method according to claim 1 wherein the function Σ.sub.j=1.sup.nP.sub.j(i) is taken as zero.
5. A method according to claim 1 wherein at least one function P.sub.j(i) is a polynomial.
6. A method according to claim 1 wherein the profile modifying function P.sub.pr.sup.j(i) is a polynomial.
7. A method according to claim 1 wherein the profile modifying function P.sub.pr.sup.j(i) is a constant scale factor.
8. A computer program product embodied in a non-transitory computer-readable medium for measuring one or more components in a measured sample, the computer program product adapted when run on a computer connected to and controlling an instrument, which is adapted to measure X-ray scattering, to carry out the steps of: measuring in the instrument a reference spectrum as a plurality of measured values R.sub.pr(i) for a plurality of energy bins i from at least one reference sample; selecting, by the computer, n.sub.pr region or regions of interest from the measured reference spectrum indexed by j corresponding to a plurality of energy bins i and recording, in a data storage by the computer, the profile R.sub.pr.sup.j(i) for the respective plurality of energy bins, where n.sub.pr is a positive integer; measuring in the instrument a sample spectrum from the measured sample as a plurality of intensity values R.sub.spe (i) for a plurality of energy bins i; fitting, by the computer, the measured sample spectrum R.sub.spe (i) to a fit function, to obtain a fitted sample spectrum; determining, by the computer, the one or more components in the measured sample based upon the fitted sample spectrum; and recording, in the data storage by the computer, the determined one or more components, wherein: the fit function is:
9. A computer program product for measuring X-ray spectra according to claim 8, wherein there is a single profiled (n.sub.pr=1) corresponding to the complete spectrum.
10. A computer program product for measuring X-ray spectra according to claim 8, arranged to measure the reference spectrum in a plurality of samples and to take as the plurality of measured intensity values of the profile a sum or average of the measurements of the reference spectrum of the plurality of samples.
11. A computer program product for measuring X-ray spectra according to claim 8 wherein the function Σ.sub.j=1.sup.nP.sub.j(i) is taken as zero.
12. A computer program product for measuring X-ray spectra according to claim 8 wherein at least one function P.sub.j(i) is a polynomial.
13. An apparatus for measuring one or more components in a measured sample, comprising: an instrument adapted to measure X-ray scattering; and a controller adapted to control the instrument, the controller comprising data storage for instructions configured to cause, when executed, the controller to perform steps comprising: controlling the instrument to measure a reference spectrum as a plurality of measured values R.sub.pr(i) for a plurality of energy bins i from at least one reference sample; selecting n.sub.pr region or regions of interest from the measured reference spectrum indexed by j corresponding to a plurality of energy bins i and recording, in the data storage, a profile R.sub.pr.sup.j(i) for the respective plurality of energy bins, where n.sub.pr is a positive integer; controlling the instrument to measure a sample spectrum from the measured sample as a plurality of intensity values R.sub.spe (i) for a plurality of energy bins i; fitting the measured sample spectrum R.sub.spe (i) to a fit function to obtain a fitted sample spectrum; and determining the one or more components in the measured sample based upon the fitted sample spectrum; and recording the determined one or more components in the data storage, wherein the fit function is:
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) For a better understanding of the invention, the invention will now be described purely by way of example, with reference to the accompanying drawings in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
DETAILED DESCRIPTION
(17) For a better understanding specific embodiments will now be described, purely by way of example.
(18) Referring to
(19) It should be noted that
(20) Embodiments fit to measured data not just using the deconvolution approach but also by using simultaneously at least one measured profile, which may be the profile of all or part of the spectrum.
(21) In a first step (10) (see
(22) In an example, a single blank standard can be measured. In other examples, multiple standards can be measured.
(23) In a second step (20), a profile is calculated from the measured data. Each profile is a set of measured values R.sub.pr(i) for energy bins i within a respective region of interest, ROI. In the case where only a single spectrum is measured, over the full measurement range, the profile can simply be a smoothed version of the measured spectrum and the region of interest can be the whole measured spectrum. In this case the profile may have non-zero values for all energy bins.
(24) In cases where other measurements are taken to measure effects in particular energy ranges, then the region of interest will be the region of that particular effect and the profile R.sub.pr(i) will have non-zero values only for values of i within the respective ROI.
(25) In a third step (30), a sample to be measured is introduced into the instrument. The spectrum is measured and recorded as a plurality of intensity values R.sub.spe(i) for a plurality of energy bins i.
(26) Next, a fit is carried out (40). The measured spectrum R.sub.spe(i) is fit to a combination of calculated functions, as in the conventional deconvolution method, together with the measured profiles in the respective region of interest, and optionally one or more further functions P.sub.n(i) which represent other effects that may be fitted.
(27) This may be expressed mathematically as fitting the spectrum R.sub.spe(i) as follows:
R.sub.spe(i)=Σ.sub.j=1.sup.n.sup.
(28) The calculated functions are obtained and fitted using a conventional deconvolution approach with constraints. Examples of this approach are provided in the previously mentioned Handbook of X-ray Spectrometry and so this aspect will not be described further.
(29) Note that the profiles are not simply subtracted from the measurements before fitting. Instead, the profiles are used integrally in the fitting process. The values of the parameters of the profile modifying functions P.sub.pr.sup.j(i) the calculated functions R.sub.gr.sup.j(i), and the functions P.sub.j(i) representing additional physical effects are all fitted in the step of carrying out a fit.
(30) Note that although in general additional physical effects are represented by functions P.sub.j(i), in the simplest case there are no such functions (n=0). In this case the fit is to the fit function:
R.sub.spe(i)Σ.sub.j=1.sup.n.sup.
(31) Further, the use of the shift parameter i.sub.s is also optional—the shift parameter takes into account drifts in the measured energy bins. If the reproducibility of data in energy is sufficiently good, the shift parameter may be omitted (mathematically i.sub.s=0).
(32) The method delivers significant advantages compared with the methods presented in the Handbook of X-ray Spectrometry. No assumptions need to be made in the profiles—they are simply measured. For this reason, even physical processes that cannot be easily modelled can be taken into account and compensated to a large extent.
(33) Further, contributions from spectral contaminations from non-sample related fluorescent or scattering processes are automatically removed from the deconvoluted spectra.
(34) Where one of the profiles corresponds to a blank sample, this may serve as a reference monitor spectrum which can take account of tube or detector degradation, for example caused by deposits of C or W on the anode or effects due to radiation damage. Such effects are particularly prevalent in on-line measurements in which apparatus is in continuous use.
(35) The method is of particular application to the measurement of trace elements, such as contaminants in plastics, traces in oil, pharmaceutical or air filter analysis.
(36) In embodiments, a blank sample may be incorporated into apparatus, for example in a sample holder, to allow the measured profiles to be remeasured on a regular basis, for example daily or hourly.
(37) The measurement works optimally in vacuum, since it does not take into account fluctuations in air pressure.
(38) Note that one or more profile modifying model functions P.sub.prmay be included, for example a polynomial:
P.sub.pr=α.sub.0+α.sub.1(i−i.sub.0)+α.sub.2(i−i.sub.0).sup.2+ (3)
(39) in which i.sub.o is an offset which may be treated as a fitting parameter; the coefficients a may also be treated as fitting parameters. Such a profile modifying function in the form of a polynomial can have a moderate effect on the widths of the peaks and may correct a profile for resolution changes—if the profile in use was measured at an earlier time but the resolution has deteriorated, it is possible to correct for this change using such a modifying polynomial.
(40) The method described here may account for ratio changes between two line peaks. In an example, when using a profile with a particular ratio of the Ka and Kb lines, for example Fe, it may be that the measured ratio of the Ka and Kb lines in the sample does not match the profile. In this case, theoretical model functions (calculated functions R.sub.gr.sup.j(i)) may be introduced for the Fe Ka and the Fe Kb lines. If the Kb line is too strong after scaling the profile for the Ka line, a negative value for the calculated function will allow the calculated value of the theoretical model of the Kb line to become negative and so compensate for the too-strong Kb line after the profile is scaled.
(41) In summary, in a preferred embodiment, the following details are adopted.
(42) During the step (10) the sample that is measured is preferably a properly defined standard i.e. a standard of known repeatable material. Such standards are commercially available.
(43) The measurement time in this step may be adjusted as long as required to obtain a significant reduction in measurement uncertainty in each of the energy bins. Alternatively or additionally, during the step (20) of obtaining at least one profile the measured spectrum may be carefully smoothed. A calculated background may be also subtracted. This step may be automated. The result may be checked for distortions.
(44) After the sample to be measured is measured (step (30)), then the measured data is fit (step (40)) to both the calculated functions R.sub.gr.sup.j(i) as well as the measured profiles R.sub.pr.sup.j(i).
(45) In terms of physical effects represented by the functions P.sub.j(i), these can represent a variety of additional effects that may need to be taken into account, for example additional atomic or nuclear effects such as Bremsstrahlung or Resonant Raman Scattering.
(46) Take, for example, the case of resonant Raman scattering. This effect becomes visible in a spectrum when the energy of a characteristic line is very close to but lower in energy than an absorption edge (e.g. K) of another element. In this case, a tailed distribution is introduced in the fitting model calculated from a doubly differential scattering cross section a as a that can be described using the following formula:
(47)
(48) Another example of a physical effect is in sample induced photoelectron Bremstrahlung background. This can be calculated from a modified form of the original Kramer's formula:
(49)
(50) where K can be a fitted parameter E.sub.0 can be either a constant energy or a fitted parameter and E.sub.i is the energy at a bin with bin number i.
(51) A further example of a function P.sub.j that may be used is an analytic function, generally a polynomial, to fit to the results of a physical effect which has been modelled by means of a detailed Monte Carlo simulation. Another example can be a theoretically calculated response of a Monte Carlo simulation. For example, when measuring oil samples, the scattered profile of the primary excitation spectrum by the dark organic radiation may be calculated by such a Monte Carlo simulation.
(52) Note that although many fitting algorithms use Gaussian functions for the functions R.sub.gr.sup.j(i) other functions may be used, including in particular Exponential tail functions. Other examples include Shelf functions, Voigt functions, and Hypermet functions, the last being linear combinations of Gaussian or Voigt main peaks with exponential tail and shelf functions. These functions are described in the Handbook of X-Ray Spectroscopy referenced above.
(53) Those skilled in the art may also use Lorentzian functions, generally together with Exponential tail or shelf functions, Pseudo Voigt functions, for faster implementation than Voigt functions, Pearson VII functions, or split functions to account for asymmetries. Such functions are known for XRF fitting, or in the case of Pearson or Split functions, for XRD fitting.
EXAMPLES
(54) In the example first presented below, a single profile was used, corresponding to a blank sample.
(55) In this case, a commercial collection of reference samples was used, namely the “ADPOL” collection from Panalytical BV. This is a set of reference samples in the form of polyethylene discs containing the following elements: F, Na, Mg, Al, Si, P, S, Ca, Ti and Zn. There are four samples with varying amounts of these elements to act as standards as well as four blank standards without.
(56) The samples were measured using a Ag tube at 9 kV, 600 μA, using a Ti filter and a silicon nitride window silicon drift detector in a Panalytical E3 X-ray fluorescence analysis apparatus.
(57) This example was chosen because a number of difficulties are presented by such samples using conventional methods.
(58) These difficulties include the fact that the signals for Al, Mg and Si are strongly influenced by the overlapping escape contributions of the scattered Ag lines. Consequentially, an accurate determination of these escape contributions requires an accurate deconvolution of the scattered tube lines. Such an accurate deconvolution is not straightforward since it requires complex “Fundamental Parameters (FP)” based model modifications to account for changes in the atomic line ratios of scattered lines.
(59) Secondly, the fluorescence peaks from P and S are positioned closely to the tail of the Ag L lines and are affected by a wide structure, which may be the result of diffraction effects. Any mathematical definition of the background therefore may result in a calculated component that differs substantially from the underlying component when carrying out measurements.
(60)
(61)
(62) Then, one of the non-blank standards in the commercial ADPOL standard collection was measured. This was then processed in two ways.
(63) By way of a comparative example, a conventional deconvolution approach was used.
(64) Although the conventional method does give reasonable results, in some cases there are significant differences between the fit lines and the raw data which indicates strong deviations and a poor fit—see especially the deviation about 3.4 keV. This means that the fit parameters cannot be treated as wholly reliable. The χ.sup.2 value of 183.9 indicates a poor fit.
(65) Then, a fit using the profile of
(66) In this example, a single profile R.sub.pr is combined with Gaussian functions R.sub.gr the latter describing the effect of the response of characteristic lines, i.e. the fit uses the first two terms of equation (1) above. Even with only a single profile (obtained from measurement) combined with Gaussian functions (obtained by calculation), the results are much better than using Gaussians alone.
(67)
(68) Note further that the method of the invention in which the measured spectrum is included in the fit as a profile is much better than subtracting a blank spectrum and then just fitting the remainder using the conventional deconvolution approach as in the comparative example of
(69) Good results were obtained with other conditions. The above experiments were repeated using 12 kV X-rays, 500 using an A1 filter in the same apparatus.
(70) A further example was then tested, using 50 kV, 200 μA and an Ag filter, with the comparative example presented in
(71) The above examples show that even using only a single profile good results can be obtained.
(72) The method is also applicable to situations where more than one profile gives improved results. This applies in particular where only part of the spectral response has an important effect on the quality of the fit, and therefore a calculated response may be replaced with the measured profile in the region of interest to provide improved results.
(73) A specific example will now be described which relates to measurements of a coating of a pill containing significant quantities of Ti. The organic coating gives a number of peaks—in addition the Ti gives a pair of peaks at approximately 4.5 and 4.95 keV.
(74)
(75)
(76) However, if the raw measured data (labelled unknown) is compared with measured data from a measured standard (labelled standard) then the line fit in the range 4 to 5 keV, corresponding to bins 480 to 650, is very good. See
(77) Therefore, in a method according to an embodiment, in order to correctly fit to the measured spectrum (unknown) a smoothed version of the measured standard is used as the profile in a region of interest that is, in this example, not the whole of the measured range but in this case the region of interest is the range of bins 480 to 650 (approximately 3.8 to 5.2 keV)—corresponding to the two Ti peaks. This smoothed measured spectrum used as a profile is illustrated in
(78) This profile is used instead of the calculated values from the standard background algorithm and Ti peak functions within this energy range (bins 480 to 650) to fit to the original unknown spectrum. Outside this energy range, the original fitting algorithm is used, i.e. outside the range of bins from 480 to 650, the fit is to a calculated function.
(79) The results are illustrated in
(80) In addition if a signal of V is hidden under the Ti-Kb peak and since minimization is not selective, non-fitted parts of the spectrum will influence the results obtained for this element as well By using a measured spectrum, not a calculated spectrum in the range of the Ti peaks, such effects can be taken care of without requiring the user to be aware of the underlying mechanism.
(81) Thus, referring to the general equation (1) above, only one line group is fitted using a profile, which is not offset, so n.sub.pr=1, P.sub.pr.sup.j(i) reduces to 1, and j only takes the value 1. Thus, the term Σ.sub.j=1.sup.n.sup.
(82) The remaining composition of the organic coating is not represented by such a measured profile but by calculation. In this example, n.sub.gr=7 and each term in the equation Σ.sub.j=1.sup.n.sup.
(83) The background in this example is precalculated. The precalculated background is added to the fitting model, so there is one additional function P.sub.j representing the background physical effect.
(84) Thus, in this example the region of interest for the use of the measured reference spectrum is not the whole spectrum, as in the example of
(85) By fitting the energy range of the Ti peaks using a measured spectrum, rather than fitting to calculated functions as used for the peaks of trace elements in the organic matrix spectrum, an improved fit can be obtained.
(86) This approach is not limited to this measurement but may be used in a wide variety of scenarios. For example, this same method may be used in particular to the measurement of A1 in low concentrations in a glass (SiO.sub.2) matrix.