|
International
Tables for Crystallography Volume I X-ray absorption spectroscopy and related techniques Edited by C. T. Chantler, F. Boscherini and B. Bunker © International Union of Crystallography 2024 |
International Tables for Crystallography (2024). Vol. I. ch. 6.3, pp. 734-738
https://doi.org/10.1107/S1574870720003377 Chapter 6.3. ESTRA and FitEXAaDepartment of Science, University Roma Tre, Via della Vasca Navale 84, 00146 Rome, Italy,bDepartment of Science, University Roma Tre, Viale Marconi 446, 00146 Rome, Italy,cNanotec, Institute of Nanotechnology, CNR-Nanotec c/o Dipartimento di Fisica, Università La Sapienza, Piazzale Aldo Moro 2, 00185 Rome, Italy, and dSolid State and Materials Chemistry Group (CSM), Sciences Chimiques de Rennes, UMR 6226, Campus de Beaulieu, 263 Avenue du Général Leclerc, 35042 Rennes, France ESTRA and FitEXA are two programs devoted to the extraction of the extended X-ray absorption fine-structure (EXAFS) signal from an X-ray absorption spectrum and to quantitative shell-fitting analysis via a least-squares refinement procedure, respectively. The ESTRA program contains independent modules to read, convert and pre-treat the experimental data, and to calculate the structural EXAFS signal. FitEXA allows multi-shell data refinement with flexibility in the choice of the model distribution function. It is based on the well established MINUIT package that allows versatility in the minimization procedures and accurate monitoring of the statistical uncertainties in the refined parameters and of the correlations among them. FitEXA also provides statistical indicators about the best-fit quality, in particular the Akaike information criterion number, which can be used to compare different structural models. Recently, a graphical user interface has been implemented to simplify its use. Keywords: ESTRA; FitEXA; EXAFS; software; shell fitting; data analysis. |
ESTRA and FitEXA (Meneghini et al., 2012
) are two programs to process raw X-ray absorption (XAS) data, extract the structural X-ray absorption fine-structure signal and quantitatively analyse the EXAFS signal via a least-squares refinement procedure based on the MINUIT package (James & Roos, 1975
). The ESTRA program is used to extract the experimental EXAFS signal from raw absorption spectra; it contains modules for preliminary data treatment, extraction of the structural EXAFS signal and Fourier filtering. The FitEXA program performs shell-fitting quantitative EXAFS data analysis applying versatile refinement algorithms. The ESTRA and FitEXA programs run from a command-line interface or through ASCII scripts. A graphical user interface (GUI) has been developed for more user-friendly and widespread usage.
The ESTRA program is derived from original EXAFS data-analysis programs (Mobilio et al., 1982
) developed in the 1980s by the PULS group at the Frascati National Laboratories (LNF-INFN), Italy. The original codes have been reorganized by the authors into a single program (ESTRA) and major changes have been made to the original routines, in particular concerning the extraction of the EXAFS signal, statistical data analysis and graphical interface.
The ESTRA program, similar to most XAS data-analysis software, contains modules to read, convert and pre-treat the experimental data, to calculate the structural EXAFS signal χexp and to direct Fourier transforms and inverse Fourier filtering. All of the input and output files are in ASCII format.
Calculating the EXAFS structural signal χexp(k) from the experimental total absorption signal α(E) is the main scope of ESTRA. This task is achieved by setting the absorption-edge energy E0, pre-edge background (αpre) subtraction, edge-step discontinuity evaluation and post-edge bare atomic background (α0) normalization. The edge energy E0 is defined at the maximum of the first derivative at the edge, or it can be set by the user. The pre-edge background αpre is modelled as a straight line calculated from the linear regression of α(E) in a user-defined energy interval before the edge and is then subtracted from the data: α′ = α − αpre. The bare atomic-like background in the post-edge region α0 is calculated using an N-knots piecewise multi-polynomial spline through the α′ data. The user has extensive control over the spline parameters: the number of polynomial sections, polynomial degrees and knot positions. It is possible to define the latter in energy (E) or photoelectron wavevector (k) space. Constraints can be imposed on the spline fixing the α0 value (edge jump) and its slope (first derivative) at E0. Splines are calculated by weighting the data by EW (energy-space splines) or by kW (wavevector-space splines). It is possible to add arctangent-like steps to the α0 background in order to take into account step-like distortions of the experimental spectra. These can originate from intrinsic effects such as multiple excitations (Kodre et al., 2002
; Padežnik Gomilšek et al., 2003
), additional edges (for example owing to impurities in the sample) or discontinuities in the spectrum such as, for example, those arising from storage-ring injection or refill during data acquisition.
Assessing the statistical uncertainty of the data is an important step in EXAFS data analysis, either to understand the quality of the spectra or to evaluate the uncertainty in the best-fit parameters. A valuable feature of ESTRA is the statistical analysis of the noise in each experimental spectrum: the difference between the experimental value and the expected value
is defined as ɛi =
−
, where
is calculated by linear interpolation of the values of the closest experimental data points,
and
. The `noise' on
is estimated as
and the average signal-to-noise ratio is calculated as
with the sums running over the experimental points. Tests performed on simulated spectra show that the interpolation procedure tends to overestimate the uncertainty depending on the k step (δk) of the experimental data and on structural contributions to the EXAFS signal: in low-k spectral regions the high frequency of fine structure oscillations from longer interatomic distances, and multiple-scattering contributions, may add a bias to the evaluated noise (Fig. 1
). Simulations made with dummy spectra with δk ≃ 0.03 Å−1 calculated for 5–6 Å atomic clusters around the absorber suggest a bias in the estimation of σχ ranging between some 10−5 to a few 10−4 for light neighbours and weak next-neighbour shells and from several 10−4 up to 10−3 for heavy neighbours and intense next-neighbour shells and multiple-scattering terms.
The evaluation of `noise' in the spectra provides a way to readily individuate glitches and discontinuity in the spectrum by comparing the uncertainty at the ith point ɛi with an average local standard deviation calculated by averaging the square uncertainties in a region (2m + 1 points) around the ith data point. Data points having ɛi >>
can be recognized as glitches and eventually removed (Fig. 1
). This procedure can be useful to recognize and remove the Bragg peaks when working with large crystal samples and/or single-crystal substrates (Meneghini et al., 2009
).
The Fourier transform of χexp allows a more intuitive understanding of the local atomic structure around the absorber because it shows the pseudo-radial distribution function. ESTRA calculates the Fourier transforms directly on the original abscissa, without data interpolation or rebinning of the original data, using a nonuniform discrete Fourier transform (NDFT) algorithm. The increased computational time with respect to fast Fourier (FFT) algorithms, requiring N = 2m data of equal-spaced k abscissa, is negligible for the user and, at the same time, prevents modification of the information in the original spectra. Back Fourier transforms are used to isolate contributions related to specific coordination shells (Fourier filtering).
The FitEXA program performs quantitative multi-shell data analysis of the EXAFS signal, fitting the experimental signal to a model curve χmod. Data fitting can be carried out in reciprocal (k) space on the raw EXAFS data (χexp) or on Fourier filtered data (χBF). Reciprocal-space fitting allows the limits imposed by the Nyquist criterion on the number of free parameters in the data refinement to be partially overcome. The refinement is performed by minimizing the weighted square residual functionwith the sum running over the N experimental points. To compensate for the intrinsic attenuation of the EXAFS signal at high k, the weight function WikW contains an abscissa-dependent weight kW. Wi is inversely proportional to the uncertainty in the data and may be constant along the spectrum or equal to the local uncertainty
. A =
is a normalization factor that is introduced to allow the comparison of residues obtained with different kW weights.
The model function is calculated as a sum of partial contributionswith each χj representing a coordination shell or the contribution of a multiple-scattering configuration. Amplitude and phase scattering functions can be extracted from reference spectra (experimental amplitude and phase functions) or calculated using the FEFF program (Zabinsky et al., 1995
; Kas et al., 2024
). The χj are calculated using different models to the pair distribution function in the Gaussian model, which is very commonly used in EXAFS data analysis (Rehr & Albers, 2000
), giving rise to the standard EXAFS formula. The cumulant (Fornasini, 2001
) expansion (up to the fourth term) allows anharmonic distortions to the Gaussian shell to be taken into account. The hard-sphere model (HSM; De Crescenzi et al., 1981
) has been proposed to take strongly asymmetric neighbour distributions into account, as occur for example in metallic glasses or monoatomic liquids.
It is possible to define mathematical relationships among the structural parameters in order to reduce the number of free parameters in fitting. These constraints are especially useful for the EXAFS data analysis of next-neighbour shells (multi-shell fitting; see, for example, Battocchio et al., 2014
) or to take multi-phase compounds into account (see, for example, Loria et al., 2015
). The data refinement is based on the MINUIT subroutines package (James & Roos, 1975
), a well established and versatile multi-parameter minimization code developed at CERN that provides diverse minimization algorithms (for a detailed description, see the MINUIT manual; James, 1994
): SEEK is a direct Monte Carlo optimization approach that uniformly samples the parameter space, SIMPLEX is based on the downhill simplex (or amoeba) method (Nelder & Mead, 1965
) and MIGRAD is based on the conjugate-gradient method (Hestenes & Stiefel, 1952
). The minimization strategy can be widely configured by the user combining different algorithms and fixing, releasing or constraining the parameters. This provides very versatile multi-step refinement procedures (James, 1994
), which are especially valuable when dealing with complex structures and multiphase materials.
FitEXA exploits the procedures included in the MINUIT package for the evaluation of the statistical uncertainty in the parameters, giving the possibility of inspecting the covariance matrices and the correlation among the refined parameters. In particular, the contour plots, which provide iso-F curves in parameter space, are a valuable instrument to visualize the correlation between pairs of parameters and to estimate the confidence intervals (Meneghini et al., 2012
; Filipponi, 1995
).
Statistical indicators are calculated to provide information about the best-fit quality: the chi-squared () and reduced chi-squared (
) functions, the weighted square residual function
and the square residual function
. As additional information, the Akaike information criterion number (AIC; Akaike, 1974
) is calculated and may be used to compare different best fits. The best fit with the lowest AIC (AICmin) is statistically the most suitable to describe the experimental data, but the probability that a model with a higher AIC (AICi > AICmin) can describe the information in the data as well as AICmin is estimated asThe AIC number is relatively simple and fast to use with respect to more accurate indicators such as the F-test or the likelihood ratio test.
It is worthwhile noting here that a reliable statistical evaluation of the uncertainty (error bars) in the refined parameters requires, as a first step, a correct estimation of the uncertainty in the experimental data. This is a crucial point in EXAFS data analysis, because nonstatistical errors in XAFS data often remain the major source of uncertainty in the final parameters (Booth & Hu, 2009
). These errors may come from the experimental setup (energy-scale definition, mechanical drifts, nonlinearity etc.), poor sample knowledge (i.e. parasitic phases or inhomogeneities), approximations of the theory and so on. Therefore, the uncertainties provided by statistical analysis must be considered carefully and the reliability of a model must be checked, taking into account all of the available information on the sample and the physical meaning of the parameters.
The ESTRA and FitEXA programs run from a command-line interface or by reading a set of instructions from ASCII script files (estra.inp and fitexa.inp) that can be modified by users and reloaded. For the sake of lightness, visualization of the output files (EXAFS, FT, BFT, fit …) relies on the gnuplot program, which is a very versatile, multi-platform, freeware and widely portable graphing utility. The programs automatically write ASCII scripts for gnuplot that can be loaded by users. Gnuplot scripts can be modified by users to meet their specific needs, providing ample versatility. ESTRA and FitEXA modules can also be run from gnuplot scripts to speed up the extraction/analysis procedures.
Graphical user interfaces (GUIs) to ESTRA (ESTRA_GUI) and FitEXA (FitEXA_GUI) have been developed in Python using the themed tkinter toolkit for the interface and the Matplotlib library (Matplotlib 2.0) for plots (http://matplotlib.org/
; Hunter, 2007
). Both libraries are portable and are widespread in the Python community. The GUIs facilitate writing of the estra.inp and fitexa.inp input files, running the programs and interactive inspection of the outputs of the different modules.
A screenshot of ESTRA_GUI is shown in Fig. 2
. The interface is composed of a main window divided into two panes: the first, on the left, contains the extraction parameters in labelled text fields, while the second contains the buttons that generate the plots. The plot windows integrate the standard functionality of Matplotlib, navigation, zoom, settings and export, with selector curves and the possibility of defining parameters directly from the position of the mouse on the plot. Plots are automatically redrawn after the execution of ESTRA; however, for the sake of comparison between different set of parameters, it is possible to generate immutable supplementary plot windows.
|
Screenshots of ESTRA_GUI. (a) Main windows with parameters and plot buttons. (b) Examples of plot windows highlighting steps in the extraction procedure. |
FitEXA_GUI presents the same visual structure as ESTRA_GUI: a main window with two panes. However, owing to the complexity and the numbers of input and output files generated by FitEXA, the left pane is organized into four tabs. The first tab, `Shell', shown in Fig. 3
(a), hosts the parameters defining the contributions of the different coordination shells (or of different photoelectron paths belonging to the same shell) to the jth model EXAFS signal (χj). The second tab, `Minuit Var. and Param', is composed of a table with the MINUIT variables and a text editor defining the MINUIT commands. The remaining tabs, `Minuit log' and `FitEXA out', allow visualization of the minimization and the output log files for the last fit.
The source codes for the GUIs are available at https://estrafitexa.github.io/EstraFitEXA/ . A pre-compiled version of the FitEXA and ESTRA programs and the GUI interfaces for the Windows platform is available as self-installing setup file.
References
Akaike, H. (1974). IEEE Trans. Autom. Contr. 19, 716–723.Google Scholar
Battocchio, C., Fratoddi, I., Fontana, L., Bodo, E., Porcaro, F., Meneghini, C., Pis, I., Nappini, S., Mobilio, S., Russo, M. V. & Polzonetti, G. (2014). Phys. Chem. Chem. Phys. 16, 11719–11728.Google Scholar
Booth, C. H. & Hu, Y.-J. (2009). J. Phys. Conf. Ser. 190, 012028.Google Scholar
De Crescenzi, M., Balzarotti, A., Comin, F., Incoccia, L., Mobilio, S. & Motta, N. (1981). Solid State Commun. 37, 921–923.Google Scholar
Filipponi, A. (1995). J. Phys. Condens. Matter, 7, 9343–9356.Google Scholar
Fornasini, P. (2001). J. Phys. Condens. Matter, 13, 7859–7872.Google Scholar
Hestenes, M. R. & Stiefel, E. (1952). J. Res. Natl Bur. Stand. 49, 409–436.Google Scholar
Hunter, J. D. (2007). Comput. Sci. Eng. 9, 90–95.Google Scholar
James, F. (1994). MINUIT: Function Minimization and Error Analysis Reference Manual, version 94.1. CERN Report No. CERNLIB-D506.Google Scholar
James, F. & Roos, M. (1975). Comput. Phys. Commun. 10, 343–367.Google Scholar
Kas, J. J., Vila, F. D. & Rehr, J. J. (2024). Int. Tables Crystallogr. I, ch. 6.8, 764–769
.Google Scholar
Kodre, A., Arčon, I., Padežnik Gomilšek, J., Prešeren, R. & Frahm, R. (2002). J. Phys. B At. Mol. Opt. Phys. 35, 3497–3513.Google Scholar
Loria, R., Meneghini, C., Torokhtii, K., Tortora, L., Pompeo, N., Cirillo, C., Attanasio, C. & Silva, E. (2015). Phys. Rev. B, 92, 184106.Google Scholar
Meneghini, C., Bardelli, F. S. & Mobilio, S. (2012). Nucl. Instrum. Methods Phys. Res. B, 285, 153–157.Google Scholar
Meneghini, C., Di Matteo, S., Monesi, C., Neisius, T., Paolasini, L., Mobilio, S., Natoli, C. R., Metcalf, P. A. & Honig, J. M. (2009). J. Phys. Condens. Matter, 21, 355401.Google Scholar
Middey, S., Ray, S., Mukherjee, K., Paulose, P. L., Sampathkumaran, E. V., Meneghini, C., Kaushik, S. D., Siruguri, V., Kovnir, K. & Sarma, D. D. (2011). Phys. Rev. B, 83, 144419.Google Scholar
Mobilio, S., Comin, F. & Incoccia, L. (1982). Analisi dei Dati EXAFS. LNF Internal Report No. 82/19.Google Scholar
Nelder, J. A. & Mead, R. (1965). Comput. J. 7, 308–313.Google Scholar
Padežnik Gomilšek, J., Kodre, A., Arčon, I. & Hribar, M. (2003). Phys. Rev. A, 68, 042505.Google Scholar
Rehr, J. J. & Albers, R. C. (2000). Rev. Mod. Phys. 72, 621–654.Google Scholar
Zabinsky, S. I., Rehr, J. J., Ankudinov, A., Albers, R. C. & Eller, M. J. (1995). Phys. Rev. B, 52, 2995–3009.Google Scholar