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.19, pp. 822-826
https://doi.org/10.1107/S1574870720003444

Chapter 6.19. Real-Space X-ray Absorption Package (RSXAP)

Corwin H. Bootha* and Frank Bridgesb

aLawrence Berkeley National Laboratory, Berkeley, CA 94720, USA, and bPhysics Department, University of California, Santa Cruz, CA 95064, USA
Correspondence e-mail:  [email protected]

The Real-Space X-ray Absorption Package (RSXAP) is a robust collection of codes for analyzing EXAFS and XANES data. These codes do not use some of the common mathematical approximations employed in such analyses. In particular, a background-subtraction method is employed that properly normalizes transmission EXAFS data as a function of k, and the pair-distribution function g(r) is directly applied when calculating EXAFS fitting curves. Error analysis utilizes a profiling method that is less dependent on a quadratic surface of the statistical χ2 as a function of fitting parameters near its minimum. A brief and incomplete summary of the features of this package is presented, as well as a discussion of some of its limitations.

Keywords: RSXAP.

1. Introduction

The Real-Space X-ray Absorption Package (RSXAP; Booth, 2016link to reference) is a collection of data-reduction and fitting routines for analyzing both EXAFS and XANES data that grew out of the analysis codes of Hayes & Boyce (1982link to reference). The programs currently only run on Unix- and Linux-based systems. The main routines for EXAFS are reduce and rsfit. Most programs can be run on batches of files for rapid processing. The guiding principle in these codes is to avoid certain approximations that are typically used in EXAFS analysis. For instance, a specific k-dependent background subtraction is performed that properly normalizes the data and does not require corrections to the Debye–Waller factors. Another example is that the usual k-space approximation of the effect of the pair-distribution variance, exp(−2k2σ2), is not used in favour of directly applying a pair-distribution function g(r), typically a Gaussian, in r-space. These and other important aspects of the methodology are discussed below.

The descriptions below focus on the reduce and rsfit programs, but many other codes are included in RSXAP for performing tasks such as converting data to RSXAP format, performing dead-time corrections (see, for example, Kappen et al., 2024link to reference), performing energy calibrations etc. Table 1link to table lists some of the most-used auxiliary programs. Some highlights include codes that also allow self-absorption corrections (Booth & Bridges, 2005link to reference), either within reduce or from the standalone code sabcor (Bridges & Booth, 2024link to reference), an F-test (Downward et al., 2007link to reference) with the standalone code hamilton or partially automated for individual scattering shells from within rsfit (Booth, 2024alink to reference), and an iterative technique for the determination of μ0(E) (Bridges et al., 1995link to reference), among many other features.

Table 1
Some of the most-used RSXAP auxiliary programs

ProgramPurpose
convgerm Converts as-collected data to the RSXAP binary format
glitch Used for removing glitches in batches of files
dead Fits dead-time curves to extract the dead time for both windowed and integrated count-rate (ICR) data from multi-channel fluorescence detectors
sug For averaging multi-channel detector data, performing dead-time corrections (including to ICR data) and removing data from individual channels over restricted energy ranges (such as from a Bragg diffraction)
sabcor Given information about the sample such as chemical makeup, perform a self-absorption correction to k-space data (Booth & Bridges, 2005link to reference; Bridges & Booth, 2024link to reference)
fites Allows the fitting of a XANES spectrum to a shifted sum of reference XANES spectra
fitcD, fitD, fitE For fitting σ2 versus T data to a correlated Debye, Debye or Einstein model
fitedge For fitting edge data to sums of pseudo-Voigts and integrated pseudo-Voigt (arctan-like) functions
gete0 Determines the energy of the first inflection point in a batch of files
shiftes Using the output of gete0, shifts a batch of files to an agreed reference energy
hamilton Evaluates the level of confidence that one fit is statistically significantly better that the other based on Mathematical symbol (%) and the degrees of freedom of the two fits (Downward, 2007link to reference; see also Booth, 2024alink to reference)

2. Data reduction

