Cromer-Liberman — Atomic scattering factors and attenuation for Igor Pro
Recommended alternatives first
This is a legacy package based on the Cromer-Liberman (1981) tabulations. For new work, we recommend using tools built on newer, actively maintained tabulations:
- pyIrena includes a Scattering Contrast Calculator that computes X-ray and neutron scattering length densities, anomalous contrast, absorption, and transmission using modern libraries — anomalous X-ray factors and attenuation from the NIST Chantler tables via xraydb, and formula parsing plus neutron scattering lengths from periodictable. See the Contrast Calculator guide.
- Python users can also use those underlying packages directly: xraydb (Chantler and Elam tables: f′, f″, μ/ρ, and more) and periodictable (atomic properties, neutron b_c, isotopes).
The Igor Pro package below remains available for users who need these calculations inside Igor Pro.
The Igor Pro package
This package of Igor Pro macros (version 4.0 and higher) provides functions to calculate X-ray atomic scattering factors (atomic form factors) and X-ray attenuation (μ/ρ) using the Cromer-Liberman (energy-dependent) and Cromer-Mann (Q-dependent) code. It is a translation into Igor Pro macro language of a C translation of the original Fortran code.
The code contains all necessary lookup tables for these functions. The Jensen correction is not included.
Download version 1.8 of this package from the GitHub repository. See comments in the procedure file for further details, including the list of allowed atomic symbols (which may include selected ionization states).
Functions provided
Output is in [electron units], except μ/ρ, which is in [cm²/gram]:
| Function | Returns |
|---|---|
| Get_f (AtomicSymbol, Qvalue, keV) | f0 + f′ + i·f″ |
| Get_fp (AtomicSymbol, keV) | f′ + i·f″ |
| Get_RealPartfp (AtomicSymbol, keV) | f′ |
| Get_ImagPartfpp (AtomicSymbol, keV) | f″ |
| Get_f0 (AtomicSymbol, Qvalue) | f0 |
| Get_MuOverRho (AtomicSymbol, keV) | μ/ρ |
Where keV is the X-ray energy in [keV] and Qvalue = 2π/d = 4π·sin(θ)/λ in [Å⁻¹].
Note that the full atomic form factor is f = f0 + f′ + i·f″, where f′ is the real part and f″ the imaginary part of the anomalous dispersion correction. This value is returned by the Get_f() function.
References
- Cromer, D. T. and Liberman, D. (1981). Acta Cryst. A37, 267–268.
- Cromer, D. T. and Waber, J. T. (1965). Acta Cryst. 18, 104–109.
- Cromer, D. T. and Mann, J. B. (1967). J. Chem. Phys. 47, 1892–1893.
Acknowledgement
I would like to thank Pete Jemian and Jon Tischler for their help in the development of this code — they provided the Fortran code, the C code, and a lot of help in developing and testing this package.
Jan Ilavsky, 5-13-2020
Version history
- Version 1.8 — minor fixes for Igor 8.
- Version 1.7 — fixed a bug that did not allow the user to control the precision of calculations.
- Version 1.6 — fixed an internal code typo (Q vs S used inconsistently for the scattering vector).
- Version 1.5 — fixed a major bug where the input for Cromer-Mann calculations f0(Qvalue), specified as 2π/d = 4π·sin(θ)/λ in [Å⁻¹], was used incorrectly in the code (input values were a factor of 4π off). Increased the data buffer to 200 entries.
