## q2xafs workshop

## A tool to plan photon-in/photon-out experiments: count rates, dips and self-absorption

^{a}Dipartimento di Fisica, Politecnico di Milano, Piazza Leonardo da Vinci 32, 20133 Milano, Italy, and ^{b}European Synchrotron Radiation Facility, 6 Rue Jules Horowitz, 38043 Grenoble, France^{*}Correspondence e-mail: glatzel@esrf.fr

A program that helps to plan experiments where the emitted X-rays are detected is presented. The tool is based on the standard formula for fluorescence-detected X-ray absorption spectroscopy and uses tabulated parameters to estimate count rates. The objective is to evaluate the feasibility of an experiment, estimate the influence of self-absorption on the spectral shape and investigate the possibility of range-extended *i.e.* a decrease in the detected signal, is discussed.

Keywords: XAS; HERFD; fluorescence detection; self-absorption; XES.

### 1. Introduction

The most common application of photon-in/photon-out spectroscopy is fluorescence-detected absorption spectroscopy. The technique is referred to as total *e.g.* using a photodiode). Solid state detectors may have resolving powers *E*/Δ*E* of up to 40 which allows X-ray events that do not arise from the element of interest to be windowed out. This considerably increases the sensitivity for measurements on dilute systems (Jaklevic *et al.*, 1977; Cramer *et al.*, 1988). The in the detection of the emitted X-rays can be further increased using Bragg reflections of perfect crystals (*E*/Δ*E* > 5000), *i.e.* the same principle that is used for selecting the incident energy. A wavelength-dispersive detection scheme has two main advantages. First, the suppression of background from unwanted X-ray events is further improved (in fact, the background is removed in most cases) and thus the sensitivity of the technique is in principle maximized. Second, the experimental energy bandwidth can be of the order of the core hole lifetime and resonance phenomena can be observed often leading to sharper spectral features (Hämäläinen *et al.*, 1991; Glatzel & Bergmann, 2005; Hayashi, 2008). The first advantage is currently not fully exploited owing to limitations in the luminosity (captured solid angle, crystal reflectivity) of existing instruments and the increase in sensitivity is therefore consumed by a loss in counting statistics. This is likely to improve in the near future as instruments with higher luminosity are being constructed. The second advantage has found its way in the literature under the acronym (high-energy-resolution fluorescence-detected) (de Groot *et al.*, 2002; Glatzel *et al.*, 2005; van Bokhoven *et al.*, 2006). The pitfalls of have been discussed by various authors and shall not be addressed here (Carra *et al.*, 1995; Glatzel & Bergmann, 2005; Glatzel *et al.*, 2009). A wavelength-dispersive set-up is also used in resonant inelastic X-ray scattering (RIXS) or resonant X-ray emission spectroscopy (RXES) (Ament *et al.*, 2011; Kotani & Shin, 2001; de Groot, 2001), non-resonant and X-ray Raman spectroscopy (Huotari *et al.*, 2011; Wernet *et al.*, 2004; Bergmann *et al.*, 2003; Fister *et al.*, 2008).

The second step when conceiving a photon-in/photon-out experiment (the first step is the idea) is usually evaluation of the feasibility. There are tools for *i.e.* photon-in/photon-out experiments. The tool presented here is basic, partly empirical and only serves as a guide. In many cases some parameters (*e.g.* crystal reflectivity) have to be calibrated first using the count rate from a standard sample. The predictions using the calibrated parameters were then found to be quite accurate. We thus think that this tool is rather useful not only for planning an experiment but also for investigating some interesting phenomena of fluorescence-detected It shall thus be shared with the community (the program can be obtained from the authors). The code currently runs under MATLAB but a standalone version will be made available soon.

### 2. Basics

It is experimentally often favourable to use methods other than transmission detection to obtain the τ. The energy that is released in the decay or secondary process can either be carried by an outgoing electron (Auger) or a photon (fluorescence). Detection of the outgoing electrons of all kinetic energies is called total electron yield (TEY) and that of all photons of all energies total (TFY). If the is realised with an energy- or wavelength-dispersive instrument it is possible to further discriminate between the decay channels, *e.g.* only the *K*α fluorescence lines. The techniques should then be referred to as partial yield detection. An instrumental resolution in the that is of the order of the core hole lifetime broadening or even below may enable one to observe resonance phenomena in the decay channel.

Detection of the intensity of a secondary process as a function of the incident energy that is tuned across an

may be proportional to the to sufficient accuracy. This assumption is the pre-requisite for all schemes which aim to measure the absorption This is, however, not necessarily always the case. may be a good approximation to the when the dominant decay channel is chosen, for example, the dominant fluorescence lines in the hard X-ray range when not detected in high-resolution mode.Second-order photon-in/photon-out experiments follow the Kramers–Heisenberg equation. We note that this holds also for non-resonant X-ray emission, *i.e.* fluorescence, after (Glatzel *et al.*, 2001).

