i Comparative Study of Energy Dispersive X-ray Spectrum Deconvolution: PyMCA and WinAxil A Thesis Submitted to the Department of Nuclear Sciences & Applications GRADUATE SCHOOL OF NUCLEAR AND ALLIED SCIENCES UNIVERSITY OF GHANA By NYANTAKYI YAW TWUM BANNOR (10396011) In Partial Fulfilment Of The Requirements For The Award Of MASTER OF PHILOSOPHY APPLIED NUCLEAR PHYSICS JULY, 2015 University of Ghana http://ugspace.ug.edu.gh ii DECLARATION I hereby declare that with the exception of references to other people‟s work which have duly been acknowledged, this thesis is the result of my own research work and no part of it has been presented for another degree in this University or elsewhere. ……………………………………… ……………………………… NYANTAKYI Y. T. BANNOR Date (10396011) I hereby declare that the preparation of this project was supervised in accordance with the guidelines of the supervision of thesis work laid down by the University of Ghana. ………………………………… ……………………………… REV. DR. S. AKOTO BAMFORD DR. FRANCIS G. OFOSU (PRINCIPAL SUPERVISOR) (CO-SUPERVISOR) ………………………………… …………………………………. Date Date University of Ghana http://ugspace.ug.edu.gh iii DEDICATION I dedicate this thesis to my mother and late father, to my sister and brothers, to my benefactors and finally to all teachers past and present. University of Ghana http://ugspace.ug.edu.gh iv ACKNOWLEDGEMENT I am very thankful to God Almighty for giving me the strength and edge to take up this study. My sincere gratitude goes to my supervisors, Rev. Dr. Samuel Akoto Bamford and Dr. Francis Gorman Ofosu for their tolerance, encouragement, priceless advice and kind supervision. I am also thankful to Dr. Christian Nuviadenu for his advice and assistance in helping get acquainted with the PyMCA software. Finally, my profound gratitude goes to Dr. V. A. Sole, the developer of the PyMCA software for his prompt response to all my queries regarding the software. University of Ghana http://ugspace.ug.edu.gh v Table of Contents DECLARATION ....................................................................................................................... ii DEDICATION .......................................................................................................................... iii ACKNOWLEDGEMENT ........................................................................................................ iv ABSTRACT ............................................................................................................................. vii LIST OF TABLES .................................................................................................................. viii LIST OF FIGURES .................................................................................................................. ix CHAPTER ONE ........................................................................................................................ 1 INTRODUCTION ..................................................................................................................... 1 1.1 Background .................................................................................................................... 1 1.2 Problem Statement......................................................................................................... 3 1.3 Objectives ....................................................................................................................... 3 1.3.1 Main Objective ........................................................................................................ 3 1.3.2 Specific Objectives .................................................................................................. 4 1.4 Relevance and Justification ........................................................................................... 4 1.5 Scope and Definition ...................................................................................................... 4 CHAPTER TWO ....................................................................................................................... 5 LITERATURE REVIEW .......................................................................................................... 5 2.1 Linear Least Squares Fitting ........................................................................................ 5 2.2 Non-linear Least-Squares Fitting ................................................................................. 7 2.2.1 Function Linearization Method ............................................................................. 8 2.2.2 Gradient Method ................................................................................................... 10 2.2.3 Marquardt Algorithm........................................................................................... 11 2.3 Function Used for Fitting X-ray Spectra ................................................................... 12 2.3.1 Peak Shape ............................................................................................................. 12 2.3.2 Tailing .................................................................................................................... 14 2.4 Background Component of the Fitting Model .......................................................... 15 2.5 Background Estimation of X-ray Spectra ................................................................. 16 2.5.1 The Iterative Stripping Algorithm ............................................................... 17 2.5.2 Parabolic Envelope Approximation ............................................................. 18 2.6 Background compensation methods .......................................................................... 19 2.7 Spectrum Evaluation ................................................................................................... 28 CHAPTER THREE ................................................................................................................. 37 METHODOLOGY .................................................................................................................. 37 3.1 Software ........................................................................................................................ 37 3.2 WinAxil ......................................................................................................................... 37 University of Ghana http://ugspace.ug.edu.gh vi 3.3 PyMCA ......................................................................................................................... 38 3.3.1 Adaptation of PyMCA to X-ray tube excitation sources ................................... 39 3.4 Peak Intensities............................................................................................................. 40 3.5 Sensitivity Calibration ................................................................................................. 41 3.6 Quantitative Analysis................................................................................................... 41 CHAPTER 4 ............................................................................................................................ 43 RESULTS AND DISCUSSION .............................................................................................. 43 4.1 Intensities .................................................................................................................. 43 4.2 Sensitivity Curves ..................................................................................................... 44 4.3 Quantitative Analysis ............................................................................................... 46 4.3.1 Peak Intensities .................................................................................................. 46 4.3.2 Elemental Concentrations ................................................................................ 49 CHAPTER 5 ............................................................................................................................ 52 CONCLUSION & RECOMMENDATIONS .......................................................................... 52 5.0 Conclusion .................................................................................................................... 52 5.1 Recommendations ........................................................................................................ 52 APPENDIX A .......................................................................................................................... 54 APPENDIX B .......................................................................................................................... 65 APPENDIX C .......................................................................................................................... 92 REFERENCES ........................................................................................................................ 96 University of Ghana http://ugspace.ug.edu.gh vii ABSTRACT A comparative study of spectrum deconvolution and quantitative analysis between PyMCA & WinAxil has been undertaken. Standard spectra of X-ray Kα lines (Ti, Fe, Co, Ni, Cu, Zn, As, Sr & Y) & Lα lines (Ce, Sm, Dy, Ta, W, Hg & U) were fitted with both software; also spectra of three soil samples were fitted with both software. Intensities of the elements of the standard spectra were obtained from the results of the fitting using both software and comparisons were made separately for both Kα & Lα lines between the two software. Sensitivity calibrations were done for both Kα & Lα lines and comparisons between the two software were also made. The intensities of the spectra of the three soil samples obtained from fitting using both software were also compared. Quantitative analysis of the spectra of the three soil samples was performed and the concentrations of the elements obtained using both software were compared. A simple manual for spectrum fitting and quantitative analysis using PyMCA has been written for first-time users of the software (PyMCA); a flowchart for the manual has also been prepared. Comparison of intensities for Kα elements showed excellent agreement between the two software. The intensities of Lα elements obtained also compared favourably. Comparison of the concentrations of the elements in the spectra of the three soil samples showed excellent agreement. The X-ray spectrum fitting capabilities of PyMCA compare favourably with those of WinAxil. The development of WinAxil has been discontinued; therefore, PyMCA when appropriately adapted can be used in place of WinAxil for qualitative and quantitative analysis for spectra from X-ray tube excitation sources. University of Ghana http://ugspace.ug.edu.gh viii LIST OF TABLES Table A1 Peak Areas of Kα lines…………………………............................54 Table A2 Peak Areas of Lα lines……………………………………………54 Table A3 PyMCA Kα elemental sensitivities………………………….........55 Table A4 PyMCA Lα elemental sensitivities……………………………….55 Table A5 WinAxil Kα elemental sensitivities…………………....................55 Table A6 WinAxil Lα elemental sensitivities………………………….........56 Table A7 Peak Intensities of Kα lines……………………………………….56 Table A8 Peak Intensities of Lα lines……………………………………….56 Table A9 Peak Areas of soil sample spectrum GDGA2-45……....................57 Table A10 Peak Areas of soil sample spectrum GDGA3-45……....................58 Table A11 Peak Areas of soil sample spectrum GDGA4-45…………………59 Table A12 Peak Intensities of soil sample spectrum GDGA2-45.....................60 Table A13 Peak Intensities of soil sample spectrum GDGA3-45…………….61 Table A14 Peak Intensities of soil sample spectrum GDGA4-45…………….62 Table A15 Elemental concentrations of soil sample spectrum GDGA2-45…..63 Table A16 Elemental concentrations of soil sample spectrum GDGA3-45…..64 Table A17 Elemental concentrations of soil sample spectrum GDGA4-45…..64 University of Ghana http://ugspace.ug.edu.gh ix LIST OF FIGURES Fig. 2.1 Spectrum showing background subtraction by the cubic spline interpolation method…………………………………...............23 Fig 2.2 Spectrum showing background subtraction by the peak stripping method………………………………………………………….23 Fig 2.3 Background with a high curvature…………………..................28 Fig 3.1 Fitted Ti standard spectrum with WinAxil…………………….38 Fig 3.2 Fitted Ti standard spectrum with PyMCA……………..............39 Fig 3.3 Adaptation of PyMCA to X-ray tube excitation sources……... 40 Fig 4.1 Kα plot of PyMCA intensities against WinAxil intensities……43 Fig 4.2 Lα plot of PyMCA intensities against WinAxil intensities…....44 Fig 4.3 Sensitivity curves of PyMCA and WinAxil for Kα elements…45 Fig 4.4 Sensitivity curves of PyMCA and WinAxil for Lα elements….45 Fig 4.5 Plot of PyMCA Intensities against WinAxil Intensities for soil sample spectrum GDGA2-45………………………………………….47 Fig 4.6 Plot of PyMCA Intensities against WinAxil Intensities for soil sample spectrum GDGA3-45………………………………………….48 Fig 4.7 Plot of PyMCA Intensities against WinAxil Intensities for soil sample spectrum GDGA4-45………………………………………….48 Fig 4.8 Plot of PyMCA Concentration against WinAxil Concentration for soil sample spectrum GDGA2-45…………………………………49 Fig 4.9 Plot of PyMCA Concentration against WinAxil Concentration for soil sample spectrum GDGA3-45…………………………………50 Fig 4.10 Plot of PyMCA Concentration against WinAxil Concentration for soil sample spectrum GDGA4-45………………………………….50 Fig. B1 PyMCA interface………………………………………………65 Fig. B2 Opening a spectrum file………………………………………..66 Fig. B3 Opening a spectrum file………………………………..............67 Fig.B4 File selection………………………………………...................68 Fig B5. File selection from a different drive………………...................68 University of Ghana http://ugspace.ug.edu.gh x Fig.B6a Linear scale of a spectrum file…………………………………69 Fig.B6b Logarithmic scale of a spectrum file…………………...............69 Fig. B7 Beginning energy calibration…………………………...............70 Fig. B8 MCA Calibration Widget interface……………………..............71 Fig. B9 Peaks to be used for energy calibration………………................72 Fig. B10 Selection of first peak for energy calibration…………................72 Fig. B11 Pop-up menu for selection of elements & energies……………..73 Fig. B12 Selection of first line for energy calibration ……………………73 Fig. B13 Selection of second peak for energy calibration…………...........74 Fig. B14 Entering parameters of second peak……………………..............74 Fig. B15 Peak selection for energy calibration completed………………...75 Fig. B16 Activation of energy calibration in spectrum file………..............76 Fig.B17 Channel numbers replaced with energy………………….............76 Fig. B18 Loading an existing calibration…………………………..............77 Fig. B19 Activating an existing calibration…………………………..........78 Fig. B20 Selection of Advanced fit option…………………………............79 Fig. B21 MCA Advanced Fit screen (Linear view/Channel view)…...........79 Fig. B22 MCA Advanced Fit screen (Logarithmic/Channel view)…..........80 Fig. B23 MCA Advanced Fit screen (Logarithmic/Energy view)…….........80 Fig. B24 Selection of background fitting parameters………………….........81 University of Ghana http://ugspace.ug.edu.gh xi Fig B25 Selection of experimental parameters under which spectrum was generated…………………………………………………….........82 Fig. B26 PyMCA adaptation for X-ray tube excitation sources………........83 Fig. B27 Selection of elements to be fitted……………………………........84 Fig. B28 Selection of multiple elements to be fitted……………………......85 Fig. B29 Selection of attenuators present……………………………….......86 Fig. B30 Entering incident & reflected angles…………………………........86 Fig. B31 Entering necessary parameters for concentration calculation……..87 Fig. B32 Fit results……………………………………………………..........88 Fig. B33 Table of Fit results…………………………………………………88 Fig. B34 Identification of missing energies………………………………….89 Fig. B35 Peak identifier screen………………………………………………89 Fig. B36 Portion of HTML report……………………………………………90 Fig. B37 Viewing a larger graphic display……………………………….......90 Fig. B38 Normal graphics display……………………………………………91 Fig. B39 Periodic table with X-ray properties of indicated element (Fe) to the right…………………………………………………………………91 University of Ghana http://ugspace.ug.edu.gh 1 CHAPTER ONE INTRODUCTION 1.1 Background Energy-dispersive X-ray fluorescence spectrometry (EDXRF) is the analytical method of choice for the scientific community because sample preparation is easy and it can detect multiple elements simultaneously. EDXRF is a non-destructive analytical technique and has reasonable sensitivity when compared with other analytical methods (Ofosu, 1995). It has found widespread application in fields such as geology where it is used in the characterization of rocks, ores and soils, in art, archaeology, forensics and has proven to be of value in the analysis of environmental samples. It basically involves qualitative analysis, determination of characteristic peak intensities and quantitative analysis. Qualitative analysis involves the identification of elements present in the sample; the determination of characteristic peak intensities is usually performed using an algorithm within a multichannel analyzer or by means of a software using least-squares fitting procedure whilst quantitative analysis involves the evaluation of intensities and the calculation of elemental concentrations from the evaluated intensities. Qualitative analysis is generally not a problem because every element in a sample is represented by a few characteristic X-ray lines. In particular, qualitative analysis is carried out by using an energy calibration obtained with standards for Kα and Lα X-ray lines. Before quantitative analysis can be done, the X-ray spectra from the sample must be fitted; this is achieved by using the appropriate software. The core of the software package for EDXRF University of Ghana http://ugspace.ug.edu.gh 2 spectrometric analysis consists of a spectrum analysis program that performs deconvolution of X-ray spectra by means of the optimization of a mathematical model to experimental data. Two software currently available for the determination of characteristic peak intensities are PyMCA and WinAxil. PyMCA implements most of the needs for data visualisation and analysis of x-ray spectra. The code can be used as a visualisation tool as well as a full featured data analysis program. Spectrum analysis can be performed in a simple mode with automatic peak search or in an advanced mode where the code will search for a predefined list of elements. The code deals with data calibration, different background and peak shape models, theoretical peak ratios, pile-up and escape peak corrections. The code is written in Python but it is available in Unix and Windows. Despite being at its early stages, PyMCA and its fitting engine already implement most of the needs of x-ray fluorescence spectroscopy. It is fast (~1 second per complex spectrum with < 1 GHz processors), portable (it already runs on Solaris, Linux and Windows) and can be freely distributed. Current developments are focused on the implementation of alternative continuum algorithms (Sole, 2015). WinAxil is written in C++, except for some analysis subroutines, which are written in FORTRAN. WinAxil is a modular software system. This system can read experimental X-ray spectra in IAEA format and old MS-DOS QXAS model files (.INP) as well as write standard results file (.ASR) for further processing with MS-DOS QXAS quantitative analysis package. It is used for spectra which have been produced as a result of sample excitation by X-ray tubes as well radio-isotopes. University of Ghana http://ugspace.ug.edu.gh 3 1.2 Problem Statement Most software for spectrum fitting is commercial; commercial software for EDXRF is expensive, mostly equipment-related and not user-friendly. In developing countries, owing to financial constraints, it is difficult to obtain commercial software for x-ray spectrum deconvolution. The only freeware (software that can be obtained free of charge online) that has been extensively used is the IAEA-sponsored software package QXAS which contains the software AXIL. It (AXIL) has proven to be as equally good as commercial software used for x-ray spectrum deconvolution. Development of QXAS has been discontinued and there still exist inherent difficulties and limitations in the software. There is the need to have freeware software that is as good as AXIL and compares well with results obtained from AXIL. Freeware software that has come up recently is PyMCA, which was originally designed for spectrum deconvolution of synchrotron radiation. However, not much information and guidance is available in the public domain for first-time and inexperienced users of PyMCA. This freeware software is platform- independent (Linux, Windows, MacOS X) and is freely available for non-commercial use developed by the European Synchrotron Radiation Facility (ESRF) (Sole et al., 2007). 1.3 Objectives 1.3.1 Main Objective Since synchrotron radiation sources also produce x-rays, this thesis seeks to determine if the results of PyMCA used for spectrum deconvolution of x-rays from x-ray tubes will compare well with software specifically designed for tube-excited x-ray sources. University of Ghana http://ugspace.ug.edu.gh 4 1.3.2 Specific Objectives The specific objectives of this thesis are: a. to compare spectrum fitting capabilities of PyMCA with WinAxil, b. to investigate the conditions for adapting PyMCA to other X-ray excitation sources such as X-ray tubes. 1.4 Relevance and Justification When successfully completed, this work will validate the extension and utilization of PyMCA to other X-ray excitation sources. This means PyMCA can be recommended for use in place of AXIL/QXAS in developing countries where they may be difficulty in acquiring commercial X-ray analysis software. 1.5 Scope and Definition Before quantitative analysis is performed in EDXRF, spectrum fitting has to be done to extract X-ray peak intensities; this work is to compare the spectrum fitting capabilities of both PyMCA and WinAxil for different X-ray spectra. The excitation source to be considered will be X-ray tubes. University of Ghana http://ugspace.ug.edu.gh 5 CHAPTER TWO LITERATURE REVIEW 2.1 Linear Least Squares Fitting If we have a number of experimental data points ( ) and we want to fit these points by the best straight line: ( ) ( ) (2.1) least-squares fitting means that we obtain values and in such a way that the sum of the square differences between the measured data and the calculated ( ) is minimal. The objective is to find ( ) such that ( ) ∑ ( ( )) (2.2) The weights are related to the counting statistics errors in by the relation (2.3) is the chi-square function of the two variables and . The minimum of can be found by setting its partial derivatives with respect to and to zero and calculating the values of and . So and . (2.4) University of Ghana http://ugspace.ug.edu.gh 6 This leads to a system of equations with unknowns ∑ ( ) (2.5) ∑ ( ) Solving these two linear equations yields the values of and . In matrix form, this linear system of order 2 can be written as: [ ∑ ∑ ∑ ∑ ] 0 1 [ ∑ ∑ ] (2.6) In general for any fitting function which is linear in its parameters : ( ) ( ) ( ) ( ) (2.7) The optimum parameters for the fitting function to fit best the experimental data are obtained by solving the linear system: (2.8) where ∑ ( ) ( ) University of Ghana http://ugspace.ug.edu.gh 7 and ∑ ( ) ( ) ( ) 2.2 Non-linear Least-Squares Fitting If we consider the case when we want to fit a different set of points with a Gaussian plus a background, ( ) [ . / ] (2.9) where ( ) then the set of equations resulting from setting the partial derivatives to zero with respect to its parameters is non-linear. University of Ghana http://ugspace.ug.edu.gh 8 Therefore for a non-linear function, must be minimized in an iterative way: changing the parameters at each iteration in an intelligent way and reducing until reaching the minimum. The iterative method implemented by WinAxil is based on the Marquardt algorithm. This method combines the linearization of the function with a gradient search to ensure convergence (Tchantchane, 1993). 2.2.1 Function Linearization Method In the case of function linearization, ( ) ( ) at the kth iteration is expanded to first order Taylor expansion as a function of the parameters that is: ( ) ( ) ∑ ( ) ( ) (2.10) setting ( ) where is the value of the parameter vector at iteration k. The result is a function which is linear in the parameter increments ( ) such that ∑ 0. ( )/ ( ) ( ) 1 (2.11) Following the standard method of linear least squares, the can be minimized with respect to each parameter . University of Ghana http://ugspace.ug.edu.gh 9 This yields a set of simultaneous linear equations; in matrix form at the kth iteration, we have: [ ∑ ∑ ∑ ∑ ] [ ] [ ∑ ( ( )) ∑ ( ( )) ] (2.12) The increments in each parameter are added to the previous estimation to get a new one ( ) at iteration : The above procedure is repeated until the last iteration yields a small or at some other stopping criteria (setting a maximum number of iteration or when only a very small change in the value is obtained). The disadvantage of this analytical method based on expanding the fitting function ( ) with respect to its parameters is that while it converges quite rapidly to the minimum from points nearby, it cannot be relied on to approach the minimum with accuracy from an initial guess outside the region where the fitting function can be University of Ghana http://ugspace.ug.edu.gh 10 adequately represented. Therefore, this method is known to diverge if the initial guess of the fitting parameters is chosen far off from the minimum (Tchantchane, 1993). 2.2.2 Gradient Method In the gradient method, we simply step off from the current trial value in the direction of the negative gradient of controlling the step size carefully in order to assure the decreasing behaviour in the thus ensuring convergence. . / [ ∑ ( ( )) ∑ ( ( )) ] The new trial ( ) is obtained from the previous trial using: ∑ ( ( )) This method has a very slow convergence property and suffers very much as the search approaches the minimum. University of Ghana http://ugspace.ug.edu.gh 11 2.2.3 Marquardt Algorithm This algorithm combines the best features of both the gradient search algorithm and the method of linearizing the fitting function. The broad outline of the algorithm is that at the iteration the matrix and the vector given above are constructed and the system: where ( ) is solved. If is small, ( ) this algorithm reduces to the problem of function linearization. In the case of being large, the diagonal terms of the matrix dominate which degenerates into separate equations ( ) ( ) Thus the factor in Marquardt algorithm is used to perform an optimum interpolation between function linearization(as gets smaller) and gradient search direction(as gets larger): at each iteration the new is tested; if it is reduced the iteration is said to be successful otherwise the same iteration is repeated while increasing the parameter until the new is decreased. After each successful iteration is decreased in order to speed up the convergence. University of Ghana http://ugspace.ug.edu.gh 12 2.3 Function Used for Fitting X-ray Spectra The fitting function is a model which must represent well the observed spectrum. The result of such a fit is an optimal estimate of a number of parameters (peak areas, energy, resolution, and background). An ideal fitting function must take into account every detail in the spectrum such as the peak shape, the form of the background, deviation from the pure Gaussian shape, peak interference, absorption effects and anomalies in the relative intensities. However, on the other hand, the fitting function describing accurately the spectrum must also be chosen in such a way to minimize the number of variable parameters required to be determined (Tchantchane, 1993). 2.3.1 Peak Shape The primary contribution to the photo peak in a semiconductor detector is a Gaussian distribution. Therefore the spectral contribution of an element can be considered as composed of a number of Gaussians (nG): ∑ [ ( ) ] ∑ ( ) (2.13) where University of Ghana http://ugspace.ug.edu.gh 13 It should be noted that three parameters per peak have to be optimized and peak interferences and overlaps cannot be resolved. A considerable reduction in the number of parameters is obtained by using the relations between energy on the one hand, and peak position and width on the other hand. The position and width are not determined for every peak separately. Instead, the energy and the resolution calibration constants ( to ) are used to determine them. The position and width are determined according to the relations: (2.14) (2.15) where The inclusion of this relation causes a drastic reduction in the number of unknowns and it also brings a substantial increase in the accuracy of the least-squares fit since the optimization of the calibration parameters allow to correct for small variations in energy and calibration. University of Ghana http://ugspace.ug.edu.gh 14 A further reduction in the number of parameters is obtained by treating a group of lines as a unit; that is, only one net peak area ( ) is determined for each group. Lines within a group have fixed intensity ratios during the fit. This is possible because of the relative intensities that exist between lines of a certain element ( and ) or between the lines ( , and ).Thus the yield related to an element is best described as: ∑ [ ( ) ] ∑ ( ) (2.16) where ( ) Further, grouping a series of lines is an optimum way to resolve overlapping between and lines of neighbouring elements or during the interference between and lines of heavy and light elements respectively. 2.3.2 Tailing Deviation from photo peak Gaussian shape can be important, particularly in the lower region ( ) and may give rise to large errors if not considered. This is due to many factors (Auger transitions, incomplete charge collection in the detector). In AXIL, a numerical correction is added to each channel , for intense peaks ( ). For each element, a total array is saved in the AXIL library and added to each channel . This correction is multiplied by the height of the peak during the fitting process (Tchantchane, 1993). University of Ghana http://ugspace.ug.edu.gh 15 2.4 Background Component of the Fitting Model Various approaches have been employed to deal with the continuum background. The first and most common approach is to use a suitable analytical function ( ) with the smallest possible number of free parameters to simulate the background; various such models have been proposed. When only a limited spectral region is being fitted, ( wide), a linear polynomial is sufficient to model the background shape: ( ) ∑ ( ) (2.17) where ( ) To model the more complex background shape of an entire spectrum, an exponential background polynomial can be employed, optionally modified to account for attenuation effect (Fiori et al, 1981, van Espen et al, 1977): ( ) ∑ ( ) (2.18) In this case, some of the parameters can be kept constant while others can be varied. The complete fitting model is then obtained by adding the background model ( ) to the peak model ( ). The top-hat filter technique is frequently used in X-ray emission analysis with electron microprobes (Schamber (1979).In this approach, a simple mathematical filtering operation, is applied which effectively removes low-frequency components, i.e. the continuum background from raw spectral data. The resulting spectrum is then fitted with a similarly-filtered model spectrum that contains only peaks of pure element standards. University of Ghana http://ugspace.ug.edu.gh 16 2.5 Background Estimation of X-ray Spectra Several approaches are possible for the estimation or modelling of the continuum background in X-ray spectra, depending on the kind of spectra being processed and the kind of spectral information one is interested in. One, the polynomial modelling technique is generally applicable and flexible; however, it has several disadvantages. Since the parameters of the background function are determined simultaneously with the rest of the parameters of the fitting model during the chi-squared-minimalisation procedure, this method of background estimation cannot be employed in situations where fitting of the spectra is unnecessary, unwanted or impossible. Also, as the background shape is the result of a large number of different processes of varying nature(such as scattering, bremsstrahlung, incomplete charge collection, peak tailing, absorption), often smooth mathematical functions such as polynomials are either unsatisfactory to model the complex background shape accurately, resulting in either overestimation or underestimation of some of the peak areas. Moreover when non-linear modelling functions are used, the fitting algorithm must be provided with approximately correct starting values of the non-linear coefficients in order to converge to a meaningful solution. Many of the limitations cited above do not arise if some iterative mathematical technique is used to remove peaks and progressively reduce the spectrum to the background continuum. The resulting continuum can then be used along with the peak model in conducting the least-squares fit, or it can be subtracted from the spectrum prior to fitting. Recently, two non-polynomial background estimating methods have been proposed University of Ghana http://ugspace.ug.edu.gh 17 (Ryan et al, 1988) both of which only require the spectral data as input, without a prior knowledge of the type of excitation used or the location of the peaks. 2.5.1 The Iterative Stripping Algorithm By iteratively suppressing the channels that contain peak information, the shape of the background can be determined. The algorithm involves three steps. First, the spectrum is compressed, i.e. the number of channels is reduced while all the relevant information concerning the background shape is preserved. Secondly, the actual iterative stripping procedure is executed. Finally, the resulting compressed background is re-expanded, resulting in the background spectrum. Since the information concerning the continuous background is uniformly distributed throughout a spectrum, whereas data regarding the characteristic peaks are concentrated in a number of selected regions, it is unnecessary to involve all channels of the spectrum in the background estimation process. Since the performance of the stripping algorithm depends on the peak width, a selective spectrum compression is performed prior to the actual peak stripping. For X-ray spectra, the compressed spectrum is typically obtained by selecting every second channel of the original spectrum in the energy region below . Between and , one in every five channels is retained while above , only one out of ten channels is used. More channels are selected in the low-energy regions of the spectrum where the background may be complex in shape. Near a peak top, the first derivative of a spectrum changes sign abruptly, resulting in a large negative value of the second derivative, while in parts of a spectrum where no peaks University of Ghana http://ugspace.ug.edu.gh 18 occur, only small values of the first and second derivatives are obtained. The stripping algorithm takes advantage of this difference by calculating for each channel in the spectrum or in a specified region of interest (ROI) the mean channel content : (2.19) and by applying the following substitution: if (2.20) if After the iterative stripping, the actual background spectrum is obtained by copying all the channel contents of the compressed background estimate to their approximate places in the expanded spectrum and calculating the contents of the interlining channels by means of linear interpolation. 2.5.2 Parabolic Envelope Approximation With this method, the background is modelled as an envelope of a family of parabolas. Since the background is a slowly varying structure, it can be considered to be composed of objects which are several times broader than the X-ray peaks. Moreover, as the amplitudes of X-ray peaks are always positive, the value of the background can nowhere exceed the value of the spectrum itself. Thus, in each channel of the spectrum, a downwards concave parabola University of Ghana http://ugspace.ug.edu.gh 19 ( ) ( ) 0 ( ) ( ) 1, (2.21) just touching the spectrum from below can be considered. ( ) represents the amplitude of the parabola (i.e. its height) and and are parameters by which the width of the parabola can be adjusted. Using the condition that for each channel , the parabola‟s ( ) can nowhere exceed the spectrum ( ) (which represents the number of counts in channel of the original spectrum, after elimination of statistical fluctuations), their amplitudes ( ) are determined: ( ) 0 ( ) . ( ) ( ) /⁄ 1 (2.22) and a first approximation to the background ( ) can be obtained as the envelope of these parabolas: ( ) 0 ( ) . ( ) ( ) /⁄ 1 (2.23) If calculated in this way, the background ( ) never exceeds the spectrum, however, under the peaks it sometimes appears to be overestimated, especially if these peaks are situated on a slope (Tchantchane, 1993). 2.6 Background compensation methods X-ray fluorescence (XRF) is a well-established surface analysis technique (Ang et al., 2003, Schlotz et al., 2000, Janssens et al. 1986). By measuring the fluorescence spectral peak positions and the net peak areas, it is possible to determine which elements are in the sample and the contents of these elements. However, the background can affect the measurement. During analysis, two main sources may produce a background signal in the spectrum. The first is scattering, including Compton scattering and Rayleigh scattering, University of Ghana http://ugspace.ug.edu.gh 20 which is caused by the interactions between the continuous spectrum of the X-ray tube and the sample. The second is the interaction between the characteristic X-rays of the sample and the detecting instrument, including internally generated instrument noise. Especially in the detection of trace elements, the background may have a significant effect on the detection limit and precision (Ang et al., 2003). Therefore, the background must be estimated and removed from the spectrum. This task is generally simple if the amplitudes of the peaks are bigger than the background below them and the latter is slow varying. When these conditions are not respected the removal of the background is more complicated. Background modelling refers to the description of the background shape by some mathematical function; this function forms part of the fitting model that describes the complete spectrum (i.e. background continuum and photopeaks). During the spectrum evaluation, the parameters of the background function are optimized together with the other parameters in the fitting model in order to obtain the best match between model and spectral data. In contrast, background estimation involves the a priori calculation of an approximate background shape b by applying a suitable stripping or filtering algorithm on the original spectral data y, which are then fitted with an appropriate fitting model containing the estimated background shape as fixed part of the model. This is equivalent to using the net spectrum n = y - b for the peak area determination of the characteristic lines (Vekemans et. al, 1994). The essential difference between background modelling and estimation procedures is that the latter class of algorithms produces a background shape that is not “fine-tuned” during the subsequent stages of the (iterative) spectrum evaluation procedure. University of Ghana http://ugspace.ug.edu.gh 21 The background modelling procedures do show this behaviour, which, provided the fitting model is complete (i.e. accounts for all peaks in the spectrum), allows the background shape to be optimally adapted to all non-characteristic information in the spectrum. This feature obviously becomes a disadvantage when the applied model is incomplete, e.g. in the case when escape peaks or characteristic lines have been omitted from the model. In order to maximize the overall goodness-of-fit, the background will be distorted and will cause it in the region of the omitted peak to be higher than in reality. Usually this causes gross underestimation of the weak peaks in the same spectral area. On the other hand, the modelling approach to background compensation can accommodate in a more flexible way small systematic differences between experimental data and the spectrum model such as is the case with tail effects and non-Gaussian peak shapes(Vekemans et. al, 1994). Spectra generally consist in peaks and noise superimposed on a background. This background, or baseline, which can be either flat, linear with a positive or negative slope, curved, or a combination of all three, is mainly characterised by the fact that it does not vary as quickly as the peaks do. In most software the background is estimated by a least- squares polynomial fitting performed on a user defined subset of points which should belong to the background. Providing that the points are correctly selected, the fitting yields satisfactory results. This can be attributed to the ability of the polynomial model to represent a wide class of backgrounds. The now-classic method of stripping peaks to fit the background consists of comparing a data point with the average of the two adjacent points and replacing the current point by the smaller value. After several iterative calculations, only a smooth background curve remains. University of Ghana http://ugspace.ug.edu.gh 22 In addition, there are many other good methods, such as orthogonal polynomial decomposition, the least squares method and wavelet analysis. The orthogonal polynomial background estimation method, introduced by Steenstrup, smoothens noise errors. Nevertheless, the above methods all require iterative calculation, and the iterations are different for different spectra. They are not suitable for automatic batched analyzing spectrum. A new background subtraction method for energy dispersive X-ray fluorescence spectra using a cubic spline interpolation has been proposed (Yi et. al., 2015).This method has been tested on spectra measured from a coin, and it has also been tested on an existing sample spectrum. Compared with Fig. 2.1(a), Fig. 2.1(b) shows that the method described above can properly subtract the background. It performs better than stripping peaks. Fig.2.1 (a) Original sample EDXRF spectra (b) Subtracted spectra by the cubic spline interpolation method. University of Ghana http://ugspace.ug.edu.gh 23 Fig.2.2 (a) Original EDXRF spectrum (same as in Fig. 2.1). (b)– (d) Subtracted spectra by stripping peaks with 1000, 3000 and 5000 times iterative computations. In addition, the method has been compared with the stripping of peaks. Compared with Fig. 2.2, Fig. 2.1 shows that the effects of the two methods are essentially identical when the number of iterations in the peak stripping method is about 3000. It performs better than stripping peaks. This method can be applied to analyses that require a short time, such as analyzing an X- ray fluorescence two- dimensional scanning image with 100 x 100 pixels. This method is not suitable if the number of counts is below 10 per channel and in cases where the escape peak has to be considered. Another method for the subtraction of the background using dual-tree complex wavelet transform has been proposed (Zhao et. al 2014). Compared with real wavelet transform, the proposed method has some attractive properties, including a smooth, non-oscillating, and nearly shift-invariant magnitude with a simple near-linear phase encoding of signal University of Ghana http://ugspace.ug.edu.gh file:///E:/full%20lit%20rev/A%20new%20background%20subtraction%20method%20for%20energy%20dispersive%20X-ray%20fluorescence%20spectra%20using%20a%20cubic%20spline%20interpolation.htm%23f0010 24 shifts. Therefore, it outperforms real wavelet transform to decompose the background into low-frequency components. The commonest and probably most appropriate method is the orthogonal polynomial decomposition, used, for example, in the AXIL program (Steenstrup et. al 1981). It fits the background with a linear combination of mutually orthogonal polynomials. With respect to a linear combination of ordinary (non-orthogonal) polynomials, this method presents a higher stability with high-order polynomials, allowing a better approximation of the continuum. It can be expressed as ∑ ( ) (2.24) where is the continuum approximation, the orthogonal polynomials and are the proportionality coefficients determined by a least-squares minimization. Although, this method works well, in some cases the quality of background estimation is not that good. To overcome this problem, a different approach has been proposed by Brunetti (2000). It is based on an approximation of the continuum with a projection onto a convex set, the spectrum data. A set is said to be convex if for any two elements of the set, a convex combination of them is again in the set. It is possible to add several constraints to the solution, such as positiveness or boundedness of data and compactly supported data. In this case, all of them can be imposed because, due to finite energy values, a spectrum has always positive bounded values and it presents a compact support. To project an X-ray spectrum onto a convex set is to compare the values estimated with the spectrum data: if the estimation of the continuum has amplitudes higher than the real spectrum values, then they will be locked to the spectrum values. The problems are how to represent the fit and University of Ghana http://ugspace.ug.edu.gh 25 make it converge to the best solution, using only weak constraints or hypothesis on the nature of the signal. A typical approach is to use the information relative to the full-width half-maximum (FWHM) of the peaks. This can be considered a strong constraint because it cannot permit analysis of an unknown spectrum. The results obtained have a quality higher or, at least comparable, to other methods reported in other papers, especially if the spectrum that must be analyzed has very low amplitude peaks compared to the continuum. This method, compared to the well-known orthogonal polynomial method, shows a higher precision for the estimate of the amplitudes of the peaks. Both this method and the polynomial approximation method work under the assumption that the background is varying slower than the peak areas. Wang et al (2012) have applied the method of Fourier transform to the problem of background subtraction. It is less affected by changes in the background than linear background subtraction. One algorithm used for background estimation is the Statistics-sensitive Non-linear Iterative Peak-clipping (SNIP) algorithm. The SNIP algorithm is structured into three phases. The first phase applies the low statistics digital filter, and transforms the channel count ( ) in channel according to ( ), where ( ) * ( ) +, in order to compress the dynamic range of the channel counts. The second phase is a multipass peak clipping loop which replaces each channel value ( ) with the lesser of ( ) and the mean , ( )-, where ( ) , ( ) ( )- and the scanning width ( ) is fixed to twice the X-ray peak FWHM characteristic of channel . This approach is independent of detector energy calibration. Only 24 passes through this loop are necessary to produce University of Ghana http://ugspace.ug.edu.gh 26 acceptable background spectra. For the final few passes (typically 8) the scanning width is progressively reduced after each pass. This is done to reduce the incidence of oscillations in the background, and eliminates the need to smooth the background afterwards. The final phase transforms the results back to channel counts ( ) (Ryan et al, 1988). The basic SNIP algorithm automatically includes the linear component under the peak in the estimated background. A complete spectrum consists of the full energy peak together with escape and sum peaks as well as Compton edges. As such the background of the spectrum is complicated, but the SNIP algorithm can remove these using several clipping filters (Morhac et al, 2008).For example, the linear background is removed by a clipping filter of the second order whilst the Compton edge can be removed by a clipping filter of the fourth order. Unlike other background compensation methods, the SNIP method implicitly determines peak regions and peak- free regions. Park et. al (2013) have proposed an efficient background correction method for EDXRF spectra. The method has two steps of background modelling and background correction. It is based on the basic concept which differentiates background areas from the peak areas in a spectrum and the SNIP algorithm, one of the popular methods for background removal, is used to enhance the performance. After detecting some points which belong to the background from a spectrum, its background is modeled by a curve fitting method based on them. And then the obtained background model is subtracted from the raw spectrum. This method has been shown to give better results than some of the traditional methods, while working under relatively weak constraints or prior information. University of Ghana http://ugspace.ug.edu.gh 27 Smoothing the spectrum is a necessary operation to get rid of noise. A Savitzky and Golay algorithm and moving average filter are known methods in the literature (Jenkins et al., 1981, van Grieken and Markowicz, 1993 and Savitzky and Golay,1964 ). The Savitzky and Golay method performs a local polynomial regression on a distribution of a certain width to determine the smoothed value for each point. Other smoothing methods, such as moving average and Gaussian filters, involve a convolution with the spectrum. The filters have a gain equal to one, and are symmetric in relation to the points to smooth. This produces results from which detection of peaks is more precise. The strip background is probably PyMCA's most popular background model (Sole). In its simplest implementation it is just an iterative procedure depending on two parameters. These parameters are the strip background width w, and the strip background number of iterations. At each iteration, if the contents of channel , ( ), is above the average of the contents of the channels at channels of distance, ( ) and ( ), ( ) is replaced by the average. At the end of the process we are left with something that resembles a spectrum in which the peaks have been "stripped". This implementation would give a baseline passing by the lower band of the statistical noise associated to the spectrum. This problem can be solved by performing a smoothing prior to calculating the background. The parameter associated with the smoothing is the strip background smoothing width. All these parameters are accessible in the FIT configuration tab of the configuration window (Sole). The PyMCA strip background enables one to use anchors when backgrounds with a high curvature are encountered such as the one in Fig. 2.3. Anchors are simply channels that will remain fixed during the stripping procedure. That feature is available from PyMCA University of Ghana http://ugspace.ug.edu.gh 28 version 4.0.9 on. Since the energy calibration can change during the fitting procedure, anchors have to be given in channels and not in energy (Sole). Fig. 2.3 Background with a high curvature 2.7 Spectrum Evaluation The aim of spectrum evaluation is to obtain unbiased, minimum variance, estimates of the net intensities (peak areas) of the fluorescence lines. Fitting an appropriate mathematical function to the spectral data can do this. The parameters of this function are chosen so that the weighted sum of squared differences between the measured spectral data and the fitting function ( ) are minimal. This object function is known as chi- square: ∑ , ( ) - (2.25) The fitting function generally consists of two parts, one that describes the continuum and one that deals with the characteristic lines (van Espen and Lemberge, 2000): University of Ghana http://ugspace.ug.edu.gh 29 ( ) ( ) ∑ [∑ ( )] (2.26) The inner summation runs over the number of K / L lines of each element with the relative contribution of line k of element j. The outer summation runs over all elements with the linear parameter being the total intensity of element . ( ) is a function that describes the shape of the x-ray line with energy . A typical implementation of ( ) consists of a Gaussian ( ) √ [ ( ( ) ) ] (2.27) in which the width and position obey the energy and resolution calibration functions of the spectrometer: ( ) (2.28) [. √ / ] ⁄ (2.29) The fitting function is linear in the net peak area parameter , but nonlinear in the parameters Zero, Gain, Noise and Fano so that a nonlinear least-squares procedure is required. In successive approximations the values of the parameters are altered until the minimum in is reached (van Espen and Lemberge, 2000). To improve the spectrum evaluation procedure, a mathematical model that takes into account the deviation from the Gaussian peak shape must be used. Such a model includes a step and tail function to describe the low energy tailing due to incomplete charge collection in the detector. University of Ghana http://ugspace.ug.edu.gh 30 ( ) ( ) ( ) ( ) (2.30) in which ( ) is the Gaussian and and are (linear) parameters representing the fraction of photons that gives rise to a step and tail contribution respectively. The step and tail functions can be written as: ( ) 0 ( ) √ 1 (2.31) ( ) [ ] 0 ( ) 1 [ ( ) √ √ ] (2.32) The functions are normalized, i.e. the integral of the function over the spectrum equals unity. The parameter is an extra nonlinear parameter, modelling the width of the tail. To keep the number of parameters to be estimated during the least-squares fit as low as possible, , and are expressed as functions of the energy. This functional relation is fitted rather than the value for each peak individually. Spectrum evaluation based on this fitting model gives more reliable results than simple Gaussians (van Espen and Lemberge, 2000). In general, an XRF spectrum consists of peaks, corresponding to the various elements in the sample, superimposed on a background, which comes from x-ray scatter and detector effects. It is the job of “spectrum processing” to effectively remove the signal (i.e., net peak intensity) from the noise (i.e., the background and artifact peaks). There is an additional complication caused by peak overlap, which usually means that one cannot simply integrate regions around a peak and arrive at an accurate intensity, for a given element (and line). University of Ghana http://ugspace.ug.edu.gh 31 The number of counts in a particular peak in any EDXRF spectrum is directly proportional to the acquisition time; hence, the relative intensities are dependent only on the relative proportions of the elements in the sample and on their relative detection sensitivities. Requisite to converting observed peaks into quantitative results accurately is the isolation (deconvolution) of overlapping peaks from one another. Since such overlap alters the observed amplitude and area of the respective peaks, subsequent efforts at correlating peak amplitude or area with the relative concentration of the element may result in gross errors if these peaks are not accurately deconvoluted prior to quantification. Two basic techniques have been used to separate or deconvolute overlapping spectral peaks. These are resolution enhancement techniques (Bertin, 1975) and digital filter- correlation techniques (Schamber, 1976). Some resolution enhancement techniques assume that the observed spectrum is composed of a useful signal plus noise. This observed signal is considered to be the product of the transformed true emission spectrum multiplied against a transformed system response function. The noise can be removed by using an exponential roll-off filter, and the true emission spectrum is then computed by taking the inverse Fourier transform of the transformed observed spectrum divided by the transformed system response function. While the resolution enhancement technique serves to locate and separate partially overlapping spectral peaks, total separation of more severely overlapping peaks must be accomplished by another method since true peak amplitudes and standard deviations may still be obscured. Digital filter-correlation techniques involve the application of a digital filter to both the observed spectrum and to a series of reference files containing peaks University of Ghana http://ugspace.ug.edu.gh 32 derived from real or artificially generated elemental standards for each element present in the observed spectrum. The digital filter supposedly filters out the background and high frequency noise. Deconvolution can then be performed by computing (in the transformed domain) the ratio of the observed intensity of the reference peak to the same peak in the complex spectrum. Peak areas may then be calculated directly from the reference spectrum. While the digital filter technique is capable of yielding excellent results from ideal reference peaks collected under identical conditions, when such reference files are not available the accuracy of the technique is dependent upon the operator estimates of the amplitude and standard deviation of an "ideal" reference peak. Lam et. al (1979) have applied an optimization procedure called simplex to resolve the true area of overlapping peaks such as those frequently encountered in energy dispersion analysis spectra. This technique overcomes many of the limitations of present deconvolution techniques such as resolution enhancement and digital filter-correlation and has the added advantage of not involving the use of partial derivatives as encountered in gradient-type optimization techniques. This procedure has been applied to a series of artificially generated overlapping Gaussian peaks which are close analogs to actual peaks. The results of this study have shown that this function converges and the correct area of those overlapping peaks can be estimated by this deconvolution. In energy-dispersive x-ray fluorescence analysis, the estimation of the net area of the peaks is a primary requirement. This task requires a non-linear fitting of the peaks. The most common procedures are based on the Marquardt–Levenberg technique. This University of Ghana http://ugspace.ug.edu.gh 33 technique generally works well only when the spectrum is perfectly known, i.e. all the peaks are recognized. Moreover, it is sometimes difficult to introduce constraints on the fit due to peak shape or other physical properties. Brunetti et. al (2001) have proposed a new technique, based on a set of genetic operators. It works well even when the knowledge of the peaks is incomplete and it also allows one easily to introduce constraints. The results obtained with this algorithm are generally superior with respect to a standard implementation of a Marquardt–Levenberg procedure. The only drawback is the speed of convergence, which is slower than in the Marquardt– Levenberg technique. Genetic algorithms are probabilistic procedures based on a simulation of life rules. They search for the best-adapted solution with respect to an environment, i.e. the model that can be represented. The genetic algorithms are based on a set called as a population, of possible solutions of the problem. Each member of the population is called a chromosome and can be formed by one or more genes, whose values or states are called alleles. Each gene is a parameter of the model that must be fitted. The evolution of the population is regulated by a set of evolution functions. Across the generations, each member is evaluated by a fitness function that produces an estimate of the adaptation, i.e. of the quality of the solution determining its probability of survival in the next generation. Bennun et. al (2002) have come up with a new procedure for the identification and quantification of spectral signals based on the method of maximum likelihood is presented. It is particularly appropriate for the analysis of signal interference or cases of a small signal in a sizeable noisy background. The formulation yields precise signal intensity values and has advantages in its estimation of detection limits over established University of Ghana http://ugspace.ug.edu.gh 34 signal processing methods. The method developed is applicable to spectroscopic techniques where net counts are proportional to acquisition time, such as particle induced x-ray emission (PIXE) and other x-ray fluorescence spectroscopic methods. Liu et al. (2014) have presented a maximum a posteriori (MAP)-based algorithm for the band overlap problem. In the MAP framework, the likelihood probability density function (PDF) is constructed with Gaussian noise assumed, and the prior PDF is constructed with adaptive total variation (ATV) regularization. The split Bregman iteration algorithm is employed to optimize the ATV spectral deconvolution model and accelerate the speed of the spectral deconvolution. The main advantage of this algorithm is that it can obtain peak structure information as well as suppress noise simultaneously. Simulated and real spectra experiments manifest that this algorithm can satisfactorily recover the overlap peaks as well as suppress noise and are robust to the regularization parameter. There are many different algorithms and approaches to detect peaks in data. The main problem lies in distinguishing true peaks from statistical fluctuations, Compton edges and other undesired spectrum features. The estimation of widths of peaks regions is tightly connected with the localization and identification of peaks in the spectrum. However, a great majority of them is based on convolution operations. The use of the convolution method to locate the peaks is a well-established approach and is utilized in many of the available algorithms. It removes statistical fluctuations and is insensitive to linear background under Gaussians. Without loss of generality assume that a peak is perfectly Gaussian-shaped given by ( ) ( ( ) ) (2.33) University of Ghana http://ugspace.ug.edu.gh 35 where x is the channel number and A, a and σ are peak intensity, peak position and standard deviation determining the peak width, respectively. A Gaussian product function that is derived from four successive points has been proposed: ( ) , ( ) ( )- , ( ) ( )- (2.34) ( ) One can observe that this function depends only on σ. However, it has to be calculated for all possible channel values x. When looking at the function, for peak-free regions σ→∞ and consequently ( ) =1. Otherwise, in peak regions ( ) .This condition can be utilized for the identification of the peaks and together with the equation immediately above also for the determination of peak width and thus the peak regions (Morhac,2009). There are a growing number of applications which involve precise measurements of x-ray line intensities. Also, there is growing interest in measurements of the K-series x-ray spectra of heavy elements excited with synchrotron radiation or high-voltage x-ray tubes. The use of K-series x-ray lines of heavy elements instead of L-series radiation may yield better detection limits and reduce the peak overlap in EDXRF spectra. The peak profile of an x-ray line of a low-Z element can be approximated with good accuracy by a Gaussian function. In the case of high-Z elements and the K-series radiation peaks, the Gaussian function does not follow accurately enough the pronounced tail structure on both sides of the peak profile. When such a structure is approximated by a Gaussian profile, it results in a high chi-squared value and a biased peak area due to the discrepancy between the actual peak shape and the profile of the Gaussian function. University of Ghana http://ugspace.ug.edu.gh 36 Wegrzynek et. al (2001) have proposed the evaluation of the energy-dispersive x-ray spectra of such high-Z elements using Voigt peak shape profiles. The Voigt profile is obtained by convolution of the natural line profile given by a Lorentz function with the Gaussian detector response function. The Voigt profile reproduces the Gaussian shape in the neighbourhood of the peak centre and follows the Lorentz long tail structures on both sides of the peak. The need to introduce the Voigt peak profile depends on the ratio of the natural line width, , to the energy resolution of the spectrometer at the peak position (represented by the Gaussian standard deviation of the peak, ), ⁄ . University of Ghana http://ugspace.ug.edu.gh 37 CHAPTER THREE METHODOLOGY 3.1 Software The software used were WinAxil and PyMCA version 4.7.4. 3.2 WinAxil The K line peaks of Ti and Mo from IAEA standard spectra of Ti were used for the energy calibration. The K line peaks of titanium (Ti), iron (Fe), cobalt (Co), nickel (Ni), zinc (Zn), strontium (Sr) and yttrium (Y) were fitted with a linear polynomial of order 3. The following Lα lines were fitted: dysprosium (Dy), samarium(Sm), cerium (Ce), tantalum (Ta), tungsten (W), mercury (Hg), and uranium (U). Dy, Sm, Ce, Ta, W, Hg and U were with a linear polynomial of order 3. University of Ghana http://ugspace.ug.edu.gh 38 Fig. 3.1 Fitted Ti standard spectrum with WinAxil 3.3 PyMCA Energy calibration was performed with Ti standard spectrum and saved in a calibration file. This file was then loaded into the software when fitting of the standard spectra was to be done. Ti was fitted with linear polynomial of order 3. Fe was fitted with a linear polynomial of order 3 with a short tail function. Co was fitted with a linear polynomial of order 3 with a short tail function. Ni was fitted with a linear polynomial of order 3 with a short tail function. Zn was fitted with a linear polynomial of order 3 with a short tail function. Sr and Y were fitted with a linear polynomial of order 3 with a short tail and step functions. Sm was best fitted with a linear polynomial function of order 3 with short and long tails. Dy was best fitted with an exponential polynomial of order 3 with short and long tails. W University of Ghana http://ugspace.ug.edu.gh 39 was best fitted with a linear polynomial of order 3 with a short tail function. Hg was best fitted with a linear polynomial of order 3 giving the best fit. For Ta the best fit was obtained with an exponential polynomial of order 4 with a short tail function. For U the best fit was obtained with an exponential polynomial of order 4. Fig. 3.2 Fitted Ti standard spectrum with PyMCA 3.3.1 Adaptation of PyMCA to X-ray tube excitation sources The PyMCA software originally written for synchrotron radiation sources can be adapted to X-ray excitation sources by clicking on the „Beam‟ tab and clicking „Open X-ray tube setup‟. Here, parameters such as the transmission tube voltage, anode material and window material are input; also needed are the thicknesses of these materials. The photon energy used for the irradiation (primary beam) should also be entered. University of Ghana http://ugspace.ug.edu.gh 40 Fig. 3.3 Adaptation of PyMCA to X-ray tube excitation sources 3.4 Peak Intensities Peak intensities for all the elements were found using the relation (3.1) where ( ) ( ) University of Ghana http://ugspace.ug.edu.gh 41 3.5 Sensitivity Calibration For PyMCA, sensitivity calibration was calculated using the relation (3.2) ( ) ( ) For WinAxil, sensitivity calibration was done using the software. 3.6 Quantitative Analysis Three x-ray fluorescence spectra of soil samples taken from a petrol station (GDGA2-45, GDGA3-45, and GDGA45) were fitted with WinAxil and PyMCA. The soil sample spectra were all fitted with a linear polynomial of order 3 for both WinAxil and PyMCA. The peak areas obtained for the three soil spectra GDGA2-45, GDGA3-45, and GDGA4- 45 are shown in tables A9, A10 and A11 respectively Appendix A. The intensities of the fitted elements were obtained using equation (3.2). The acquisition time of 600 s. The X-ray tube current and voltage of 10 mA and 45 kV respectively were input for both software. Detector area and a sample-detector distance were also input for both. University of Ghana http://ugspace.ug.edu.gh 42 Quantitative analysis was performed for the three soil samples using both WinAxil and PyMCA. A simplified manual for spectrum fitting and quantitative analysis for PyMCA has been written to serve as a guide for first-time and inexperienced users and is available in Appendix B. A flowchart to make the manual easier to follow is available in Appendix C. University of Ghana http://ugspace.ug.edu.gh 43 CHAPTER 4 RESULTS AND DISCUSSION 4.1 Intensities The peak intensities of Kα and Lα lines of the elements fitted with both WinAxil and PyMCA are shown in tables A7 and A8 respectively of Appendix A. The graphical plot of PyMCA intensities against WinAxil intensities for Kα lines is shown in Fig. 4.1 below. Logarithmic scales were used for both axes as the range of values was more than one order of magnitude. Fig. 4.1 Kα Plot of PyMCA Intensities against WinAxil Intensities The graphical plot of PyMCA intensities against WinAxil intensities for Lα elements is shown in Fig. 4.2 below. Logarithmic scales were used for both axes as the range of values was more than one order of magnitude. y = 1.2237x - 1.105 R² = 0.9658 4.8 5 5.2 5.4 5.6 5.8 6 4.8 5 5.2 5.4 5.6 5.8 6 P y M C A WinAxil University of Ghana http://ugspace.ug.edu.gh 44 Fig. 4.2 Lα Plot of PyMCA Intensities against WinAxil Intensities The intensities obtained by fitting Kα lines with both PyMCA and WinAxil show good agreement. This is borne out by the value of . Although the agreement between PyMCA and WinAxil by fitting Lα lines is quite good, it is not as good as that for the Kα elements. Also, the intensities of the soil samples fitted with both PyMCA and WinAxil have values that indicate excellent agreement between the two software. 4.2 Sensitivity Curves The sensitivity results for both Kα and Lα lines fitted with PyMCA are in tables A3 and A4 respectively in Appendix A. The Kα and Lα sensitivity values for WinAxil are in tables A5 and A6 respectively in Appendix A. The sensitivity curves of Kα and Lα lines obtained from the WinAxil and PyMCA software in the previous chapter are shown respectively in Fig. 4.3 and Fig. 4.4 below. y = 0.8082x + 0.4674 R² = 0.8754 2.8 3.3 3.8 4.3 4.8 2.8 3.3 3.8 4.3 4.8 P y M C A WinAxil University of Ghana http://ugspace.ug.edu.gh 45 Fig. 4.3 Sensitivity curves of PyMCA & WinAxil for Kα lines Fig. 4.4 Sensitivity curves of PyMCA & WinAxil for Lα lines -7 3 13 23 33 43 53 63 73 22 24 26 28 30 32 34 36 38 40 Se n si ti vi ty / 1 E7 Atomic Number PyMCA WinAxil Poly. (PyMCA) Poly. (WinAxil) 0 10 20 30 40 50 60 70 58 63 68 73 78 83 88 93 98 Se n si ti vi ty /1 E6 Atomic Number PyMCA WinAxil Poly. (PyMCA) Poly. (WinAxil) University of Ghana http://ugspace.ug.edu.gh 46 For Kα lines, the sensitivity curve of PyMCA lies above that of WinAxil whilst for Lα lines, it lies below that of WinAxil. For PyMCA, the best fit of the Lα elements was obtained with exponential polynomials whilst linear polynomials were enough to obtain a best fit using WinAxil. The difference between the Lα sensitivity results from the two software arose from the fact that linear polynomials were used to fit Lα lines with WinAxil whilst exponential polynomials were used to fit these same lines with PyMCA. Generally, when fitting L lines, high orders of the polynomial are used to obtain good results than the use of low orders which can be attributed to the complex nature of the L line spectra. The specification of high orders during the fitting process introduces many unknown parameters and this puts a very high burden on the non-linear least squares algorithm that needs to find the optimum values for all these parameters. This burden can cause erroneous values of the parameters to be determined which as a result give high chi-square values indicating that the fitting function could not best fit the experimental data. Thus this could be the reason why the sensitivity values of the L lines for PyMCA are less than those of WinAxil since they (L lines) were fitted with exponential polynomials. 4.3 Quantitative Analysis 4.3.1 Peak Intensities The intensities obtained for soil sample spectra GDGA2-45, GDGA3-45 & GDGA4-45 are shown in tables A12, A13 and A14 respectively of Appendix A. The graphical plot of PyMCA intensities against WinAxil intensities for the soil sample spectra GDGA2-45, GDGA3-45 & GDGA4-45 shown in Fig.4.5, Fig. 4.6 & Fig. 4.7 University of Ghana http://ugspace.ug.edu.gh 47 respectively. Logarithmic scales were used for both axes as the range of values was several orders of magnitude. Fig.4.5 Plot of PyMCA Intensities against WinAxil Intensities of GDGA2-45 y = 1.0467x - 0.049 R² = 0.9888 0.9 1.1 1.3 1.5 1.7 1.9 2.1 2.3 0.9 1.1 1.3 1.5 1.7 1.9 2.1 P yM C A WinAxil University of Ghana http://ugspace.ug.edu.gh 48 Fig.4.6 Plot of PyMCA Intensities against WinAxil Intensities of GDGA3-45 Fig.4.7 Plot of PyMCA Intensities against WinAxil Intensities of GDGA4-45 y = 1.0512x - 0.0659 R² = 0.9994 0.9 1.1 1.3 1.5 1.7 1.9 2.1 0.9 1.1 1.3 1.5 1.7 1.9 2.1 P yM C A WinAxil y = 1.1095x - 0.1396 R² = 0.986 0.9 1.1 1.3 1.5 1.7 1.9 2.1 0.9 1.1 1.3 1.5 1.7 1.9 P yM C A WinAxil University of Ghana http://ugspace.ug.edu.gh 49 4.3.2 Elemental Concentrations The tables of results for the elemental concentrations of the soil samples GDGA2-45, GDGA3-45 and GDGA4-45 are shown below in table A15, table A16 & table A17 respectively of Appendix A. The graphical plot of elemental concentrations obtained using PyMCA against elemental concentrations obtained using WinAxil for the soil samples GDGA2-45, GDGA3-45 & GDGA4-45 are shown in Fig.4.8, Fig. 4.9 & Fig. 4.10 respectively. Logarithmic scales were used for both axes as the range of values was several orders of magnitude. Fig.4.8 Plot of PyMCA Concentration against WinAxil Concentration of GDGA2-45 y = 0.9973x + 0.0144 R² = 0.9997 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 1 2 3 4 5 P y M C A WinAxil University of Ghana http://ugspace.ug.edu.gh 50 Fig. 4.9 Plot of PyMCA Concentration against WinAxil Concentration of GDGA3-45 Fig. 4.10 Plot of PyMCA Concentration against WinAxil Concentration of GDGA4-45 The intensities of the elements in the soil sample spectra fitted with both PyMCA and WinAxil show a much better agreement between the two software than for those of the y = 0.9953x + 0.0246 R² = 0.9997 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 1 2 3 4 5 P yM C A WinAxil y = 1.0018x + 0.0063 R² = 0.9999 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 P yM C A WinAxil University of Ghana http://ugspace.ug.edu.gh 51 standard spectra. This is because for the standard spectra a much higher background exists since most of the standards are in the pure form, whilst the background in the soil sample spectra is not as high due to the fact that the elements are present in small amounts. Since intensity is directly proportional to concentration, it is expected that the concentrations of the elements in soil sample spectra fitted with both WinAxil and PyMCA will be in good agreement and this is borne out in fact by the values of the graphs of the elemental concentrations found in Figs.4.8-4.10. University of Ghana http://ugspace.ug.edu.gh 52 CHAPTER 5 CONCLUSION & RECOMMENDATIONS 5.0 Conclusion According to the results obtained, the x-ray peak fitting capabilities using PyMCA compare favourably with those of WinAxil. Since the development of WinAxil has been discontinued, PyMCA can be used in place of WinAxil for qualitative and quantitative analysis with x-ray tube excitation sources. The best fitting results for the linear and exponential background models were obtained by choosing the lower degrees of the polynomials ranging from 1 to 4. Therefore, the conditions for adapting PyMCA for use in the deconvolution of spectra obtained from X-ray tubes involving fitting the background of such spectra with lower degrees of polynomials. Current documentation on PyMCA where available poses difficulties for inexperienced users; therefore, a simplified version of the manual for spectrum fitting and quantitative analysis with PyMCA has been produced. This will facilitate the use of PyMCA for first- time and inexperienced users; in addition, a flowchart for the manual has also been done. 5.1 Recommendations The adaptation of PyMCA for the analysis of Proton-Induced X-ray Emission (PIXE) should be studied. Since the Ghana Atomic Energy Commission has acquired a pelletron accelerator which can be used for PIXE analysis, a comparative study of the capabilities of PyMCA and WinAxil should be extended to pelletron accelerators. The QXAS program, which was written for use in third-world countries under the sponsorship of the IAEA and made freely available because of how expensive University of Ghana http://ugspace.ug.edu.gh 53 commercially-available spectrum deconvolution software are, is no longer being updated; it is recommended that X-ray spectrometry laboratories in the third-world should consider using the PyMCA software since it has proven to give good results in EDXRF analysis. Care should be taken in the choice of high orders of polynomials since they can cause errors in the results of spectrum fitting. University of Ghana http://ugspace.ug.edu.gh 54 APPENDIX A Elements Peak Areas PyMCA WinAxil Ti Fe Co Ni Zn As Sr Y Table A1 Peak Areas of Kα elements Elements Peak Areas PyMCA WinAxil Ce Sm Dy Ta W Hg U Table A2 Peak Areas of Lα elements University of Ghana http://ugspace.ug.edu.gh 55 Table A3 PyMCA Kα Elemental Sensitivities Table A4 PyMCA Lα Elemental Sensitivities Table A5 WinAxil Kα Elemental Sensitivities Element Sensitivity( ) Ti Fe Co Ni Zn As Sr Y Element Sensitivity ( ) Ce Sm Dy Ta W Hg U Element Sensitivity ( ) Ti Fe Co Ni Zn As Sr Y University of Ghana http://ugspace.ug.edu.gh 56 Table A6 WinAxil Lα Elemental Sensitivities Element WinAxil PyMCA Intensity ( ) σ Intensity ( ) σ Ti Fe Co Ni Zn As Sr Y Table A7 Peak intensities of Kα lines Element WinAxil PyMCA Intensity ( ) σ Intensity ( ) σ Ce Sm Dy Ta W Hg U Table A8 Peak intensities of Lα lines Element Sensitivity ( ) Ce Sm Dy Ta W Hg U University of Ghana http://ugspace.ug.edu.gh 57 Element Peak Areas WinAxil PyMCA K 539.8 549.3 Ca 6399.3 6437.4 Ti 2789.3 2797.7 V 83.2 84.5 Cr 159.9 161.0 Mn 1309.8 1335.9 Fe 229879.9 231599.8 Ni 236.3 242.6 Cu 582.5 584.4 Zn 4289.9 4358.9 Ga 172.2 176.9 Br 299.1 319.1 Rb 1698.8 1739.9 Sr 11983.4 12470.0 Y 1195.3 1277.1 Zr 113.9 109.0 Pb 253.7 243.2 Table A9 Peak Areas of soil sample spectrum GDGA2-45 University of Ghana http://ugspace.ug.edu.gh 58 Table A10 Peak Areas of soil sample spectrum GDGA3-45 Elements Peak Areas WinAxil PyMCA K Ca Ti V Cr Mn Fe Ni Cu Zn Ga Br Rb Sr Y Zr Pb University of Ghana http://ugspace.ug.edu.gh 59 Elements Peak Areas WinAxil PyMCA K Ca Ti V Cr Mn Fe Ni Cu Zn Ga Br Rb Sr Y Zr Pb Table A11 Peak Areas of soil sample spectrum GDGA4-45 University of Ghana http://ugspace.ug.edu.gh 60 Table A12 Peak Intensities of soil sample spectrum GDGA2-45 Element Peak Intensities ( ) WinAxil PyMCA K 90.0 91.5 Ca 1006.6 1072.5 Ti 464.9 466.3 V 13.9 14.1 Cr 26.7 26.8 Mn 218.3 222.7 Fe 38313.3 38600.0 Ni 39.4 40.4 Cu 97.1 97.4 Zn 715.0 726.5 Ga 28.7 29.4 Br 49.9 53.2 Rb 283.1 290.0 Sr 1997.2 2078.3 Y 199.2 212.9 Zr 19.0 18.2 Pb 42.3 40.5 University of Ghana http://ugspace.ug.edu.gh 61 Elements Peak Intensities ( ) WinAxil PyMCA K 105.0 106.4 Ca 855.5 875.5 Ti 353.2 369.7 V 21.5 21.8 Cr 38.3 39.2 Mn 182.8 194.0 Fe 30829.7 31237.2 Ni 53.2 54.7 Cu 99.1 100.7 Zn 571.2 586.5 Ga 27.0 27.6 Br 34.8 35.0 Rb 279.9 289.9 Sr 1663.0 1792.7 Y 113.2 114.0 Zr 25.8 25.9 Pb 24.4 24.2 Table A13 Peak Intensities of soil sample spectrum GDGA3-45 University of Ghana http://ugspace.ug.edu.gh 62 Elements Peak Intensities ( ) WinAxil PyMCA K 208.9 212.0 Ca 1168.6 1195.8 Ti 383.3 393.1 V 46.2 49.2 Cr 181.2 193.8 Mn 215.0 220.8 Fe 33294.2 34736.7 Ni 37.0 37.9 Cu 1514.4 1539.0 Zn 1083.3 1097.8 Ga 20.2 25.0 Br 50.3 56.1 Rb 266.3 272.3 Sr 1742.7 1853.3 Y 229.3 236.5 Zr 5.0 4.7 Pb 15.8 15.5 Table A14 Peak Intensities of soil sample spectrum GDGA4-45 University of Ghana http://ugspace.ug.edu.gh 63 Element Concentration (mg/kg) WinAxil PyMCA K 1497 1528 Ca 9279 9305 Ti 1289 1378 V 22.65 24.98 Cr 27.67 28.16 Mn 141.0 149.0 Fe 15987 16240 Ni 7.345 7.460 Cu 12.76 13.07 Zn 68.54 69.25 Ga 2.065 2.120 Br 1.260 1.400 Rb 5.130 5.220 Sr 29.97 31.57 Y 2.562 2.750 Zr 11.89 10.43 Pb 20.56 19.67 Table A15 Elemental concentration of soil sample spectrum GDGA2-45 University of Ghana http://ugspace.ug.edu.gh 64 Element Concentration(mg/kg) WinAxil PyMCA K 1698 1776 Ca 7368 7593 Ti 997.7 1092 V 37.36 38.67 Cr 40.76 41.14 Mn 127.8 129.9 Fe 13034 13140 Ni 9.650 10.09 Cu 13.19 13.51 Zn 53.67 55.90 Ga 1.786 1.989 Br 0.8976 0.9236 Rb 4.987 5.222 Sr 25.98 27.23 Y 1.275 1.472 Zr 14.98 14.83 Pb 12.56 11.75 Table A16 Elemental concentration of soil sample spectra GDGA3-45 Element Concentration(mg/kg) WinAxil PyMCA K 3465 3539 Ca 9865 10370 Ti 8853 8990 V 1032 1161 Cr 86.78 87.39 Mn 145.87 147.8 Fe 14378 14620 Ni 6.543 6.986 Cu 205.8 206.6 Zn 102.9 104.6 Ga 1.698 1.799 Br 1.431 1.478 Rb 4.873 4.905 Sr 27.95 28.16 Y 2.986 3.053 Zr 2.701 2.685 Pb 7.567 7.530 Table A17 Elemental concentration of soil sample spectrum GDGA4-45 University of Ghana http://ugspace.ug.edu.gh 65 APPENDIX B A SIMPLIFIED PyMCA MANUAL 1. To select a file for fitting, click on the „SpecFile‟ tab. Fig.B1 PyMCA interface 2. Click on „File‟ in the menu bar and then click „Open‟ and „Data Source‟ in the sub menu. Alternatively, file can be loaded by clicking on the open file icon on the top left side below the file menu bar. University of Ghana http://ugspace.ug.edu.gh 66 Fig. B2 Opening a spectrum file A new window opens as below. Click on the downward-pointing arrow at the bottom right and select „All files (*)‟. University of Ghana http://ugspace.ug.edu.gh 67 Fig. B3 Opening a spectrum file 3. Select the spectrum file of interest by double-clicking on it. University of Ghana http://ugspace.ug.edu.gh 68 Fig.B4 File selection If the required spectrum file is on a different drive or a location other than the hard drive, click on that drive, and select the file in that location by double-clicking on it. Fig B5. File selection from a different drive. University of Ghana http://ugspace.ug.edu.gh 69 The user can toggle between a linear and a logarithmic scale by clicking on the „log‟ tab as shown in Fig. B6a & Fig. B6b respectively. Fig.B6a Linear scale Fig.B6b Logarithmic scale University of Ghana http://ugspace.ug.edu.gh 70 5. To carry out energy calibration, one creates a new calibration or copies an already existing calibration. To create a new calibration from the existing data, click calibrate at the bottom right, and select compute from the submenu. Fig. B7 Beginning energy calibration To provide inputs for the energy calibration, the program offers you the possibility to search automatically for peaks or to enter a peak with the mouse by selecting the manual search icon. You will be shown a new window with the selected spectrum. University of Ghana http://ugspace.ug.edu.gh 71 Fig. B8 MCA Calibration Widget interface 6. For automatic selection of the peaks, check the „auto‟ boxes at the bottom left, adjacent „Fwhm (pts)‟ and „Yscaling‟ and click the „Search‟ button. The lines that can be used for energy calibration are shown automatically as in Fig B9. Found or entered peaks will be denoted by vertical markers on the graph. University of Ghana http://ugspace.ug.edu.gh 72 Fig. B9 Peaks to be used for energy calibration 7. To choose the peaks to be used for energy calibration, click on the downwards- pointing arrow opposite „Order‟ and select „1 st ‟ from the resulting pull-down menu. Fig. B10 Selection of first peak for energy calibration University of Ghana http://ugspace.ug.edu.gh 73 Click on one of the selected peaks (this is the first peak being used in the calibration). A pop-up menu appears as shown: Fig.B11 Pop-up menu for selection of elements & energies 8. Enter the selected peak parameters „Energy‟ and „Line‟ and click „OK‟. To enter the associated energy to that peak just click on the marker. For K elements, the „KL3‟ line refers to the K line of that particular element. Fig. B12 Selection of first line for energy calibration in pop-up menu University of Ghana http://ugspace.ug.edu.gh 74 9. Select „2nd‟ from the „Order‟ pull-down menu and click on another peak in order to input its selected parameters; then click „OK‟. This selects the second peak for calibration. Fig. B13 Selection of second peak for energy calibration Fig. B14 Entering parameters of second peak University of Ghana http://ugspace.ug.edu.gh 75 For K elements, the „KM3‟ line refers to the K line of that particular element. For L elements, the L3M5* line represents the L line of that particular element. This line together with the K line of the coherently scattered line of the x-ray excitation source can be used for energy calibration. The calibration widget appears as shown: Fig. B15 Peak selection for energy calibration completed 10. To complete inputs for the calibration, click on the „OK‟ tab on the bottom right-hand corner of the calibration widget. This exits the energy calibration and registers the spectrum filename in the calibration sub menu as in figure B16. 11. To select this file click on the downwards-pointing arrow opposite „Calibration‟ as shown clicking on the filename. University of Ghana http://ugspace.ug.edu.gh 76 Fig. B16 Activation of energy calibration The interface should look like below with „Channel‟ replaced by „Energy‟: Fig.B17 Channel numbers replaced with energy University of Ghana http://ugspace.ug.edu.gh 77 Click on „Calibrate‟ and on „Save‟. Save the calibration to a location other than the PyMCA root drive. If the user has internet access with Adobe Flash Player installed, they can view the animated procedure for energy calibration at pymca.sourceforge.net/documentation. To load an existing calibration, click on „Calibrate‟and then „Load‟. The screen looks as below: Fig. B18 Loading an existing calibration Select the appropriate calibration file from the folder it has been saved in and click „open‟. Click on the downward-pointing arrow opposite „Calibration‟; the filename should be present in the list. Clicking it would activate that particular calibration. University of Ghana http://ugspace.ug.edu.gh 78 Fig. B19 Activating an existing calibration 12. To perform a fit, load the spectrum file as indicated in steps 1-3. To use an already saved calibration file, click on „Calibrate‟ and on „Load‟. A dialogue box opens; go to the location of the calibration file you saved and click on „open‟. Then, click on the downward pointing arrow opposite „Calibration‟; the calibration file should be in the options listed. Click on it; that calibration is now active. Click on the „Fit‟ tab and select „Advanced‟ as shown in Fig. B20. University of Ghana http://ugspace.ug.edu.gh 79 Fig. B20 Selection