Table Of Contents

Previous topic

Neutron scattering potentials

Next topic

Magnetic Form Factor

X-ray scattering potentials

periodictable.xsf

This module has one class and nine fuctions.

Xray
X-ray scattering properties for the elements.

The following attributes are added to each element:

Xray.sftable()
Three column table of energy vs. scattering factors f1, f2.
Xray.scattering_factors()
Returns f1, f2, the X-ray scattering factors for the given wavelengths interpolated from sftable.
Xray.f0()
Returns f0 for the given vector Q, with Q[i] in [0,24\pi]-1.
Xray.sld()
Returns scattering length density (real, imaginary) for the given wavelengths or energies.

The following functions are available for X-ray scatting information processing:

xray_wavelength()
Finds X-ray wavelength in angstroms given energy in keV.
xray_energy()
Finds X-ray energy in keV given wavelength in angstroms.
init()
Initializes a periodic table with the Lawrence Berkeley Laboratory Center for X-Ray Optics xray scattering factors.
init_spectral_lines()
Sets the K_alpha and K_beta1 wavelengths for select elements.
sld_table()
Prints the xray SLD table for the given wavelength.
xray_sld()
Computes xray scattering length densities for molecules.
xray_sld_from_atoms()
The underlying scattering length density calculator. This works with a dictionary of atoms and quanties directly.
emission_table()
Prints a table of emission lines.
K_alpha, K_beta1 (Å):
X-ray emission lines for various elements, including Ag, Pd, Rh, Mo, Zn, Cu, Ni, Co, Fe, Mn, Cr and Ti. K_alpha is the average of K_alpha1 and K_alpha2 lines.
X-ray scattering factors:
Low-Energy X-ray Interaction Coefficients: Photoabsorption, scattering and reflection for E in 30 to 30,000 eV, and Z in 1 to 92.

Note

For custom tables, use init() and init_spectral_lines() to set the data.

X-ray f1 and f2 tables

The data for the tables is stored in the periodictable/xsf. directory. The following information is from periodictable/xsf/read.me, with minor formatting changes. These [*.nff] files were used to generate the tables published in reference [1]. The files contain three columns of data:

Energy(eV), f_1, f_2,

where f_1 and f_2 are the atomic (forward) scattering factors. There are 500+ points on a uniform logarithmic mesh with points added 0.1 eV above and below “sharp” absorption edges. The tabulated values of f_1 contain a relativistic, energy independent, correction given by:

Z^* = Z - (Z/82.5)^{2.37}

Note

Below 29 eV f_1 is set equal to -9999.

The atomic photoabsorption cross section, \mu_a, may be readily obtained from the values of f_2 using the relation:

\mu_a = 2 r_e \lambda f_2

where r_e is the classical electron radius, and \lambda is the wavelength. The index of refraction for a material with N atoms per unit volume is calculated by:

n = 1 - N r_e \lambda^2 (f_1 + i f_2)/(2 \pi).

These (semi-empirical) atomic scattering factors are based upon photoabsorption measurements of elements in their elemental state. The basic assumption is that condensed matter may be modeled as a collection of non-interacting atoms. This assumption is in general a good one for energies sufficiently far from absorption thresholds. In the threshold regions, the specific chemical state is important and direct experimental measurements must be made.

These tables are based on a compilation of the available experimental measurements and theoretical calculations. For many elements there is little or no published data and in such cases it was necessary to rely on theoretical calculations and interpolations across Z. In order to improve the accuracy in the future considerably more experimental measurements are needed.

Please send any comments about the tables to EMGullikson@lbl.gov.

Note that the following elements have been updated since the publication of Ref. [1] in July 1993.

Element Updated Energy Range
Mg 1/15/94 30-50 eV
Al 1/15/94 30-73 eV
Si 1/15/94 30-100 eV
Au 11/7/94 2000-6500 eV
Li 11/15/94 2000-30000 eV
Si 6/95 30-500 eV
Fe 10/95 600-800 eV
Mo 11/97 10-930 eV
Be 8/04 40-250 eV
Mo 8/04 25-60 eV
W 8/04 35-250 eV
Ru 8/04 40-1300 eV
Ti 8/04 20-150 eV
Sc 4/06 50-1300 eV
Gd 6/07 12-450 eV
La 6/07 14-440 eV
Data available at:
  1. http://henke.lbl.gov/optical_constants/asf.html
  2. http://henke.lbl.gov/optical_constants/update.html
[1](1, 2) B. L. Henke, E. M. Gullikson, and J. C. Davis. “X-ray interactions: photoabsorption, scattering, transmission, and reflection at E=50-30000 eV, Z=1-92”, Atomic Data and Nuclear Data Tables 54 no.2, 181-342 (July 1993).
class periodictable.xsf.Xray(element)

Bases: object

X-ray scattering properties for the elements. Refer help(periodictable.xsf) from command prompt for details.