The program reduce allows data reduction from e-space to k-space and r-space by pre- and post-edge subtractions. There are several methods for determining various options, and only some are discussed here. It is important to note that the pre-edge subtraction method used by reduce to remove all unwanted background absorption processes from transmission data gives a proper energy-dependent normalization such that no so-called `McMaster corrections' (see Rehr et al., 1991link to reference) are required to obtain accurate Debye–Waller factors (Li et al., 1995link to reference). The importance of this normalization and the accuracy of the Debye–Waller factors obtained by this method are not generally appreciated by all EXAFS practitioners, and so we describe it more fully here. Pre-edge subtraction is accomplished for transmission data by constructing a function μpre(E) such that the absorption due to the atomic edge of interest, μe(E) = μ(E)tμpre(E)t, above the threshold energy E0 generally follows the energy dependence expected from a Victoreen formula (Victoreen, 1949link to reference). This is accomplished by automatically determining the step height at E0, Δμe(E0), by extrapolating linear fits in the pre- and post-edge regions to the energy at the half-height of the edge step, defining E0. The Victoreen values μvic(E) for the absorption of the given edge are determined above the edge from standard tables (Teo, 1986link to reference). A function fpre(E) is then defined differently above and below the edge. For E < E1,Mathematical equationand for E > E2,Mathematical equationwhere E1 and E2 define a range around the edge that is not used in the fit. The final μpre(E)t function is then typically determined by a fourth-order polynomial fit through fpre(E). This procedure is portrayed in Fig. 1link to figure, where μe is seen to be about 75% of Δμe(E0) at 1 keV above the edge.

[Figure 1]

Figure 1

Example of Cu K-edge transmission data and pre-edge absorption based on Victoreen absorption coefficients. The raw data, fpre (equation 1link to equation) and μpre, are shown in (a) and the normalized isolated absorption from the Cu K edge, μe, is shown in (b). The size of the gap in the function fpre(E) in the vicinity of E0 is determined by the user, but is typically chosen between the initial upturn at the edge and about 150–200 eV above E0. The dashed lines in (b) are meant to help to visually demonstrate the proper fall-off of the data with E, where μe is about 75% of Δμ(E0) at 1 keV above the edge for the Cu K edge.

Pre-edge subtractions for fluorescence data do not use tabulated absorption data, since the fluorescence efficiency is also a function of E. In addition, the progression of the measured fluorescence flux, If(E), is itself a strong function of the angle of the sample with respect to the beam and the detector [see Bridges & Booth (2024link to reference) on self-absorption corrections]. Fortunately, modern fluorescence detectors can often discriminate against absorption processes outside the edge of interest, and in these cases one need only fit the pre-edge data to a constant and subtract it. Other empirical methods are used when background fluorescence processes affect the measured data, and are discussed in the documentation.

Available methods to determine the post-edge atomic background function μ0(E) each use polynomial or spline fits, but there are many options. Spline knots can be at fixed intervals in some power of E, or the knots can be allowed to vary in energy. In both spline and polynomial fits the data can be weighted in different ways, such as increasing the weight by a power of E or forcing the data through the first data point in the fit range (Emin) or another data point of the investigator's choosing (Efix). Other function options exists. Once a function is determined, typically Emin (and sometimes Efix, if used) is allowed to vary such that the low-r part of the modulus of the Fourier transform (FT) is either minimized, fits best to a line or fits best to a quadratic function. Minimizing the modulus works best for systems with relatively far nearest neighbours, such as a metal, and a quadratic function works best for systems with close nearest neighbours, such as an oxide.

Using the low-r part of a transform as an indicator of the quality of the determination of μ0 is effective, but some atomic backgrounds have features that can limit the effectiveness of such a method, such as those due to so-called `atomic EXAFS' (AXAFS; Rehr et al., 1994link to reference) and multielectron excitations (Filipponi et al., 1988link to reference; Li et al., 1992link to reference; D'Angelo et al., 1996link to reference; Gomilšek et al., 2009link to reference). In this case, a theoretical model of the EXAFS can be employed to obtain better estimates of μ0. The method employed in RSXAP (Bridges et al., 1995link to reference) is to perform an iterative procedure where a first-guess estimate of μ0 is made using the techniques just described, followed by a shell fit to the data. The fit residual is then generated in e-space and a new estimate of μ0 is made by fitting to this residual. The process is iterated until a satisfactory fit to the Fourier transform of the data is obtained.

