praxes.physref.elam
¶
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.