### 3. Estimate of count rates

The count rate in the emission detection is estimated using the formula below (Jaklevic *et al.*, 1977; Goulon *et al.*, 1982; Bunker, 2009) with incident energy *E*, fluorescence energy *E*_{f} and captured solid angle Ω,

where *g* = sinθ/sinφ. The geometry is shown in Fig. 1. We do not consider variation of the angle φ across the detector surface which will influence the self-absorption (see below). The of the sample is the sum of the coefficient of the element of interest (`absorber') and all other elements: μ_{tot} = μ_{abs} + μ_{else}. Only the absorber subshell (*i.e.* edge of interest) with ∊_{abs} that gives rise to the recorded emission line is considered in . We use the jumping ratio *J* to scale μ_{abs}(*E*) in order to consider only the photoelectric of the shell of interest (and not shells with lower binding energy that do not contribute to the fluorescence): = μ_{abs}τ with τ = (*J* − 1)/*J* (Brunetti *et al.*, 2004). The for the selected emission line is treated as a step function of incident energy that is zero below the edge of interest and ∊_{abs} above [where ∊_{abs} is loaded from tabulated values and represents the probability that the core hole is filled *via* a radiative instead of a non-radiative (*e.g.* Auger) transition; we also include the fractional yield per subshell, loaded from tabulated values, to take into account only the emission from the fluorescence line of interest].

Equation (1) has been discussed by various authors, in particular the thin/thick limits of dilute/concentrated samples. We do not use any approximation of (1) except when evaluating the self-absorption (see below).

In the following we give a brief description of the structure and functioning of the software. The first step for the user is to set the input parameters in the graphical user interface (GUI) shown in Fig. 2.

The program gives the option to define the sample concentration either for a liquid or by providing the stoichiometry. This is simply a matter of convenience since all samples can be defined using the stoichiometry and density. In the first case the user has to provide the solvent together with the concentration of the absorber element expressed in molarity. The total attenuation of the solvent is considered, *i.e.* not only the photoelectric absorption. Alternatively, the absorber element is given together with all other elements present in the sample. The stoichiometry entry is a vector with length that corresponds to the number of elements in the sample. The concentration can then be varied either by changing the stoichiometry or by adjusting the weight percent of the absorber atom. The applies to the full composition.

The sample thickness has to be provided and the incident and outgoing angle and energy. It is possible to specify only the edge and emission line of interest and the program will find the energies in tabulated values (click on *Find Energy*) (Henke *et al.*, 1993; Sanchez del Rio & Dejus, 2011; Chantler, 1995). Using the defined edge and fluorescence line the program looks up the jumping ratio and fluorescence yield.

A set of additional parameters is further required that are grouped under *Geometrical/Spectrometer Parameters*. The total number of incident photons (flux) is the starting point to obtain an estimate of the absolute counts on the emission detector. The beam size is only used to determine the on the sample. The is given for a subshell (see entry in *Emission*) and depending on the energy bandwidth in the emission detection not all emission lines for the given subshell may be recorded, *e.g.* when Δ*E*_{em} = 1 eV only part of the *K*α lines is covered. This is considered in the entry *Detected Line Fraction*.

The captured solid angle is determined using the radius for each detector element, the distance from the sample and the number of elements. The detector efficiency or analyzer crystal reflectivity further reduces the count rate. Possible absorption in air or windows can be included. The above parameters are lumped together in the variable *K* in equation (2) (see below).

The program loads the photoelectric cross sections (in units of barns atom^{−1}) and interpolates it on an energy scale with 1 eV step size (the tabulated values have very large energy steps since they cover the entire range 1–30 keV). Independent interpolations are carried out before and after the edge in order to obtain a steep edge jump. Fig. 3 shows the output for a sample containing Ru, Ti and O.

The total counts *I*_{f} on the X-ray emission detector are evaluated as

where *I*_{0} is the incident *y* is the result of (1) and *K* considers all parameters defined under *Geometrical/Spectrometer Parameters*.

*X-count* has four main typologies of displaying the results. If the concentration of the absorber element, thickness of the sample and incident photon energy are scalar inputs, the counts are simply displayed on the screen of the current MATLAB session, together with additional information about the sample. The user can select a variable concentration, thickness or incident energy (by typing vectors in MATLAB syntax, *e.g.* 0.01:0.01:1 for a vector from 0.01 to 1 in steps of 0.01). In this case outputs will be plots having these variables on the abscissa and counts on the ordinates.

The authors have found that an effective way of using the interface is to first obtain experimentally the count rates on a known sample, *e.g.* a metal foil or a stable compound of the element of interest. Self-absorption effects are considered in (1) and the reference sample does not need to be dilute. In the next step the X-ray detection parameters in the GUI are adjusted such that the program reproduces the results. The interface can then be used to estimate the counts in more complex samples, *e.g.* 0.1 wt% of Fe in TiO_{2}. It is obvious that the strength of the program lies in the estimate of count rates in the presence of other strongly absorbing elements and of highly dilute systems.

### 4. Options

Further options are available to simulate experimental results in more detail. These are evaluation of the X-ray emission detected absorption scan when several elements contribute to the fluorescence signal (*Correction*), an estimate of the amount that an will be reduced owing to self-absorption effects, and a tool to estimate the required total counts when spectral differences are to be detected (*e.g.* in pump-and-probe experiments and dichroism).

#### 4.1. Corrections

Most samples are complex systems that contain many elements. If the incident photon energy is above the *i.e.* not the element of interest), additional fluorescence lines may be emitted that are sufficiently close to the fluorescence line of interest that some additional fluorescence intensity is recorded. *X-count* provides the option to add the fluorescence of another element that is present in the sample in order to simulate the spectrum that would be recorded under these conditions. The and emission line have to be chosen and a coefficient *c*, representing the fraction of this emission that is leaking into the detector. The pre-factor ∊_{abs}μ_{abs} in (1) is replaced by [∊_{abs}μ_{abs} + *c*(∊_{elem2}μ_{elem2})]. This approach is rather crude because the X-ray emission energy bandwidth and fluorescence energy difference are not taken into account (the user has to estimate the factor *c*) but it serves the purpose to study the influence of the additional line.

We first assume that no additional fluorescence is recorded (the factor *c* is 0). When the incident energy reaches the edge of the second element (typically above the edge of the element of interest) the *total* absorption in (1) will increase leading to a decrease in the detected signal *y* and the experimentalist will measure a dip in the spectrum (Holroyd *et al.*, 1992; George *et al.*, 1990). This can be understood by the fact that when tuning above the of a second element fewer photons can be absorbed by the element of interest because of the competing cross sections leading to lower fluorescence emission. Recently, some authors reported dips in fluorescence-detected absorption spectra in the soft X-ray range (Aziz *et al.*, 2010). They assigned the decrease in fluorescence signal to an ultra-fast from the photoexcited ion to the solvent. For this kind of detailed quantitative analysis a comprehensive analysis of the incident-beam self-absorption processes (and other mechanisms that may lead to spectral deviations from the linear absorption coefficient) is necessary.

In case some fluorescence emitted from the second element gives signal on the detector we have to introduce the μ_{elem2} in the pre-factor of (1). This implies that the dip is reduced and, as *c* increases, the spectrum may show an additional positive edge. For *c* = 1 the spectrum will correspond to a scan that fully includes the fluorescence from both elements.

A total *i.e.* the fluorescence emitted from all elements in the sample without any emission energy discrimination, can also be generated. In this case the pre-factor ∊_{abs}μ_{abs} is substituted by (∊_{abs}μ_{abs} + ∊_{elem2}μ_{elem2} + … + ∊_{elemN}μ_{elemN}), where *N* is the number of elements. However, it must be underlined that no information on the absorption/emission lines that are actually recorded in the total fluorescence is given. Thus jumping ratios and fractional are not considered. The output plots only have a qualitative value.

Fig. 4 shows experimental data on CoFe_{2}O_{4} and the simulated output from *X-count*. The behaviour of the signal recorded using an emission spectrometer with Δ*E* = 1 eV, *i.e.* sufficient to fully discriminate between the Fe and Co fluorescence lines, and from a photodiode, *i.e.* without emission energy discrimination, is nicely reproduced.

It is obvious that the dip (or edge) present in Fig. 4 does not allow for an analysis of the extended X-ray absorption fine structure (EXAFS). It is, however, interesting to analyse the behaviour of the dip as a function of concentration and sample thickness. Several authors have shown that for thin samples the expansion of the exponential function in (1) leads to a linear dependence of *y* on μ_{abs}(*E*) (Bunker, 2009). The second edge will thus disappear in on dilute samples and a range-extended analysis becomes possible (Glatzel *et al.*, 2005). The condition for reducing the dip and avoiding spectral distortions owing to incident-beam self-absorption (see below) are similar. Consequently, choosing a favourable experimental geometry (*i.e.* the angles θ and φ) may also help to suppress the dip. The program *X-count* can help to determine the required experimental conditions to sufficiently reduce the signature of the second edge.

Recently a method has been proposed to measure the inverse partial *et al.*, 2011). The idea behind this approach is to use the fluorescence signal of another element, *i.e.* not the absorber element with μ_{abs} but a signal entirely free of any dependence on μ_{abs}, as a `probe' to detect the attenuation of the incident beam owing to the absorption of the element of interest. One measures the variation of photons interacting with the probe atom while scanning through the edge of the element of interest. One observes a pronounced dip in the recorded spectrum (see above) whose inversion gives a spectrum proportional to μ_{abs} (assuming that the variation of μ_{else} = μ_{all} − μ_{abs} is small across the of μ_{abs}).

#### 4.2. Range-extended EXAFS

We used *X-count* to analyze range-extended data on the multi-protein complex photosystem-II that is found in plants and algae (Pushkar *et al.*, 2007; Yano *et al.*, 2005). The oxygen-evolving complex in photosystem-II contains a Mn_{4}Ca cluster that reduces water to molecular oxygen. has been exploited to study the Mn—Ca and Mn—Mn distances in Mn_{4}Ca clusters giving crucial input to elucidate the structure of the oxygen-evolving complex.

The main problem in the *e.g.* in standard solid state detectors. The energy range beyond the Fe edge can thus not be used for an analysis which results in a lower resolution when determining interatomic distances. An appropriate solution to eliminate such a step is a high-energy-resolution spectrometer, which enables all Fe contribution in the fluorescence detection to be removed. However, such a solution may create a dip in the spectrum as we discussed before, which is equally problematic for data analysis.

Fig. 5 shows how to reduce the dip either by making the sample thinner or by sufficiently diluting the sample. We assumed that only Mn fluorescence is recorded and the sample thickness was 0.1 mm (when constant). The amount by which the dip needs to be reduced is determined by the magnitude of the oscillations. We assume here that the dip should be 1% or less of the edge jump. Fig. 6 shows the ratio between the height of the iron dip and the manganese edge jump as a function of Mn concentration (ratio between water molecules and Mn atoms). With a thickness of 0.1 mm we observe that the dip will be less than 1% of the edge jump for concentrations lower than 2.77 m*M* of Mn (3.35 × 10^{22} atoms cm^{−3} of solvent and 1.67 × 10^{18} Mn atoms cm^{−3}). Indeed, in the work of Pushkar *et al.* (2007) data were acquired with a concentration of Mn that was <1m*M* and the dip is not noticeable.

Interestingly, this also works to remove *L*-edges of the same element at higher energies. The dips in Fig. 3 can also be removed by diluting the sample assuming that the fluorescence only arises from one This is discussed in more detail by Glatzel *et al.* (2005).

We note that the dip is only observed when the second element is in the beam path of the element of interest. In layered samples, for example, the dip will not be observed when the element of interest is in the first layer and all other elements with possibly interfering edges are behind, *i.e.* downstream of the incident beam. This was successfully used by Hübner *et al.* (2011) to measure range-extended Pt in the presence of Au.

#### 4.3. Evaluation of incident-beam self-absorption

The recorded signal *y* [*cf.* equation (1)] and μ_{abs}(*E*) do not have a linear relation. A linear relation is, however, the requirement for any with the aim to record the The absorption of the element of interest μ_{abs}(*E*) also appears in μ_{tot}(*E*), *i.e.* in the denominator and in the exponential function of (1), because the intensity of the emitted fluorescence also depends on how deep the incoming X-rays penetrate into the sample, *i.e.* how many atoms the incident beam interacts with. The dip in the recorded signal that we discussed before has the same origin but is caused by another element. In the case of incident-beam self-absorption (IBSA) the dip appears at the of interest (because it is caused by the same element, *i.e.* `self-absorption') and thus compresses the recorded spectral features as compared with the real variation of the absorption coefficient.

Incident-beam self-absorption affects fluorescence-detected ; Pfalzer *et al.*, 1999; Tröger *et al.*, 1992; Zschech *et al.*, 1992; Eisebitt *et al.*, 1993; Haskel, 1999). The program uses a simple way to estimate the spectral distortion owing to IBSA. The purpose is thus not to correct recorded data but to guide the experimentalist either when preparing the sample, *i.e.* when the element of interest can be sufficiently diluted in order to obtain a linear response of the fluorescence signal, or to estimate possible systematic errors when analyzing relative spectral intensities, *e.g.* the pre-edge intensity in the absorption *K*-edge of 3*d* transition metals.

It is important to note that absorption of the emitted X-rays in the sample is also often referred to as `self-absorption' or `re-absorption' but this mechanism does not give rise to any spectral distortion (see below) in ). Some authors use the term `saturation' to describe the spectral distortion owing to IBSA. In our opinion, `saturation' more appropriately describes the behaviour of, for example, data acquisition electronics that fail to handle all X-ray events in the case of high count rates, *i.e.* they `saturate'. The resulting spectral distortion may look similar in both cases (but they are not). The following discussion is intended to clarify some aspects of IBSA.

A secondary detection measurement requires the measured quantity to be directly proportional to the μ_{abs}(*E*). It is useful to rewrite (1) as

where we neglect the constant terms (IBSA is evaluated as a relative error, see below) and where *x* = μ_{abs}(*E*), α = μ_{else}(*E*) + *g*μ_{tot}(*E*_{f}) and β = *d*/sinθ.

##### 4.3.1. Different ways to estimate IBSA

One can conceive different ways of quantifying self-absorption effects. One approach is to approximate (3) with an expression that is linear in *x* and evaluate IBSA as the ratio between the observed signal and an assumed signal based on the linear expression. We discuss in the following several ways of realising this approach. The percentage IBSA is then defined as

Alternatively, one can simply vary the

of the element of interest and calculate the variation of the recorded counts. If the recorded counts vary less than the induced variation of the one observes spectral distortion owing to IBSA. This `basic' approach is also discussed in the following.*Taylor 1.* One straightforward way to estimate IBSA is to use a Taylor expansion. One can rewrite (3) in the neighbourhood of *x* = μ_{abs} = 0. This leads to

The resulting expression is linear in *x*, *i.e.* μ_{abs}(*E*), and it holds for dilute samples, both when they are optically thin [1 − exp(−βα) → βα and *y*_{IBSA} = *x*β] and thick [*i.e.* the absorber is dilute in an optically thick sample where exp(−βα) → 0 and *y*_{IBSA} = *x*/α]. The strength of this approach is in its physical interpretation: the Taylor expansion in fact leads to an expression where the of the absorber element is neglected during the path of the incoming X-ray beam, which is the origin of spectral distortion owing to IBSA. The exponent and the denominator retain only the of all other elements in the sample for the incoming beam. For the outgoing photons at energy *E*_{f}, however, the absorption of all elements is considered including the element of interest because it occurs at a fixed energy. This nicely demonstrates that re-absorption of the emitted photons does not cause a spectral distortion and still allows a signal to be recorded that is proportional to the absorption coefficient.

Neglecting the incoming beam absorption by the element of interest completely is a rather strong approximation. It gives exaggerated percentages for IBSA for concentrated samples. The approximation assumes that the incoming X-rays create core holes in the atoms of the element of interest (*i.e.* the photoelectric absorption that gives rise to the fluorescence) but the penetration length is solely determined by the absorption of all other elements present in the sample. Since this gives a longer penetration, the approximation in (5) gives a higher but linear signal. The estimate becomes more reliable the more dilute the element of interest is (*x* << α), *i.e.* the more appropriate the sample is for fluorescence-detected XAS.

One can think of several ways to make the approximation described above less drastic. For example, one could state that, instead of neglecting completely the absorption by the absorber element in the incoming X-ray path, the absorption can be considered to be constant and set equal to, for example, the pre-edge value of absorption μ_{abs}(*E*_{pre}) = *x*_{min}. The resulting expression is

Although this approach gives more realistic numerical values, there does not seem to be a good mathematical justification for this procedure.

*Taylor 2.* A third option uses again a Taylor expansion but instead of around *x* = μ_{abs} = 0 it is performed around *x*_{min}, *i.e.* the before the edge. This is mathematically rigorous and it gives

This expression approaches the Taylor expansion around 0 when the sample is thin or dilute, *i.e.* when the ratio between the absorption of the absorber element and the absorption of other elements σ_{abs}/σ_{else} << 1. The problem with this approach is its physical interpretation. The edge jump is usually a large step in terms of increase of absorption and the Taylor expansion becomes a very poor approximation.

*Basic approach.* The spectral distortion owing to IBSA is due to the fact that a certain increase of the photoelectric of the absorber atom does not correspond to an equal increase of the observed signal. The `basic' approach simply implements this observation. First, the program determines the fluorescence counts using the tabulated Then the calculation is repeated using a scaled *i.e.* the tabulated value multiplied by a given scaling factor *m*. The tabulated values used in the program correspond to the edge jump and a scaling of *m* = 1.2 would thus simulate a white line with maximum at 1.2 of the edge-jump normalized spectrum.

The photoelectric τ)μ_{abs} for all other cross sections, we can use the jumping ratio and scale the total in the denominator and exponential function of (1) by (1 + *m*τ − τ). We find the calculated ratio of fluorescence counts scaled by a factor *n* in the case of spectral distortion. As a formula,