f0(Q)

Isotropic X-ray scattering factors f0 for the input Q.

Parameters :
Q : float or vector in [0, 24\pi] | Å-1

X-ray scattering properties for the elements.

Returns :
f0 : float

Values outside the valid range return NaN.

Note

f0 is often given as a function of \sin(\theta)/\lambda whereas we are using Q = 4 \pi \sin(\theta)/\lambda, or in terms of energy Q = 4 \pi \sin(\theta) E/(h c).

Reference:
D. Wassmaier, A. Kerfel, Acta Crystallogr. A51 (1995) 416. http://dx.doi.org/10.1107/S0108767394013292
scattering_factors(*args, **kw)

X-ray scattering factors f’,f’‘.

Parameters :
energy : float or vector | keV

X-ray energy.

Returns :
scattering_factors : (float, float)

Values outside the range return NaN.

Values are found from linear interpolation within the Henke Xray scattering factors database at the Lawrence Berkeley Laboratory Center for X-ray Optics.

sld(*args, **kw)

X ray scattering length density.

Parameters :
wavelength : float or vector | Å

Wavelength of the X-ray.

energy : float or vector | keV

Energy of the X-ray (if wavelength not specified).

Returns :
sld : (float, float) | Å-2

(real, imaginary) X-ray scattering length density.

Raises :

TypeError : neither wavelength nor energy was specified.

The scattering length density is r_e N (f_1 + i f_2). where r_e is the electron radius and N is the number density. The number density is N = \rho_m/m N_A, with mass density \rho_m molar mass m and Avogadro’s number N_A.

The constants are available directly:

r_e = periodictable.xsf.electron_radius

N_A = periodictable.constants.avogadro_number

Data comes from the Henke Xray scattering factors database at the Lawrence Berkeley Laboratory Center for X-ray Optics.

sftable

X-ray scattering factor table (E,f1,f2)

periodictable.xsf.init(table, reload=False)
periodictable.xsf.init_spectral_lines(table)

Sets the K_alpha and K_beta1 wavelengths for select elements

periodictable.xsf.xray_energy(wavelength)

Convert X-ray wavelength to energy.

Parameters :wavelength : float or vector | Å
Returns :energy : float or vector | keV

Wavelength can be converted to energy using

E = h c / \lambda

where:

h = planck’s constant in eV·s

c = speed of light in m/s

periodictable.xsf.xray_wavelength(energy)

Convert X-ray energy to wavelength.

Parameters :energy : float or vector | keV
Returns :wavelength : float | Å

Energy can be converted to wavelength using

\lambda = h c / E

where:

h = planck’s constant in eV·s

c = speed of light in m/s

periodictable.xsf.xray_sld(*args, **kw)

Compute xray scattering length densities for molecules.

Parameters :
compound : Formula initializer

Chemical formula initializer.

density : float | g·cm-3

Density of the compound.

wavelength : float | Å

Wavelength of the X-ray.

energy : float | keV

Energy of the X-ray, if wavelength is not specified.

Returns :
sld : (float, float) | 10-6-2

(real, imaginary) scattering length density.

Raises :

AssertionError : density or wavelength/energy is missing.

periodictable.xsf.xray_sld_from_atoms(*args, **kw)

Deprecated since version 0.91: xray_sld() now accepts dictionaries of {atom: count} directly.

periodictable.xsf.emission_table(table=None)

Prints a table of emission lines.

Parameters :
table : PeriodicTable.

The default periodictable unless a specific table has been requested.

Returns :

None

Example

>>> emission_table()
 El  Kalpha  Kbeta1
 Ti  2.7496  2.5138
 Cr  2.2909  2.0848
 Mn  2.1031  1.9102
 Fe  1.9373  1.7565
 Co  1.7905  1.6208
 Ni  1.6591  1.5001
 Cu  1.5418  1.3922
 Zn  1.4364  1.2952
 Mo  0.7107  0.6323
 Rh  0.6147  0.5456
 Pd  0.5869  0.5205
 Ag  0.5608  0.4970
periodictable.xsf.sld_table(wavelength=None, table=None)

Prints the xray SLD table for the given wavelength.

Parameters :
wavelength = Cu K-alpha : float | Å

X-ray wavelength.

table : PeriodicTable

The default periodictable unless a specific table has been requested.

Returns :

None

Example

>>> sld_table() 
X-ray scattering length density for 1.5418 Ang
 El    rho   irho
  H   1.19   0.00
 He   1.03   0.00
 Li   3.92   0.00
 Be  13.93   0.01
  B  18.40   0.01
  C  17.86   0.03
  N   6.88   0.02
  O   9.74   0.04
  F  12.16   0.07
 Ne  10.26   0.09
 Na   7.98   0.09
 Mg  14.78   0.22
  ...
periodictable.xsf.plot_xsf(el)

Plots the xray scattering factors for the given element.

Parameters :el : Element
Returns :None