3. Data fitting

All EXAFS fitting using rsfit is performed in r-space. Furthermore, unlike many other EXAFS fitting routines, the pair-distribution function g(r) is applied and numerically convolved to obtain the final fitting function, allowing the actual Gaussian or any other form to be used rather than using the k-space exp(−2σ2k2) approximation, typically asMathematical equationThe convolution can be applied either in k-space or in r-space. In k-space, one may write χ(k) as a sum over shells ns asMathematical equationwhere a standard EXAFS curve Mathematical symbol for a given scattering (or multiple scattering) path i at a distance R′ is given byMathematical equationC3,i and C4,i are the third and fourth cumulants as described in Bunker (1983link to reference), Tranquada & Ingalls (1983link to reference) and Yang et al. (1977link to reference). Note that the second cumulant term that is normally present in the argument of the sine term of a k-space formulation is missing in equation (5)link to equation, since it is already included by explicitly integrating the Gaussian with the 1/R2 term (equation 4link to equation) in this r-space formulation (Hayes & Boyce, 1982link to reference). Threshold energy shifts ΔE0,i are included by defining the wavevector k = [k2 − (2me/ℏ2)E0,i]1/2, where k′ is the original wavevector of the standard curve. The standard curve can either be from an experimental standard or from a code such as FEFF (Rehr et al., 2010link to reference; Kas et al., 2024link to reference), in which case a single value of ΔE0 for all paths is generally used. χ(k) can then be Fourier-transformed to r-space, Mathematical equationwhere W(k) is a window function that accounts for the transform range (RSXAP uses a Gaussian-rounded window function).

The methodology employed in RSXAP reverses the order of the integration over R′ in equation (4)link to equation and the FT in equation (6)link to equation. In this case, the core fit function is written asMathematical equationwhere Mathematical symbol is the FT of the standard Mathematical symbol,Mathematical equationNote that the factor |Fi(k, R′)| implicitly includes any polarization dependence. A nice feature of this methodology is the easy and explicit R′ dependence of Mathematical symbol, which is trivially shifted in r when calculating a sample fit function in equation (7)link to equation. It is important to note that the Fourier transform Mathematical symbol is a complex function with a real and imaginary part. The quality-of-fit (residual) parameter Mathematical symbol is defined asMathematical equationwhere Mathematical symbol and Mathematical symbol are the real and imaginary parts of the FT of the data using the same W(k) as the similar fit function parts Mathematical symbol and Mathematical symbol.

The Mathematical symbol factor is minimized using the fitting routine STEPIT and uncertainties determined by FIDO (Chandler, 1965link to reference). As such, no derivatives are necessary or calculated. To estimate the parameter uncertainties, the parameter in question pi is varied while holding all other parameters fixed until the statistical χ2 is increased by unity, as described in Booth (2024alink to reference) and Booth & Hu (2009link to reference). This method not only allows better uncertainty estimates in complicated fitting landscapes where the assumption that the statistical χ2 is quadratic near its minimum is poor, but also naturally allows asymmetric uncertainties, such as are commonly observed for σ2 parameters.

4. Limitations

While RSXAP features accurate background-removal and fitting methodologies and is quite flexible, there are several limitations that make these codes difficult to use and employ, and some functionalities that are not included.

Regarding the methodology, multiple scattering can only be included by treating it as a separate standard curve Mathematical symbol, which is typically obtained theoretically. For instance, when using FEFF one can create a standard curve for a set of multiple-scattering paths by summing various paths together when creating a given Mathematical symbol. In this manner, the path can only be varied within the fit by varying the overall bond-length, Debye–Waller and other fitting parameters. A better method would be to recalculate the multiple scattering when bond-length changes are made in the fit. The codes do have a flexible constraint system that can be used to mimic certain types of multiple scattering, for instance constraining the effective bond length of the four-leg U–O–U–O scattering of an isolated U–O pair to be twice the U—O bond length.