For example, if one doubles the *m* = 2) one may find the fluorescence counts increased by only a factor of 1.5 and *n* ≃ 1.33. This means that for a white line with twice the of the edge jump one observes only a factor of 1.5 in the recorded counts. A value of *m* = 0.1 can be used to estimate the IBSA in a weak pre-edge feature. For *n* = 1 no IBSA is observed and *n* = *m* means that IBSA wipes out any change in the fluorescence signal. We define the percentage IBSA as

Ablett *et al.* (2005) performed a comprehensive study of self-absorption effects in Ni foils that nicely serves as a test case to verify the results of the program. For the cases that we studied we find that (6) [with (4)] and the basic approach with (9) give similar values ±1%.

The spectral distortion owing to IBSA depends on the absorber is thus a function of incident energy *E*, *i.e.* no constant value that describes the IBSA can be associated with a given measured spectrum. The re-absorption at energy *E*_{f} influences how strong the spectral distortion is but does not give rise to the distortion.

Incident-beam self-absorption is minimized either by making the sample optically thin or by maximizing α = μ_{else}(*E*) + *g*[μ_{else}(*E*_{f}) + μ_{abs}(*E*_{f})] in the denominator of (3) in the case of optically thick samples. This can be done either by uniformly admixing (strongly) absorbing material in order to increase μ_{else} or by reducing the emission angle φ in order to maximize *g* = sinθ/sinφ, *i.e.* grazing-emission measurements give the best result (Pease *et al.*, 1989). It is useful to note that all attempts to reduce spectral distortion owing to IBSA in photon-in/photon-out measurements result in weaker signals. In TEY measurements the absorption of the outgoing signal (electrons) is very high which is equivalent to very large values for μ(*E*_{f}) and thus very small IBSA effects because of large values for α. By choosing 1 eV for the emission energy the program sets 1/μ_{tot}(*E*_{f}) to 10 nm approximating the escape depth of electrons.

