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.1, pp. 723-727
https://doi.org/10.1107/S1574870720003353

Chapter 6.1. ATHENA and ARTEMIS

Bruce Ravela* and Matthew Newvilleb

aNational Institute of Standards and Technology, Gaithersburg, MD 20899, USA, and bCenter for Advanced Radiation Sources, University of Chicago, Chicago, IL 60637, USA
Correspondence e-mail:  [email protected]

ATHENA and ARTEMIS are software for processing and analysis of X-ray absorption fine-structure data. ATHENA manages the reduction of raw data from the beamline into the X-ray absorption cross section, μ(E), as well as normalization, background removal, visualization and empirical analysis of the X-ray absorption near-edge structure (XANES). ARTEMIS is software for quantitative analysis of the extended X-ray absorption fine structure (EXAFS) using theoretical fitting standards from the FEFF program.

Keywords: ATHENA; ARTEMIS; XANES; XAFS; data analysis; data processing.

1. Technical overview

ATHENA and ARTEMIS (Ravel & Newville, 2005link to reference) are written using the Perl 5 language (https://www.perl.org/ ) along with a visual interface using wxWidgets (https://www.wxwidgets.org/ ) and data visualization using gnuplot (Williams & Kelley, 2016link to reference). Processing and analysis capabilities specific to the management of X-ray absorption fine structure (XAFS) data are provided either by IFEFFIT (Newville, 2001link to reference; Newville & Ravel, 2024link to reference) or by LARCH (Newville, 2013link to reference; Newville & Ravel, 2024link to reference) and extended X-ray absorption fine structure (EXAFS) theory is provided by FEFF (Rehr & Albers, 2000link to reference; Kas et al., 2024link to reference).

ATHENA and ARTEMIS implement the model–view–controller (MVC; Krasner & Pope, 1988link to reference) software-design pattern, where the models are FEFF and either IFEFFIT or LARCH (Fig. 1link to figure) and the most common view is a desktop application created with wxWidgets and gnuplot. Console-based and web-based views for some services are also provided with the software package.

[Figure 1]

Figure 1

Schematic of the architecture of ATHENA and ARTEMIS. Demeter is a software library written in Perl that is used to build ATHENA and ARTEMIS. These use the wxWidgets library to provide graphical user interfaces. Demeter relies upon various libraries and external programs to manipulate and display XAFS data. The LARCH and IFEFFIT libraries provide mathematical and XAFS-specific functionality and are used interchangeably by Demeter. ATHENA and ARTEMIS organize data for use by a plotting backend; gnuplot is used by default. Finally, Demeter organizes the input to and output from FEFF for use in ARTEMIS. Raw data from the beamline are imported into ATHENA. Processed data from ATHENA are imported into ARTEMIS. The results of data analysis in ATHENA or ARTEMIS are then presented to the scientist for interpretation.

The controller is a Perl library called Demeter which uses a meta-object system (Little et al., 2016link to reference) to manage data and the parameterization of the corresponding processing and analysis. It uses a simple templating system to distribute information to the model and view. It is possible to switch between the older IFEFFIT and newer, more featureful LARCH libraries (see Newville & Ravel, 2024link to reference) simply by switching template sets. While gnuplot is the default plotting backend, the templating system supports others. This separation of responsibilities using the MVC design pattern has allowed the rapid development of processing and analysis features along with a focus on stability and procedural correctness.

2. XAFS data processing

ATHENA is the program for processing of XAFS data. It manages the conversion of raw data, often in the format saved at the beamline, into a representation of the X-ray absorption cross section μ(E) that is ready for interpretation and analysis. The basic data-processing chores, including edge-step normalization, background removal and complex Fourier transformation, follow the example (Lytle et al., 1975link to reference) developed in the years immediately following the development of XAFS as a quantitative measurement technique by Sayers et al. (1971link to reference). Options are provided for visualizing the steps of data processing, including plotting of the regressed polynomials used in normalization, of the spline function used in background removal and of first and second derivatives of the μ(E) data.

Once the background function is found, ATHENA allows visualization of χ(k) with user-selectable k-weighting. The real and imaginary parts, as well as the magnitude and phase, of the Fourier transformed Mathematical symbol or the Fourier filtered Mathematical symbol can be plotted using the user-selected k-weighting in the initial transform [the subscript w indicates that χ(k) is k-weighted before the forward Fourier transform]. The user interface of ATHENA offers controls for the detailed visualization of individual spectra as well as for the rapid visualization of large quantities of data.

Along with basic processing and visualization chores, ATHENA provides a variety of interactive data-processing tools, such as energy calibration, alignment of spectra, averaging of spectra, removal of monochromator glitches (Bridges et al., 1991link to reference) and other spurious features, rebinning of the energy axis, smoothing or convolution of data, addition of artificial noise to data, approximate correction of over-absorption effects (Goulon et al., 1982link to reference) and others.

Finally, ATHENA offers various forms of quantitative analysis of XAFS data not involving XAFS theory. The X-ray absorption near-edge structure (XANES) portion of the data can be analysed using linear combination of reference spectra, principal component analysis (Wasserman, 1997link to reference) and its associated methodology, or deconvolution into sums of step and peak functions. A number of options for computing difference spectra allow for such things as sum-rule interpretation of circularly dichroic spectra, interpretation of atomic XAFS (Rehr et al., 1994link to reference) or the correction of certain measurement artefacts (Chantler et al., 2012link to reference).

ATHENA offers a variety of options for input and output of data. The tool for the import of column data is flexible, allowing the user to combine columns as needed to construct μ(E) from the raw data. ATHENA also provides a simple plug-in mechanism for beamline data that requires pre-processing beyond simple column selection. In this way, ATHENA is able to manage data from virtually every XAS beamline in the world. Along with a project save format that allows precise recovery of the state of the program, ATHENA offers a variety of column output files. Data can be saved as μ(E), normalized μ(E), χ(k) with various k-weightings, the full complex Mathematical symbol, the full complex Mathematical symbol and other useful forms. These column data files are readily imported into other data-analysis and visualization programs.

3. EXAFS data analysis

ARTEMIS is the program for the quantitative analysis of EXAFS data. Because the data targeted for EXAFS analysis are usually the result of extensive processing within ATHENA, the XAFS data is extracted by ARTEMIS from an ATHENA save file. The user also supplies structural information that is used for the calculation of theoretical fitting standards by FEFF. ARTEMIS provides an interface for managing the FEFF calculation following the model of Zabinsky et al. (1995link to reference), except that the path-finder algorithm described there has been re-implemented in Perl with additional functionality.

In FEFF, the measured χ(k) is represented by considering each way that the photoelectron can interact with the atoms surrounding the absorbing atom, i.e. the atom with the deep-core electron excited by the incident X-ray photon. In the cluster of atoms provided as input to FEFF, the path-finder algorithm exhaustively finds all ways for the photoelectron to scatter once from a neighbouring atom, all ways for the photoelectron to scatter twice from neighbouring atoms and so on. Each such single or multiple scattering geometry is called a `scattering path' and its contribution to χ(k) is calculated.

In the analysis of EXAFS data, one or more scattering paths are associated with the data. The terms of the EXAFS equation are evaluated for each path included in the fit and the sum of the contributions from these paths is compared with the data. In ARTEMIS, as in IFEFFITand LARCH, the parameters of the EXAFS equation (the amplitude reduction factor Mathematical symbol, coordination number N, change in path length ΔR, mean-square variation in path length σ2 and change in the origin of photoelectron wavenumber ΔE0) are not themselves the variables of the fit. Instead, the parameters of the EXAFS equation are expressed in terms of the variables of the fit. Borrowed from IFEFFIT and LARCH, this is the central concept of ARTEMIS.

The parameters of the fit are defined and named by the user. Using these named parameters, constraints can be placed on any aspect of the fitting model. The simplest sort of constraint is frequently used for ΔE0 parameters. A variable of the fit is named to represent ΔE0 in the EXAFS equation for each path, constraining each path to have the same value for ΔE0. Relationships between the named fit parameters and the parameters of the EXAFS equation are implemented using mathematical expressions written by the user. As an example, an isotropic volume expansion of a cubic crystal can be considered as an expansion coefficient multiplied by the nominal length of a path, for example ΔR = αReff, where α would be represented by a named parameter and Reff is the path length used in the FEFF calculation. Very sophisticated fitting models which encode assumptions and prior knowledge in the form of constraints can be built using mathematical expressions (Calvin et al., 2002link to reference; Ravel et al., 2009link to reference; Fig. 2link to figure).

[Figure 2]

Figure 2

A screenshot showing the EXAFS analysis from Ravel et al. (2009link to reference) using ARTEMIS. The parameters of the data and the paths used in the fit are controlled in the `data window' in the centre of the screen. This fit includes geometric constraints between path lengths implemented using a sequence of mathematical expressions shown by the green text in the parameter-definition window at the bottom of the screen. These mathematical expressions are used to model an Hg ligand bound to the N atom in the pyrimidine ring of the thymidine nucleotide. (The ball-and-stick figure is displayed using an external image viewer.)

ARTEMIS offers several tools to make optimal use of the information content in the data, including the co-refinement of independent EXAFS measurements, the selection of paths from multiple FEFF calculations, the evaluation of the fit using two or more values for k-weighting of χ2 data and the application of restraints. Each of these is implemented as an extension of a χ2 fitting metric (Bevington & Robinson, 2002link to reference).

(i) Multiple data-set refinement. A χ2 metric is evaluated for each data set and the sum is minimized. This allows a fitting model to consider structural features relevant to all measurements as a way of reducing the ratio of fitted variables to total information content. Examples include a temperature series or measurements on two or more atomic species in a crystal.

(ii) Multiple FEFF calculations. The sum of the paths selected from two or more calculations is used to evaluate the χ2 metric. This allows a fitting model to consider mixed phases, multiple crystallographic positions or any other effect which sees the absorbing atom in multiple coordination environments.

(ii) Multiple k-weighting. The χ2 metric is evaluated for each k-weighting value and the sum is minimized. This allows a fitting model to relax correlations between parameters which are differently sensitive to misfitting in different regions of k.

(iv) Restraints. Restraints are a way of encapsulating incomplete prior knowledge. For example, an Mathematical symbol value can be restrained to be in the range 0.7–1.0. This is implemented as a user-defined mathematical expression which is used as a penalty added in quadrature with χ2. This sum in quadrature is then minimized by the fit. With this restraint, Mathematical symbol is allowed to stray outside of the imposed bounds if the fit improves sufficiently to overcome the penalty applied to χ2. Another example is a bond-valence sum (Altermatt & Brown, 1985link to reference; Brown & Altermatt, 1985link to reference) used to restrain the evaluation of coordination number and first-shell distance to be consistent with the formal valence of the absorber.

Once a fit is completed, ARTEMIS generates a human-readable log file which tabulates best-fit values and error bars for all fitting parameters, correlations between fitting parameters, and statistical quantities such as χ2, reduced χ2 and an R factor which is interpreted as an evaluation of the percentage misfit. ARTEMIS keeps a history of fit results so that the user can evaluate the development of the fitting model.

A particular strength of ARTEMIS has been as a platform for the development of ways of using theory that go beyond the simple sum of discrete paths as presented in Zabinsky et al. (1995link to reference). ATHENA provides a tool for converting any Fourier-filtered data into the format of a FEFF path, allowing the user to mix empirical and theoretical standards in a fitting model. The re-implementation of the path-finder algorithm in ARTEMIS allows the binning of nearly degenerate paths (Ravel, 2014link to reference), helping to manage complexity in disordered structures. ARTEMIS provides tools for binning absorber–scatterer pairs from molecular dynamics and other structural simulations in a way that simplifies the integration of EXAFS with structural simulation tools (Price et al., 2012link to reference). Using the scattering functions computed by FEFF, ARTEMIS provides a tool for positioning a scattering atom at a distance not realized in the FEFF input data. This is helpful for understanding the effect of impurities on EXAFS spectra (Ravel, 2015link to reference).

4. XAFS software for XAFS users

In the period 2010–2015, ATHENA and ARTEMIS accounted for 70% of citations (http://apps.webofknowledge.com ) to XAFS analysis software in the scientific literature. (This figure is estimated from citation counts for the years 2010–2015 obtained for literature references to XAFS data-analysis packages identified by the Editors of this volume. Not all extant XAFS analysis packages have literature references and not all XAFS papers cite analysis software, thus the figure may be inaccurate.) This success rests on the high-quality physics and mathematics capabilities of the software components, IFEFFIT, LARCH and FEFF, used by ATHENA and ARTEMIS. However, most of the analysis packages discussed in this volume offer data processing equivalent to ATHENA. Many of them also use FEFF for EXAFS analysis and offer sophisticated data modelling similar to ARTEMIS. While the algorithms exposed by ATHENA and ARTEMIS are of high quality, there are other factors which contribute to the relative success of this software.

ATHENA and ARTEMIS can be used on any computing platform. They require only that C and Fortran compilers and the Perl interpreter exist. The package comes with building tools for any Unix platform and installers are available for major commercial desktop operating systems. The package is free of cost and freely redistributable, making it an attractive solution for students and for researchers in developing countries.

ATHENA simplifies the user's interaction with data. Default parameter values informed by years of collective experience with processing XAS data often allow data to be taken automatically from μ(E) to Mathematical symbol. As a result, ATHENA is useful for rapid data visualization at the beamline during an experiment as well as for detailed data processing after the experiment. While the most essential data-processing features, normalization, background removal, Fourier transformation and plotting, are presented to the user in an obvious manner, extensive automation along with advanced and configurable features are discoverable in the user interface. Thus, ATHENA is used by novices and experts. Because quantitative EXAFS analysis is a difficult and detail-oriented chore, ARTEMIS is a complex program. However, it too has a usable, configurable interface which offers a straightforward approach to simple EXAFS analysis problems while still making challenging EXAFS problems tractable.

Consistent support is another factor in the success of this software. Development has been continuous since 2002, with new work in progress as this text was written in 2016. Support for the use of the software is available through a moderated mailing list where users of all skill levels can ask questions and provide solutions. Documentation is actively developed for both programs. Training materials, including lecture videos, lecture notes, and tutorial data, are readily available.

Along with being effective tools both at the beamline and after the experiment, ATHENA and ARTEMIS are also tools for teaching and learning. Educators report that students quickly become self-sufficient using this software. Beamline scientists report that researchers from many scientific disciplines are able to use the software to teach themselves XAFS and to arrive at publishable results.

References

First citationAltermatt, D. & Brown, I. D. (1985). Acta Cryst. B41, 240–244.Google Scholar
First citationBevington, P. & Robinson, D. K. (2002). Data Reduction and Error Analysis for the Physical Sciences, 3rd ed. New York: McGraw-Hill.Google Scholar
First citationBridges, F., Wang, X. & Boyce, J. B. (1991). Nucl. Instrum. Methods Phys. Res. A, 307, 316–324.Google Scholar
First citationBrown, I. D. & Altermatt, D. (1985). Acta Cryst. B41, 244–247.Google Scholar
First citationCalvin, S., Carpenter, E. E., Ravel, B., Harris, V. G. & Morrison, S. A. (2002). Phys. Rev. B, 66, 224405.Google Scholar
First citationChantler, C. T., Barnea, Z., Tran, C. Q., Rae, N. A. & de Jonge, M. D. (2012). J. Synchrotron Rad. 19, 851–862.Google Scholar
First citationGoulon, J., Goulon-Ginet, C., Cortes, R. & Dubois, J. (1982). J. Phys. Fr. 43, 539–548.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 citationKrasner, G. E. & Pope, S. T. (1988). J. Object Oriented Program. 1, 26–49.Google Scholar
First citationLittle, S., Rolsky, D., Luehrs, J., Moore, S. M., Kogman, Y., Etheridge, K., Ragwitz, F., Pearcey, H. D., Prather, C. & Trout, M. S. (2016). Moose: A Postmodern Object System for Perl. http://moose.iinteractive.com/en/ .Google Scholar
First citationLytle, F. W., Sayers, D. E. & Stern, E. A. (1975). Phys. Rev. B, 11, 4825–4835.Google Scholar
First citationNewville, M. (2001). J. Synchrotron Rad. 8, 322–324.Google Scholar
First citationNewville, M. (2013). J. Phys. Conf. Ser. 430, 012007.Google Scholar
First citationNewville, M. & Ravel, B. (2024). Int. Tables Crystallogr. I, ch. 6.13, 791–795 .Google Scholar
First citationPrice, S. W. T., Zonias, N., Skylaris, C.-K., Hyde, T. I., Ravel, B. & Russell, A. E. (2012). Phys. Rev. B, 85, 075439.Google Scholar
First citationRavel, B. (2014). J. Synchrotron Rad. 21, 1269–1274.Google Scholar
First citationRavel, B. (2015). J. Synchrotron Rad. 22, 1258–1262.Google Scholar
First citationRavel, B. & Newville, M. (2005). J. Synchrotron Rad. 12, 537–541.Google Scholar
First citationRavel, B., Slimmer, S. C., Meng, X., Wong, G. C. L. & Lu, Y. (2009). Radiat. Phys. Chem. 78, S75–S79.Google Scholar
First citationRehr, J. J. & Albers, R. C. (2000). Rev. Mod. Phys. 72, 621–654.Google Scholar
First citationRehr, J. J., Booth, C. H., Bridges, F. & Zabinsky, S. I. (1994). Phys. Rev. B, 49, 12347–12350.Google Scholar
First citationSayers, D. E., Stern, E. A. & Lytle, F. W. (1971). Phys. Rev. Lett. 27, 1204–1207.Google Scholar
First citationWasserman, S. R. (1997). J. Phys. IV Fr. 7, 203–205.Google Scholar
First citationWilliams, T. & Kelley, C. (2016). Gnuplot: An Interactive Plotting Program. http://gnuplot.info .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