CHOOCH: Determine f'' and f' from X-ray fluorescence spectra

For code, see the CHOOCH project page on Sourceforge.

Introduction

CHOOCH is a program that automatically determines values of the anomalous scattering factors, f' and f'', directly from experimentally measured X-ray fluorescence data. It outputs the f' and f'' spectra and provides guidance as to the appropriate X-ray wavelengths/energies to be used for MAD or SAD experiments.

CHOOCH was written principally with macromolecular crystallographers in mind but it is relevant to most fields that require the determination of anomalous scattering factors from experimental absorption or fluorescence spectra since it incorporates the determination of f' from f'' via the Kramers-Kronig transformation.

Support

For assistance or to provide feedback please contact gwyndaf@gwyndafevans.co.uk

Running chooch

Usage:
chooch -e <element> [-h] [-s] [-r <resol>] [-k] [-1 <e1>] [-2 <e2>] [-3 <e3>] [-4 <e4>] [-x]
      [-p <ps filename>] [-g <png filename>] [-o <efs filename>] [-z] [-v <verbose level>]
      [-w] [-c] [-l] [<inputfile>]

-h                    print this message
-s                    run silently
-e <element>          element symbol (compulsory input!)
-a <edge>             absorption edge (K, L1, L2, L3, M) (this is automatically determined for you)
-r <resol>            energy resolution (dE/E) (default is Si(111) 1.4x10-4)
-k                    Input data will be converted from keV to eV
-1 <e1>               Below edge fit lower energy limit (eV)
-2 <e2>               Below edge fit upper energy limit (eV)
-3 <e3>               Above edge fit lower energy limit (eV)
-4 <e4>               Above edge fit upper energy limit (eV)
-p <PS file>          output to PostScript file
-g <PNG file>         output to Portable Network Graphics (PNG) file
-o <efs file>         filename for efs output (default output.efs)
-d                    dump intermediate data for use with pUI
-z                    output splinor file for RADDOSE
-v <level>            verbosity level (0 -- 3) (default 0)
-w                    show warranty information
-c                    show redistribution information
-l                    show license information

More detail

Organization of the program

Chooch is run from the command line with various control options being specified through the use of command line switches.

The various steps performed by chooch are outlined below.

  • data input and checking
    • the fluorescence data is read from a file (see below for a description of the format) and basic sanity checks are performed on the data. The program attempts to guess which edge has been measured for a specified element by assuming that the middle of the scanned energy range is near the absorption edge of interest.
  • normalization of input spectrum
    • Normalization is performed as described above. A linear model is used to perform the fitting.
  • determination of f''
  • smoothing and calculation of derivatives.
    • Smoothing is done with a Savitsky-Golay filter with a window width which is determined from the monochromator energy resolution. The resolution may be supplied by the user with the -r <resol> option
  • Kramers-Kronig transformation to obtain f' using method of Hoyt, de Fontaine and Warburton (3)
    • The program uses numerical integration routines supplied with the Gnu Scientific Library (http://www.gnu.org/software/gsl/) to perform the K-K transformation.
  • analsysis and output of results
    • The program automatically selects the peak f'' energy and the minimum f' energy and outputs them. A PostScript plot of the f' and f'' spectra is generated if requested by the user with the -p <psfile> or -g <pngfile> option.

Determination of f'' and f'

Obtaining f'' from fluorescence data

Fluorescence spectra are generally measured directly from the same frozen protein crystal sample from which the diffraction data is to be measured. The spectra are typically recorded using a photo-multiplier (e.g. Bicron tube) or an energy resolving photo-diode type detector (e.g. Amptek). In both cases the fluorescence signal is recorded on an arbitrary scale. Determination of the corresponding f'' spectra is done via two stages.

Firstly the raw fluorescence spectrum must be background subtracted and corrected to subtract out any additional scattering effects which may be energy dependent. This procedure is typically very straight forward for data measured using a good energy resolving detector since the measured signal is essentially dominated by fluorescent X-ray counts. However detectors having poorer energy discrimination will typically measure some elastic scattering component of the X-rays as well as the fluorescence signal and will therefore usually require a more careful background subtraction.

The procedure involves applying a low order polynomial or linear fit separately to the below edge region of the spectrum and the above edge region of the spectrum. The fits should be generated away from the absorption edge where the XANES effects are smallest. These fits are then applied to the raw spectrum such that it is normalized to be zero far below the absorption edge and unity above the edge. The normalized signal N(E) is obtained by

N(E) = R(E)[f''above(E) - f''below(E)] + f''below(E)

where R(E) is the raw data, f''above(E) is the polynomial fit in the below edge region and f''below(E) the fit for the above edge region. All are functions of the X-ray energy E. Theoretical values of f'' have been calculated by Cromer & Libermann (1). The calculations however take no account of the effects of coordination of anomalous scattering atoms to other atoms. The effects of coordination are most visible in the near edge region which also happens to be a region of interest for MAD and SAD experiments. Therefore the Cromer & Libermann tables are not applicable in the near edge region. However, away from the absorption edge, above and below in energy, the tables provide a good estimate of the true values of f''. This provides a way to convert the normalized fluorescence data into a f'' spectrum. The theoretical spectrum is essentially multiplied into the experimentally determined spectrum to produce an experimentally determined f'' spectrum.

Obtaining f' from f''

Given a f'' spectrum the K-K transformation may be used to directly obtain a f' spectrum. An algorithm has been described (3) which allows this to be carried out computationally. Complications arise in the calculation because of the singularity in the integrand of Equation~ref{KK} arising when E is equal to Eo and also because of the impractical limits of integration. The singularity is dealt with conveniently by the above algorithm and the integration limits are chosen such that the calculation remains possible but does not become inaccurate. Integration limits which extend only a few keV above and below the absorption edge will usually provide an accurate estimate of the X-ray energy corresponding to the minimum value of f' but the magnitude of the f' curve will in general be incorrect. To obtain highly accurate magnitudes integration limits are chosen which extend up to 50x absorption edge energy and to very low energies of say 1 keV.

Citing CHOOCH

G. Evans and R. F. Pettifer. (2001) CHOOCH: a program for deriving anomalous-scattering factors from X-ray fluorescence spectra. J. Appl. Cryst. 34, 82-86.

References

  1. D.T. Cromer and D. Liberman. (1970) Relativistic calculation of anomalous scattering factors for X-rays. J. Chem. Phys. 53, 1891-1898.
  2. G. Evans and R. F. Pettifer. (1996) Stabilisation and calibration of x-ray wavelengths for anomalous diffraction experiments using synchrotron radiation. Rev. Sci. Instr. 67 (10), 3428-3433.
  3. J.J. Hoyt, D. de Fontaine and W.K. Warburton. (1984) Determination of the anomalous scattering factors for Cu, Ni and Ti using the dispersion relation. J. Appl. Cryst., 17, 344-351.
  4. R.W. James. The Optical Principles of the Diffraction of X-rays. G. Bell and sons Ltd, London, 1969.
  5. W.H. McMasters, D.N.K. Grande, J.H. Mallet and J.H. Hubbell. Compilation of X-ray cross sections. Technical Report UCRL-5014, Lawrence Radiation Laboratory (Livermore), 1969.