Figs. 7 and 8 show examples for IBSA effects in Mn doped into GaN and in TiO_{2}. IBSA is here evaluated with the `basic approach'. The detected counts become non-linear as a function of Mn concentration when IBSA is significant and the variation of the observed signal when the Mn is varied by *m* visibly deviates from *m*. IBSA at the Mn *K*-edge in Mn_{x}GaN is estimated to be about 51% in the white line (*m* = 1.2) for *x* = 1 and becomes negligible below *x* = 0.01. IBSA is larger than 70% in a thick sample of TiO_{2} and decreases below 10% only for samples that are thinner than 1 µm. The grain size is usually larger than 1 µm and recording an IBSA-free spectrum at the Ti *K*-edge often is very challenging. The recorded counts plateau at sample thicknesses above about twice the attenuation length (∼5 µm).

### 5. Spectral differences

Experiments where the differences between two spectra are measured, for example, dichroism or pump-and-probe-measurements, are often demanding with respect to the required experimental accuracy. The program can be used to estimate the total number of counts in order to have the measured difference statistically significant. The counts *C* are given for (e)xcited, (p)umped and (g)round state. We first require a certain signal-to-noise (SN) ratio in the measured difference spectrum,

The relative spectral difference DF (*cf.* Fig. 9) between the ground and is

The measured spectrum *C*_{p} may only be a fraction *f* of the spectrum *C*_{e},

All this combines to give an equation for the required counts,

In practice, the counts in the experimental spectrum should be at least as high as estimated in (13) in order to be able to observe the spectral difference. For dichroism experiments the fraction may be 1. We note that we have neglected any background and statistical error in the incoming measurement.

Fig. 9 shows the output of the program. All previously discussed parameters are used in order to determine the total counts. Note that in this case the entry for becomes the total number of incoming photons (not photons s^{−1}). Equation (13) is then used to determine the required total number of incoming photons per data point. The figure shows an example for ground, excited and pumped spectra assuming a Gaussian peak. The difference spectrum is shown for the given total number of incoming photons and also the minimal difference spectrum based on the requested signal-to-noise ratio. Note that the counts are given for one data point. In order to determine the measurement time for a given incoming the counting time per data point has to be multiplied by the number of points in one spectrum. Additionally, the difference spectrum is shown assuming all experimental parameters as described before.

For the example in Fig. 9, we find that we need about 5 × 10^{12} incoming photons per data point to achieve a signal-to-noise ratio of 4 assuming a pump rate of 0.2 and a spectral difference of 0.3. The sample is a 5 m*M* solution of Fe in a liquid jet of 0.1 mm thickness that gives us in the maximum of the *K*α_{1} emission line 23000 counts per 10^{13} incoming photons (*cf.* Fig. 9) (Vanko *et al.*, 2010). Unfortunately, not all incoming photons of an undulator beamline can be used in laser pump-and-probe experiments because the frequency of the laser often does not match the frequency of the synchrotron radiation source. Assuming that we can still use 10^{11} incoming photons per second we find that we need 50 s per data point and thus 5000 s for a spectrum with 100 data points.

### 6. Conclusions

The objective of the presented software is to plan fluorescence-detected absorption experiments. It can, of course, also be used to estimate resonant and non-resonant X-ray emission experiments (XES, RXES, direct RIXS) whenever the cross sections and yields are tabulated. As a rule of thumb one can assume the *K* absorption pre-edge in 3*d* transition metals to be a factor of ten weaker than the edge. In all cases the results can only serve as a guide. A more realistic estimate could be obtained by using correctly measured values for the absorption coefficients.

We also stress that correct treatment of a only helps to avoid few of many possible sources of errors. Other errors arising from the sample (*e.g.* Bragg peaks, inhomogeneity *etc.*) or the detection system (non-linearity *etc.*) also have to be carefully checked (Chantler, 2010). Furthermore, the experimental error always has to be put into context with the required accuracy in the analysis. While some techniques are very demanding (*e.g.* those that require high accuracy in intensity measurements), others may be more forgiving. However, the experimental error has to be known in all cases.

Finally, the authors very much appreciate feedback from users of the software.

### Acknowledgements

The authors would like to thank Giacomo Ghiringhelli, Mauro Rovezzi, Erik Gallo and Kristina K. Kvashnina for helpful discussions. We acknowledge financial help and beam time at ID26 of the European Synchrotron Radiation Facility.

### References

Ablett, J. M., Woicik, J. C. & Kao, C. C. (2005). *International Centre for Diffraction Data; Joint Committee on Powder Diffraction Standards*, **48**, 266–273 (https://www.osti.gov/bridge/product.biblio.jsp?osti_id=860509). Google Scholar

Achkar, A. J., Regier, T. Z., Wadati, H., Kim, Y. J., Zhang, H. & Hawthorn, D. G. (2011). *Phys. Rev. B*, **83**, 081106. Web of Science CrossRef Google Scholar

Ament, L. J. P., van Veenendaal, M., Devereaux, T. P., Hill, J. P. & van den Brink, J. (2011). *Rev. Mod. Phys.* **83**, 705–767. Web of Science CrossRef CAS Google Scholar

Aziz, E. F., Rittmann-Frank, M. H., Lange, K. M., Bonhommeau, S. & Chergui, M. (2010). *Nat. Chem.* **2**, 853–857. Web of Science CrossRef CAS PubMed Google Scholar

Bergmann, U., Groenzin, H., Mullins, O. C., Glatzel, P., Fetzer, J. & Cramer, S. P. (2003). *Chem. Phys. Lett.* **369**, 184–191. Web of Science CrossRef CAS Google Scholar

Bokhoven, J. A. van, Louis, C., Miller, J. T., Tromp, M., Safonova, O. V. & Glatzel, P. (2006). *Angew. Chem.* **45**, 4651–4654. Google Scholar

Booth, C. H. & Bridges, F. (2005). *Phys. Scr.* T**115**, 202–204. CrossRef CAS Google Scholar

Brunetti, A., Sanchez del Rio, M., Golosio, B., Simionovici, A. & Somogyi, A. (2004). *Spectrochim. Acta B*, **59**, 1725–1731. Web of Science CrossRef Google Scholar

Bunker, G. (2009). *Introduction to XAFS: A Practical Guide to X-ray Absorption Fine Structure Spectroscopy.* Cambridge University Press. Google Scholar

Carra, P., Fabrizio, M. & Thole, B. T. (1995). *Phys. Rev. Lett.* **74**, 3700–3703. CrossRef PubMed CAS Web of Science Google Scholar

Chantler, C. T. (1995). *J. Phys. Chem. Ref. Data*, **24**, 71–591. CrossRef CAS Google Scholar

Chantler, C. T. (2010). *Radiat. Phys. Chem.* **79**, 117–123. Web of Science CrossRef CAS Google Scholar

Cramer, S. P., Tench, O., Yocum, M. & George, G. N. (1988). *Nucl. Instrum. Methods Phys. Res. A*, **266**, 586–591. CrossRef Web of Science Google Scholar

Eisebitt, S., Boske, T., Rubensson, J. E. & Eberhardt, W. (1993). *Phys. Rev. B*, **47**, 14103–14109. CrossRef CAS Web of Science Google Scholar

Fister, T. T., Vila, F. D., Seidler, G. T., Svec, L., Linehan, J. C. & Cross, J. O. (2008). *J. Am. Chem. Soc.* **130**, 925–932. Web of Science CrossRef PubMed CAS Google Scholar

George, G. N., Cleland, W. E., Enemark, J. H., Smith, B. E., Kipke, C. A., Roberts, S. A. & Cramer, S. P. (1990). *J. Am. Chem. Soc.* **112**, 2541–2548. CrossRef CAS Web of Science Google Scholar

Glatzel, P. & Bergmann, U. (2005). *Coord. Chem. Rev.* **249**, 65–95. Web of Science CrossRef CAS Google Scholar

Glatzel, P., Bergmann, U., de Groot, F. M. F. & Cramer, S. P. (2001). *Phys. Rev. B*, **64**, 045109. Web of Science CrossRef Google Scholar

Glatzel, P., de Groot, F. M. F., Manoilova, O., Grandjean, D., Weckhuysen, B. M., Bergmann, U. & Barrea, R. (2005). *Phys. Rev. B*, **72**, 014117. Web of Science CrossRef Google Scholar

Glatzel, P., Sikora, M. & Fernandez-Garcia, M. (2009). *Eur. Phys. J. Spec. Top.* **169**, 207–214. Web of Science CrossRef Google Scholar

Goulon, J., Goulon-Ginet, C., Cortes, R. & Dubois, J. M. (1982). *J. Phys.* **43**, 539–548. CrossRef CAS Google Scholar

Groot, F. de (2001). *Chem. Rev.* **101**, 1779–1808. Web of Science CrossRef PubMed Google Scholar

Groot, F. M. F. de, Krisch, M. H. & Vogel, J. (2002). *Phys. Rev. B*, **66**, 195112. Google Scholar

Hämäläinen, K., Siddons, D. P., Hastings, J. B. & Berman, L. E. (1991). *Phys. Rev. Lett.* **67**, 2850–2853. CrossRef PubMed CAS Web of Science Google Scholar

Haskel, D. (1999). *FLUO*, https://www.aps.anl.gov/~haskel/fluo.html. Google Scholar

Hayashi, H. (2008). *Anal. Sci.* **24**, 15–23. Web of Science CrossRef PubMed CAS Google Scholar

Henke, B. L., Gullikson, E. M. & Davis, J. C. (1993). *At. Data Nucl. Data Tables*, **54**, 181–342. CrossRef CAS Web of Science Google Scholar

Holroyd, R. A., Sham, T. K., Yang, B. X. & Feng, X. H. (1992). *J. Phys. Chem.* **96**, 7438–7441. CrossRef CAS Web of Science Google Scholar

Hubner, M., Koziej, D., Bauer, M., Barsan, N., Kvashnina, K., Rossell, M. D., Weimar, U. & Grunwaldt, J. D. (2011). *Angew. Chem.* **50**, 2841–2844. Google Scholar

Huotari, S., Pylkkänen, T., Verbeni, R., Monaco, G. & Hämäläinen, K. (2011). *Nat. Mater.* **10**, 489–493. Web of Science CrossRef CAS PubMed Google Scholar

Jaklevic, J., Kirby, J. A., Klein, M. P., Robertson, A. S., Brown, G. S. & Eisenberger, P. (1977). *Solid State Commun.* **23**, 679–682. CrossRef CAS Web of Science Google Scholar

Kotani, A. & Shin, S. (2001). *Rev. Mod. Phys.* **73**, 203–246. Web of Science CrossRef CAS Google Scholar

Marcus, M. A. & Manceau, A. (2007). https://xafs.org/Experiment/OverAbsorption?action=AttachFileanddo=viewandtarget=overabsorption.pdf. Google Scholar

Pease, D. M., Brewe, D. L., Tan, Z., Budnick, J. I. & Law, C. C. (1989). *Phys. Lett. A*, **138**, 230–234. CrossRef CAS Web of Science Google Scholar

Pfalzer, P., Urbach, J. P., Klemm, M., Horn, S., denBoer, M. L., Frenkel, A. I. & Kirkland, J. P. (1999). *Phys. Rev. B*, **60**, 9335–9339. Web of Science CrossRef CAS Google Scholar

Pushkar, Y., Yano, J., Glatzel, P., Messinger, J., Lewis, A., Sauer, K., Bergmann, U. & Yachandra, V. (2007). *J. Biol. Chem.* **282**, 7198–7208. Web of Science CrossRef PubMed CAS Google Scholar

Sanchez del Rio, M. & Dejus, R. J. (2011). *Proc. SPIE*, **8141**, 814115. Google Scholar

Tröger, L., Arvanitis, D., Baberschke, K., Michaelis, H., Grimm, U. & Zschech, E. (1992). *Phys. Rev. B*, **46**, 3283–3289. CrossRef Web of Science Google Scholar

Vanko, G., Glatzel, P., Pham, V. T., Abela, R., Grolimund, D., Borca, C. N., Johnson, S. L., Milne, C. J. & Bressler, C. (2010). *Angew. Chem.* **49**, 5910–5912. CAS Google Scholar

Wernet, P., Nordlund, D., Bergmann, U., Cavalleri, M., Odelius, M., Ogasawara, H., Näslund, L. A., Hirsch, T. K., Ojamäe, L., Glatzel, P., Pettersson, L. G. & Nilsson, A. (2004). *Science*, **304**, 995–999. Web of Science CrossRef PubMed CAS Google Scholar

Yano, J., Pushkar, Y., Glatzel, P., Lewis, A., Sauer, K., Messinger, J., Bergmann, U. & Yachandra, V. (2005). *J. Am. Chem. Soc.* **127**, 14974–14975. Web of Science CrossRef PubMed CAS Google Scholar

Zschech, E., Troger, L., Arvanitis, D., Michaelis, H., Grimm, U. & Baberschke, K. (1992). *Solid State Commun.* **82**, 1–5. CrossRef CAS Web of Science 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.