The elam module provides an interface to the Elam x-ray database. Elements are accessed using atomic_data, which provides a mapping to the element data:
>>> from praxes.physref import elam
>>> copper = elam.atomic_data['Cu']
>>> print(copper.atomic_number)
29
Each element provides a mapping to the x-ray states reported in the Elam database:
>>> print(copper.keys())
['K', 'L1', 'L2', 'L3', 'M1', 'M2', 'M3', 'M4', 'M5']
>>> print(copper['K'].fluorescence_yield)
0.441091
Each x-ray state provides a mapping to the transitions originating from that state:
>>> print(copper['K'].keys())
['L1', 'L2', 'L3', 'M2', 'M3', 'M4,5']
>>> print(copper['K']['L3'].iupac_symbol)
'K-L3'
There is also a set of top-level functions in the elam module for calculating some simple properties of compositions, including conversions between stoichiometry and mass fractions, photoabsorption cross section, transmission and attenuation.
Note, in multithreading environments, there are issues sharing sqlite data between threads. As a result, objects arising from a given instance of AtomicData, such as atomic_data, should not be shared between threads. Instead, you should create a new instance of AtomicData in each thread to access the data.
The elam module is an interface to a database of fundamental X-ray fluorescence parameters compiled by W.T. Elam, B.D. Ravel and J.R. Sieber, and published in Radiation Physics and Chemistry, 63 (2), 121 (2002). The database is published by NIST at http://www.nist.gov/mml/analytical/inorganic/xrf.cfm.
A dict-like interface to the Elam database
A new cursor to the sqlite database connection, providing access to the underlying sql database. For example:
>>> atomic_data.db.execute(
'''select element from elements where atomic_number<20'''
).fetchall()
The database provides the following tables:
Footnotes
[1] | (1, 2, 3, 4, 5, 6, 7, 8) use json.loads() to recover a list of numerical values |
Return the value for key, or return default
Return a new view of the (key, value) pairs
return a new view of the keys
return a new view of the values
The average atomic mass of the element, in atomic mass units
The atomic number
Return the coherent-scattering cross section in cm^2/g as a function of energy. The energy must be within the range 100 < E < 8e5 eV.
Cross-sections at energies below 250 eV should not be considered reliable.
If mass is True, return the cross-section per gram in cm^2/g. If mass is False, return the cross-section per atom in cm^2.
Return the value for key, or return default
Return the incoherent-scattering cross section in cm^2/g as a function of energy. The energy must be within the range 100 < E < 8e5 eV.
Cross-sections at energies below 250 eV should not be considered reliable.
If mass is True, return the cross-section per gram in cm^2/g. If mass is False, return the cross-section per atom in cm^2.
Return a new view of the (key, value) pairs
return a new view of the keys
The theoretical solid mass density at standard temperature and pressure, regardless of state, in g/cm^3.
The molar mass of the element
Return the photoabsorption cross section as a function of energy. The energy must be within the range 100 < E < 8e5 eV.
Cross-sections at energies below 250 eV should not be considered reliable.
If mass is True, return the cross-section per gram in cm^2/g. If mass is False, return the cross-section per atom in cm^2.
return a new view of the values
The following is quoted verbatim from the elamdb source file:
K-shell fluorescence yield below Z=11 from new fits in J. H. Hubbell et. al., J. Chem. Phys. Ref. Data, Vol. 23, No. 2, 1994, pp339-364. Fluorescence yields and Coster-Kronig transition rates for K and L shells Krause, J. Phys. Chem. Ref. Data, Vol. 8, No. 2, 1979, pp307-327. Values for wK, wL2,and f23 are from Table 1. (values for light atoms in condensed matter) (note that this produces a large step in f23 values at z=30, see discussion in reference section 5.3 L2 Subshell and section 7 last paragraph)
Values of wL1 for Z=85-110 and f12 for Z=72-96 from Krause were modified as suggested by W. Jitschin, “Progress in Measurements of L-Subshell Fluorescence, Coster-Kronig, and Auger Values”, AIP Conference Proceedings 215, X-ray and Inner-Shell Processes, Knoxville, TN, 1990. T. A. Carlson, M. O. Krause, and S. T. Manson, Eds. (American Institute of Physics, 1990).
Fluorescence yields and Coster-Kronig transition rates for M shells Eugene J. McGuire, “Atomic M-Shell Coster-Kronig, Auger, and Radiative Rates, and Fluorescence Yields for Ca-Th”, Physical Review A, Vol. 5, No. 3, March 1972, pp1043-1047.
Fluorescence yields and Coster-Kronig transition rates for N shells Eugene J. McGuire, “Atomic N-shell Coster-Kronig, Auger, and Radiative Rates and Fluorescence Yields for 38 <= Z <= 103”, Physical Review A 9, No. 5, May 1974, pp1840-1851. Values for Z=38 to 50 were adjusted according to instructions on page 1845, at the end of Section IV.a., and the last sentence of the conclusions.
The absorption edge for the x-ray level, in eV
A dictionary containing the probabilities of Coster Kronig transitions to the given final state
A dictionary containing the probabilities of Coster Kronig transitions to the given final state, including pathways through intermediate states
The element to which this x-ray level applies
The fluorescence yield for the x-ray level
Return the value for key, or return default
Return a new view of the (key, value) pairs
The IUPAC symbol for the x-ray level
The jump ratio for the x-ray level
return a new view of the keys
return a new view of the values
The following is quoted verbatim from the elamdb source file:
Relative emission rates, fits to low-order polynomials, low-Z extrapolations by hand and eye data from Salem, Panossian, and Krause, Atomic Data and Nuclear Data Tables Vol. 14 No.2 August 1974, pp92-109. M shell data is from T. P. Schreiber and A. M. Wims, X-ray Spectrometry Vol. 11, No. 2, 1982, pp42-45. Small, arbitrary intensities assigned to Mgamma and Mzeta lines.
The element in which the x-ray transition occurs
The energy of the emitted x ray, in eV
x-ray level after transition
x-ray level before transition
The relative intensity of the emission line
The IUPAC symbol for the transition
The Siegbahn symbol for the transition
Given a string representing mass fractions, return the stoichiometry
Given a string representing stoichiometry, return the mass fractions
Given a string representing a composition, calculate the energy-dependent photoabsorption cross section