As far as usability and portability are concerned, the codes only compile on Linux- and Unix-based systems, although much of the code now compiles under Windows as well. Although there is a graphical user interface, for complete functionality a text-based menu system is utilized that can be executed quite rapidly by experienced users. The routines are, however, very difficult to use for inexperienced investigators.

A missing functionality that may be added in the future is the ability to simultaneously fit multiple data files with shared fitting parameters. Another missing feature is to automate the iterative background technique (Bridges et al., 1995link to reference).

5. Example

As an example of a fit to EXAFS data using RSXAP, we present the data and fit results for a copper-doped ZnS nanocrystal phosphor described in full elsewhere (Car et al., 2011link to reference). This example is for illustrative purposes only and is not meant to be a complete report of these data and fits.

The Cu K-edge data were collected at 10 K on beamline 10-2 at the Stanford Synchrotron Radiation Lightsource (SSRL) using detuned Si(111) monochromator crystals. The error bars were calculated from five scans. This simple fit model assumes only one scattering shell, with the backscattering amplitudes and phases calculated by FEFF6 (Zabinsky et al., 1995link to reference). Other fit models are considered in Car et al. (2011link to reference). The main question to resolve is how the copper substitutes into the ZnS lattice.

The fits were performed using two methods for calculating the statistical χ2. Other methods are possible, and in fact parameter errors were obtained from individual fits of the five scans in Car et al. (2011link to reference). Here, the `statistical χ2' method minimizes a χ2 function based on equation (1) in Booth (2024alink to reference), where the individual errors per data point in r-space, ei, are determined by the distribution per data point of the five measured scans. In the `single e' method, all ei = e, with e chosen such that χ2 = ν, where ν represents the degrees of freedom of the the fit (see Booth, 2024alink to reference,blink to reference). The data and fit using the χ2 method are shown in Fig. 2link to figure in both k-space and r-space, and the results for both methods are reported in Table 2link to table.

Table 2
Fit results for the copper-doped ZnS data in Fig. 2link to figure

All parameters are for the Cu–S pair in this one-peak fit. The fit model is slightly altered from that in Car et al. (2011link to reference) for illustrative purposes. Results using two error-determination methods are reported as described in the text. Mathematical symbol is fixed at 0.98 for this example. The fit range is between 1.2 and 2.5 Å. The data have 7.4 independent data points (ν = 3.4). The estimated error per point from the `single e' method is 0.06, to give χ2/ν = 1.

 Statistical χ2Single e
N 3.15 (9) 3.2 (2)
σ22) 0.0064 (3) 0.0065 (7)
R (Å) 2.271 (2) 2.270 (9)
ΔE0 (eV) −8.8 (5) −8.7 (5)
Mathematical symbol (%) 4.6 4.5
χ2 16.8 3.4 (defined)
[Figure 2]

Figure 2

Data and fit results for Cu K-edge data from copper-doped ZnS in both (a) k-space and (b) r-space. This example is illustrative only; for a complete workup of these data, see Car et al. (2011link to reference). The average data and error bars are calculated from five scans, each of which was reduced separately. The data are fitted in r-space between the limits shown by the vertical dotted lines, and the transform is between 3.5 and 10.0 Å−1, narrowed using a Gaussian window with a 0.3 Å−1 width. It is important to note that while the fit quality in r-space is easily judged over the given fit range, the k-space fit (red) must be compared with the filtered data (green) backtransformed from r-space over the fit range, not the unfiltered data (black). It is somewhat difficult to see the filtered data behind the fit line in k-space.

In this case, the estimated errors are similar between the two methods, but the `single e' method gives more conservative error estimates, which is generally the case due to the enhancement of the statistical χ2 from systematic uncertainties (Booth, 2024blink to reference). Note that while asymmetric errors are calculated, only the larger of the two errors is reported.

The near-neighbour coordination has four sulfur neighbours around zinc at a distance of 2.34 Å. The fit results in Table 2link to table are not consistent with a simple substitution of Cu for Zn atoms in this structure. In fact, copper has a reduced coordination of about 3.2 ± 0.2 neighbours at a distance of 2.27 ± 0.01 Å. A model is discussed in Car et al. (2011link to reference) that rationalizes these results with an off-centre displacement of the Cu atom within the sulfur tetrahedron in the presence of a sulfur vacancy.

