International
Tables for
Crystallography
Volume I
X-ray absorption spectroscopy and related techniques
Edited by C. T. Chantler, F. Boscherini and B. Bunker

International Tables for Crystallography (2024). Vol. I. ch. 6.3, pp. 734-738
https://doi.org/10.1107/S1574870720003377

Chapter 6.3. ESTRA and FitEXA

Carlo Meneghini,a* Settimio Mobilio,b Fabrizio Bardellic and Carmelo Prestipinod

aDepartment 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
Correspondence e-mail:  [email protected]

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.

1. Introduction

ESTRA and FitEXA (Meneghini et al., 2012link to reference) 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, 1975link to reference). 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.

2. ESTRA

The ESTRA program is derived from original EXAFS data-analysis programs (Mobilio et al., 1982link to reference) 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., 2002link to reference; Padežnik Gomilšek et al., 2003link to reference), 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 Mathematical symbol and the expected value Mathematical symbol is defined as ɛi = Mathematical symbolMathematical symbol, where Mathematical symbol is calculated by linear interpolation of the values of the closest experimental data points, Mathematical symbol and Mathematical symbol. The `noise' on Mathematical symbol is estimated as Mathematical equationand the average signal-to-noise ratio is calculated as Mathematical equationwith 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. 1link to figure). 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.

[Figure 1]

Figure 1

Evaluation of noise from an experimental Fe K-edge EXAFS signal from Ba3FeRu2O9 (Middey et al., 2011link to reference): the k-weighted experimental EXAFS spectrum k · χ(k) (upper curve, black dots; glitches are highlighted in red), the noise spectrum (ɛi) without glitches (middle blue curve) and the raw noise spectrum (bottom grey curve) are shown vertically shifted for clarity. The Mathematical symbol data (magenta curves) allow the glitches in the raw spectrum to be recognized. These curves also reveal that at low k structural oscillations are partially calculated as `noise', adding some bias to the evaluated uncertainty.

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 Mathematical equationcalculated by averaging the square uncertainties in a region (2m + 1 points) around the ith data point. Data points having ɛi >> Mathematical symbol can be recognized as glitches and eventually removed (Fig. 1link to figure). 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., 2009link to reference).

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).

3. FitEXA

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 functionMathematical equationwith 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 Mathematical symbol. A = Mathematical symbol 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 contributionsMathematical equationwith 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., 1995link to reference; Kas et al., 2024link to reference). 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, 2000link to reference), giving rise to the standard EXAFS formula. The cumulant (Fornasini, 2001link to reference) 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., 1981link to reference) 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., 2014link to reference) or to take multi-phase compounds into account (see, for example, Loria et al., 2015link to reference). The data refinement is based on the MINUIT subroutines package (James & Roos, 1975link to reference), 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, 1994link to reference): 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, 1965link to reference) and MIGRAD is based on the conjugate-gradient method (Hestenes & Stiefel, 1952link to reference). 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, 1994link to reference), 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., 2012link to reference; Filipponi, 1995link to reference).

Statistical indicators are calculated to provide information about the best-fit quality: the chi-squared (Mathematical symbol) and reduced chi-squared (Mathematical symbol) functions, the weighted square residual functionMathematical equationand the square residual function Mathematical symbol. As additional information, the Akaike information criterion number (AIC; Akaike, 1974link to reference) 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 asMathematical equationThe 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, 2009link to reference). 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.

4. Running ESTRA and FitEXA

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, 2007link to reference). 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. 2link to figure. 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.

[Figure 2]

Figure 2

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. 3link to figure(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.

[Figure 3]

Figure 3

Screenshots of FitEXA_GUI. (a) The main window to define the best-fit parameters, shell structure and refinement procedure. (b) The best-fit output plot in reciprocal (k) and real (R) space, also showing partial contributions to the multi-shell fit.

5. Releases

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

First citationAkaike, H. (1974). IEEE Trans. Autom. Contr. 19, 716–723.Google Scholar
First citationBattocchio, 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
First citationBooth, C. H. & Hu, Y.-J. (2009). J. Phys. Conf. Ser. 190, 012028.Google Scholar
First citationDe Crescenzi, M., Balzarotti, A., Comin, F., Incoccia, L., Mobilio, S. & Motta, N. (1981). Solid State Commun. 37, 921–923.Google Scholar
First citationFilipponi, A. (1995). J. Phys. Condens. Matter, 7, 9343–9356.Google Scholar
First citationFornasini, P. (2001). J. Phys. Condens. Matter, 13, 7859–7872.Google Scholar
First citationHestenes, M. R. & Stiefel, E. (1952). J. Res. Natl Bur. Stand. 49, 409–436.Google Scholar
First citationHunter, J. D. (2007). Comput. Sci. Eng. 9, 90–95.Google Scholar
First citationJames, F. (1994). MINUIT: Function Minimization and Error Analysis Reference Manual, version 94.1. CERN Report No. CERNLIB-D506.Google Scholar
First citationJames, F. & Roos, M. (1975). Comput. Phys. Commun. 10, 343–367.Google Scholar
First citationKas, J. J., Vila, F. D. & Rehr, J. J. (2024). Int. Tables Crystallogr. I, ch. 6.8, 764–769 .Google Scholar
First citationKodre, 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
First citationLoria, R., Meneghini, C., Torokhtii, K., Tortora, L., Pompeo, N., Cirillo, C., Attanasio, C. & Silva, E. (2015). Phys. Rev. B, 92, 184106.Google Scholar
First citationMeneghini, C., Bardelli, F. S. & Mobilio, S. (2012). Nucl. Instrum. Methods Phys. Res. B, 285, 153–157.Google Scholar
First citationMeneghini, 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
First citationMiddey, 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
First citationMobilio, S., Comin, F. & Incoccia, L. (1982). Analisi dei Dati EXAFS. LNF Internal Report No. 82/19.Google Scholar
First citationNelder, J. A. & Mead, R. (1965). Comput. J. 7, 308–313.Google Scholar
First citationPadežnik Gomilšek, J., Kodre, A., Arčon, I. & Hribar, M. (2003). Phys. Rev. A, 68, 042505.Google Scholar
First citationRehr, J. J. & Albers, R. C. (2000). Rev. Mod. Phys. 72, 621–654.Google Scholar
First citationZabinsky, S. I., Rehr, J. J., Ankudinov, A., Albers, R. C. & Eller, M. J. (1995). Phys. Rev. B, 52, 2995–3009.Google Scholar








































to end of page
to top of page