computer programs
miXAFS: a program for X-ray absorption fine-structure data analysis
aDepartment of Physics, University of Toyama, Toyama 930-8555, Japan
*Correspondence e-mail: ikemoto@sci.u-toyama.ac.jp
A new program called miXAFS for the analysis of X-ray absorption fine-structure (XAFS) data is presented. miXAFS can analyze the functions simultaneously for all measured X-ray absorption edges of the constituent elements in a sample under the constraints for the structural parameters over the edges. The program provides a surface plot of the R-factor as a function of two structural parameters, which is useful to validate the optimized structural parameters. The structural parameters can be obtained from the data in a few steps using the setting file and batch process. The program, which is coded in MATLAB and freely available, runs on Macintosh and Windows operating systems. It has a graphical user interface and loads experimental data and functions in a variety of ASCII data formats.
Keywords: XAFS; analysis program; multi-edge fitting.
1. Introduction
X-ray absorption fine-structure (XAFS) analysis is a powerful tool for characterizing the local structure of materials (Lee et al., 1981; Rehr & Albers, 2000; Bunker, 2010). analysis has notable advantages over more conventional X-ray diffraction methods. The first is its applicability to any form of matter regardless of whether it has long-range order or not. Therefore, is an extremely powerful tool to analyze the structure of amorphous materials, liquids and nanomaterials.
The second advantage of et al., 2000). However, in most cases, the acquired data are not fully utilized because the functions χ(k) for each edge are analyzed independently not simultaneously.
is element specificity. Each element has a set of unique X-ray absorption edges, so the local structure around the target element can be analyzed by measurements around its edge. For chemical compounds, it is usual to perform measurements for as many constituent elements as possible, so the atomic pair correlation around the X-ray-absorbing atoms is determined. It is ideal to simultaneously analyze the data for all the measured absorption edges considering the atomic correlations over the absorption edges (Di CiccoNonlinear least-squares curve fitting is typically used to determine the structural parameters in χ(k) are the atomic distance and third cumulant; the main parameters that determine the amplitude of χ(k) are the and Debye–Waller factor. These interdependent parameters influence each other in terms of the phase or amplitude in the fitting process. Surface plots of the R-factor against the interdependent structural parameters are useful to validate the optimized structural parameters (Di Cicco, 1996; Ikemoto & Miyanaga, 2014).
analysis. This method is popular and useful, but the results depend on the initial values of the structural parameters; that is, the results sometimes look odd from the viewpoint of physical considerations. It is therefore necessary to check the effect of the initial values of the structural parameters on the results. According to the standard equation, the main parameters that influence the phase ofA large number of parameters are required to extract structural parameters from experimental data. Many ; Klementev, 2001; Ravel & Newville, 2005; Hatada et al., 2016). However, these packages require many steps to analyze the data. It would be convenient to obtain the structural parameters from experimental raw data with fewer procedures, especially when the spectra must be measured within a limited beam time at synchrotron radiation facilities.
analysis packages are available, the majority of which have a graphical user interface (GUI) (Ressler, 1998This paper presents a new miXAFS. miXAFS can analyze the functions simultaneously for all the obtained X-ray absorption edges under the constraints of the structural parameters. This program can construct the surface plot for the R-factor as functions of two structural parameters, which is helpful to obtain the structural parameters that are not located at the local minimum. The fitting procedures to obtain structural parameters are performed in both the k-space and r-space. miXAFS is freely available through the website https://www.sci.u-toyama.ac.jp/phys/3ken/children/miXAFS/_index-miXAFS.htm.
data analysis tool called2. System requirements and data format
The program miXAFS is coded in MATLAB and the executable application is freely available for Macintosh and Windows operating systems.1 Running miXAFS requires the runtime routine of MATLAB, which can be downloaded from the MathWorks website (https://www.mathworks.com/products/compiler/mcr.html), so users do not need an expensive MATLAB system.
miXAFS can load various ASCII file types of experimental raw data and χ(k) data obtained by other programs. The loading procedure is designed to have flexibility, such that the user can define the loading rules according to their requirements. The miXAFS program stores several types of data, including χ(k), the Fourier transform of χ(k), the optimized structural parameters, the uncertainties of the optimized structural parameters, and the correlation coefficients in ASCII format. This allows the user to easily plot and analyze the results with familiar tools. A log of miXAFS is saved with several levels that can be defined by the user.
3. Graphical user interface
Fig. 1 shows the GUI window of miXAFS, which exhibits all the parameters used to run miXAFS and the obtained results. The window is separated into two areas. In the upper area of the window, the user can observe the absorption coefficients, χ(k), the Fourier transform of χ(k) and Fourier-filtered χ(k) at a glance. This area also includes edit windows that set up the file name of the data, and the Run button. The lower area of the window displays the data-processing parameters for all procedures along with the obtained structural parameters. The windows in the lower area are switched by clicking the tabs. When miXAFS is booted up, the identification data (ID) defined in the settings file are shown in the edit windows of the GUI, such that the user can easily know where the values of the parameters in the setting file are loaded. The parameters on the edit window are overwritten with the values of the parameters in the settings file by clicking the Entry button, and the user can also change the parameters directly through the edit windows. Several miXAFS GUI windows can be activated, allowing the user to compare the results between different data or different analytical conditions.
miXAFS contains all necessary processes for conventional data analysis to obtain the structural parameters from experimental data. miXAFS can be run in several modes; for example, to obtain the structural parameters from experimental raw data, to obtain χ(k) from experimental data, and to determine structural parameters from χ(k) obtained using other programs.
4. Analysis method
4.1. Extraction of χ(k)
χ(k) is defined as
where k is the photoelectron wavenumber, m is the mass of an electron, E is the energy of the incident X-ray and E0 is the , and are the experimental the absorption for virtual isolated atoms and the background contribution to from the other shells, respectively.
is estimated by a least-squares fitting calculation in the pre-edge and post-edge regions using the Victoreen formula (Victoreen, 1947; Sakane et al., 1993). is fitted with following equations,
where d is the sample thickness; A, B and c are the free parameters; and Cpost, Cpre, Dpost and Dpre are the literal values (MacGillavry & Rieck, 1983). is obtained following the method proposed by Matsubayashi et al. (Sakane et al., 1993; Ikemoto et al., 2011).
4.2. Fourier transform and Fourier filtering
χ(k) is Fourier transformed as
and FT(r) is inverse Fourier transformed as
where W(k) and W(r) are the window functions, which are selected from the Hamming and Hanning windows. F(k) and are the backscattering amplitude and phase shift functions, respectively, which are calculated using theoretical codes; for example, FEFF (Ankudinov et al., 1998), GNXAS (Di Cicco, 2009) and Excurve (Tomic et al., 2004).
4.3. Obtaining structural parameters
χ(k) is calculated using the following theoretical function,
where P is the scaling factor and is the energy shift. S0,j 2(k), fj(k,rj), and are the k-dependent reduction factor resulting from the many-body effect, the backscattering amplitude, the total phase shift functions and the electron length for an atom in the jth shell, respectively, which are calculated using the theoretical codes mentioned above. rj is the interatomic distance between X-ray-absorbing and photoelectron-scattering atoms, and Nj is the in the jth shell. is the Debye–Waller factor, and C3, j and C4, j are the third and fourth cumulants, respectively.
To obtain the structural parameters, least-squares curve fitting is conducted to minimize the following function using the nlinfit or lsqcurvefit functions of MATLAB,
where N is the number of data points in the fitting range and is the measurement uncertainty for the ith data point. This equation is applied to or FT(r).
The ). The uncertainty of the jth independent structural parameter Pj is calculated using nlinfit and nlparci functions (MATLAB nlparci, https://www.mathworks.com/help/stats/nlparci.html). The between the ith and jth independent parameters is calculated as
Standards and Criteria Committee recommends that the results obtained by must be accompanied by estimation of the uncertainty (IXS, 2000where the C terms are the respective elements of the fit covariance matrix.
can be defined in the following ways. The first method is to estimate from independent scans by the equation
where M is the number of independent scans. The second method is to use the values of defined in the file of χ(k) or FT(r). The third approach is to give as a constant value in the GUI window.
The index of fit is the R-factor calculated by
where the summation is of all the data points used for fitting.
5. Features of miXAFS
5.1. Multiple edge fittings
miXAFS can simultaneously analyze the functions for all the obtained X-ray absorption edges under the constraints of the structural parameters. In principle, there is no limit to the number of edges and sites that can be simultaneously analyzed.
is an element-specific spectroscopy technique that provides reliable and useful information about the local structure around the specified elements of materials. When the data for each element of a compound are measured, in most cases they are analyzed individually for each This sometimes gives contradictory results; for example, the atomic distance between two elements obtained from the individual analysis of each X-ray may be different. In contrast,Fig. 2 shows an example of the simultaneous analysis of the Fourier-filtered χ(k) for the caesium and bromine K-edges of caesium bromide by least-squares curve fitting. For this analysis, the atomic distance rCsBr (from the X-ray-absorbing Cs atoms to the nearest X-ray-scattering Br atoms), rCsCs, the coordination numbers NCsBr and NCsCs are equal to rBrCs, rBrBr, NBrCs and NBrBr, respectively, in view of the CsBr structure. The constrained conditions are defined at the column of r(control) and N(control) in the table of the initial parameters. The ways to express the constraints are stated in §5.4. The upper area of the miXAFS window shows the Fourier-filtered χ(k) and its Fourier transform for the Cs and Br K-edges; both the experimental and optimized values are displayed. χ(k) and its Fourier transform for both edges are well reproduced. The initial and optimized structural parameters with their uncertainties are shown in the Structural Parameter tab of the GUI window. Following the constraint conditions, the optimized values of rCsBr, rCsCs, NCsBr and NCsCs are equal to those of rBrCs, rBrBr, NBrCs and NBrBr, respectively.
5.2. Surface plot of the R-factor
In the standard χ(k) and those that contribute to its amplitude. For example, the and Debye–Waller factors are the main determinants of the amplitude, and are strongly correlated in the least-squares curve-fitting process. Thus, it is important to check the effect of the Debye–Waller factor on the to correctly interpret the obtained coordination number.
equation, the structural parameters can be classified into two groups: those that contribute to the phase ofContour maps indicating the R-factor or the correlation statistical error on some parameters are useful to check the colleration between the parameters (Di Cicco, 1996). miXAFS provides a surface plot of the R-factor as a function of any two structural parameters without the restriction of the number of data points. Fig. 3 provides an example of a surface plot of the R-factor as a function of the and Debye–Waller factor of isolated selenium chains in carbon nanotubes. There is only one minimum, indicating that the obtained parameters are not located at local minima and are reliable. The surface plot can be obtained in two ways: one with fixed values on the x- and y-axes of the surface plot during least-squares fitting throughout the fitting process, and the other one in which these values are initially defined and free parameters in the fitting process. Such plots are useful to determine the reliability of the optimized parameters and to check whether the obtained structural parameters are located at local minima or not. Furthermore, this teaches beginners the importance of the initial values of parameters in least-squares curve-fitting analysis.
5.3. Batch process
It is usual to measure miXAFS can analyze large sets of experimental data and χ(k) data in sequence following a list that defines the file names, experimental conditions and initial values of the structural parameters for the least-squares curve fitting. This function encourages users to analyze their data under many kinds of analytical conditions, and frees them from tedious work.
spectra while varying experimental conditions like temperature and pressure and to analyze them under the same analysis conditions. The repeated analysis is a boring procedure, and prevents analysts from trying many kinds of analysis.The value of , which is set in the Fitting Setting tab of the GUI window, is important in R-factor or for reproducing the literature values; for example, the atomic distance of the most important atomic correlation. Therefore, the analyst performs the least-squares curve fitting by setting as the free parameter or by changing the value of incrementally, and then checks the R-factor and focused structural parameters. miXAFS can perform the least-squares curve fitting with a varying value of and display the R-factor and a structural parameter as a function of . Therefore, the user can define easily with an understanding of its dependence on the R-factor and the structural parameter in question.
fitting procedures. In most cases, the value is defined for the smallest5.4. Settings file
The parameters for miXAFS are initially set by loading the settings file through clicking the Entry button on the Start tab. The parameters can be changed manually in the GUI at any time, even after loading them. The settings file is very convenient for routine analysis and especially for measurements in synchrotron radiation facilities where beam time is limited. If a settings file for each is prepared, the structural parameters can be quickly and easily obtained from the experimental raw data or χ(k) in just three steps; that is, loading the settings file, changing the file name and clicking the Run button.
An example of a settings file is shown in Fig. 4. Because the number of data-processing parameters greatly exceeds 100, the parameters are sampled in the figure. The characters between the top line and semicolon are the ID of the parameters for running miXAFS. The characters between the semicolon and percent sign are the values of the parameters. The characters following the percent sign are annotations.
In the fitting process, the constraints for the structural parameters are defined in the control column in the table of the initial parameters in the Structural Parameter tab of the miXAFS window. In the control column, the characters 0 and 1 refer to fixed and free parameters during least-squares fitting, respectively. The constraints for the structural parameters are also expressed with four arithmetic operations or their sum. For example, r_control;r(1,2)*1 means that the focused atomic distance is constrained on one times the atomic distance for the second shell of the first which is also shown in Fig. 2. The first and second numbers in the brackets designate the edge number and the site number of the edge, respectively, which are numbered following the order listed in the settings file. Another example is N_control;N(1,2)=4.0, which is a useful constraint when the total seems to be constant but the oscillation dumps due to a large value of the Debye–Waller factor (Tamura et al., 1991), which means that the sum of the focused and that of the second site of the first is 4.0.
6. Conclusions
A new program for miXAFS, has been developed. This program is coded in MATLAB and runs on Macintosh and Windows operating systems. In contrast to existing analysis software, miXAFS can simultaneously analyze the functions for all the absorption edges of the constituent elements under the constraints of the structural parameters. miXAFS provides a surface plot of the R-factor as a function of the two structural parameters, which is very useful for investigating their interdependence. The user can obtain structural parameters from experimental data in just a few steps, which is particularly useful for beam-time measurements at synchrotron facilities as well as for routine analysis.
analysis, calledFootnotes
1miXAFS for Linux will be provided in the near future.
Acknowledgements
Professor T. Miyanaga, Professor M. Tabuchi, Professor T. Fujimori, Professor K. Hatada, Mr S. Yoshida and Mr A. Goyo are thanked for their assistance at various stages of this study. The synchrotron radiation experiments were performed at the Photon Factory in KEK under Proposal No. 2014G572, 2014G573, 2015G145 and 2017G104. We thank Natasha Lundin, PhD, from Edanz Group (https://www.edanzediting.com/) for editing a draft of this manuscript.
Funding information
Funding for this research was provided by: Japan Society for the Promotion of Science (grant No. 23510120); Japan Society for the Promotion of Science (grant No. 26400312); Japan Society for the Promotion of Science (grant No. 17K04980).
References
Ankudinov, A. L., Ravel, B., Rehr, J. J. & Conradson, S. D. (1998). Phys. Rev. B, 58, 7565–7576. Web of Science CrossRef CAS Google Scholar
Bunker, G. (2010). Introduction to XAFS: A Practical Guide to X-ray Absorption Fine Structure Spectroscopy. Cambridge University Press. Google Scholar
Di Cicco, A. (1996). Phys. Rev. B, 53, 6174–6185. CrossRef CAS Web of Science Google Scholar
Di Cicco, A. (2009). Editor. GNXAS. Extended Suite of Programs for Advanced X-ray Absorption Data Analysis: Methodology and Practice. ISBN 978-83-908112-8-4. Google Scholar
Di Cicco, A., Taglienti, M., Minicucci, M. & Filipponi, A. (2000). Phys. Rev. B, 62, 12001–12013. Web of Science CrossRef CAS Google Scholar
Hatada, K., Iesari, F., Properzi, L., Minicucci, M. & Di Cicco, A. (2016). J. Phys. Conf. Ser. 712, 012002. CrossRef Google Scholar
Ikemoto, H., Goyo, A. & Miyanaga, T. (2011). J. Phys. Chem. C, 115, 2931–2937. Web of Science CrossRef CAS Google Scholar
Ikemoto, H. & Miyanaga, T. (2014). J. Synchrotron Rad. 21, 409–412. CrossRef CAS IUCr Journals Google Scholar
IXS (2000). Error Reporting Recommendations: A Report of the Standards and Criteria Committee, Standards and Criteria Subcommittee Reports, https://ixs.iit.edu/subcommittee_reports/sc/err-rep.pdf. Google Scholar
Klementev, K. V. (2001). J. Phys. D, 34, 209–217. Web of Science CrossRef CAS Google Scholar
Lee, P. A., Citrin, P. H., Eisenberger, P. & Kincaid, B. M. (1981). Rev. Mod. Phys. 53, 769–806. CrossRef CAS Web of Science Google Scholar
MacGillavry, C. H. & Rieck, G. D. (1983). Editors. International Tables for X-ray Crystallography, Vol. III. New York: D. Reidel. Google Scholar
Ravel, B. & Newville, M. (2005). J. Synchrotron Rad. 12, 537–541. Web of Science CrossRef CAS IUCr Journals Google Scholar
Rehr, J. J. & Albers, R. C. (2000). Rev. Mod. Phys. 72, 621–654. Web of Science CrossRef CAS Google Scholar
Ressler, T. (1998). J. Synchrotron Rad. 5, 118–122. Web of Science CrossRef CAS IUCr Journals Google Scholar
Sakane, H., Miyanaga, T., Watanabe, I., Matsubayashi, N., Ikeda, S. & Yokoyama, Y. (1993). Jpn. J. Appl. Phys. 32, 4641–4647. CrossRef CAS Web of Science Google Scholar
Tamura, K., Inui, M., Yao, M., Endo, H., Hosokawa, S., Hoshino, H., Katayama, Y. & Maruyama, K. (1991). J. Phys. Condens. Matter, 3, 7495–7510. CrossRef CAS Google Scholar
Tomic, S., Searle, B. G., Wander, A., Harrison, N. M., Dent, A. J., Mosselmans, J. F. W. & Inglesfield, J. E. (2004). CCLRC Technical Report DL-TR-2005-001. ISSN 1362-0207. Google Scholar
Victoreen, J. A. (1947). Phys. Rev. 72, 869. CrossRef Google Scholar
© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.