Acknowledgements

Portions of this work were supported by the US Department of Energy (DOE), Office of Science (OS), Office of Basic Energy Sciences (OBES) under Contract No. DE-AC02-05CH1123. EXAFS data were collected at the Stanford Synchrotron Radiation Lightsource, which is supported by the US DOE, OS, OBES under contract No. DE-AC01-76SF00515.

References

First citationBooth, C. H. (2016). RSXAP Analysis Package. http://lise.lbl.gov/RSXAP/ .Google Scholar
First citationBooth, C. H. (2024a). Int. Tables Crystallogr. I, ch. 5.8, 672–675 .Google Scholar
First citationBooth, C. H. (2024b). Int. Tables Crystallogr. I, ch. 5.9, 676–677 .Google Scholar
First citationBooth, C. H. & Bridges, F. (2005). Phys. Scr. 2005, 202.Google Scholar
First citationBooth, C. H. & Hu, Y.-J. (2009). J. Phys. Conf. Ser. 190, 012028.Google Scholar
First citationBridges, F. & Booth, C. H. (2024). Int. Tables Crystallogr. I, ch. 3.44, 564–566 .Google Scholar
First citationBridges, F., Booth, C. H. & Li, G. G. (1995). Physica B, 208–209, 121–124.Google Scholar
First citationBunker, G. (1983). Nucl. Instrum. Methods Phys. Res. 207, 437–444.Google Scholar
First citationCar, B., Medling, S., Corrado, C., Bridges, F. & Zhang, J. Z. (2011). Nanoscale, 3, 4182–4189.Google Scholar
First citationChandler, J. P. (1965). STEPIT and FIDO. Quantum Chemistry Exchange Program, Department of Chemistry, Indiana University, Bloomington, USA.Google Scholar
First citationD'Angelo, P. H.-F., Nolting, H. & Pavel, N. V. (1996). Phys. Rev. A, 53, 798–805.Google Scholar
First citationDownward, L., Booth, C. H., Lukens, W. W. & Bridges, F. (2007). AIP Conf. Proc. 882, 129–131.Google Scholar
First citationFilipponi, A., Bernieri, E. & Mobilio, S. (1988). Phys. Rev. B, 38, 3298–3304.Google Scholar
First citationGomilšek, J. P., Arčon, I., de Panfilis, S. & Kodre, A. (2009). Phys. Rev. A, 79, 032514.Google Scholar
First citationHayes, T. M. & Boyce, J. B. (1982). Solid State Phys. 37, 173–351.Google Scholar
First citationKappen, P., Wykes, J. & Johannessen, B. (2024). Int. Tables Crystallogr. I, ch. 3.37, 528–536 .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 citationLi, G. G., Bridges, F. & Booth, C. H. (1995). Phys. Rev. B, 52, 6332–6348.Google Scholar
First citationLi, G. G., Bridges, F. & Brown, G. S. (1992). Phys. Rev. Lett. 68, 1609–1612.Google Scholar
First citationRehr, J. J., Booth, C. H., Bridges, F. & Zabinsky, S. I. (1994). Phys. Rev. B, 49, 12347–12350.Google Scholar
First citationRehr, J. J., Kas, J. J., Vila, F. D., Prange, M. P. & Jorissen, K. (2010). Phys. Chem. Chem. Phys. 12, 5503.Google Scholar
First citationRehr, J. J., Mustre de Leon, J., Zabinsky, S. I. & Albers, R. C. (1991). J. Am. Chem. Soc. 113, 5135–5140.Google Scholar
First citationTeo, B. K. (1986). EXAFS: Basic Principles and Data Analysis. New York: Springer-Verlag.Google Scholar
First citationTranquada, J. M. & Ingalls, R. (1983). Phys. Rev. B, 28, 3520–3528.Google Scholar
First citationVictoreen, J. A. (1949). J. Appl. Phys. 20, 1141–1147.Google Scholar
First citationYang, D. S., Fazzini, D. R., Morrison, T. I., Tröger, L. & Bunker, G. (1997). J. Non-Cryst. Solids, 210, 275–286.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