skbeam.core.constants.xrf.XrayLibWrap¶
-
class
skbeam.core.constants.xrf.
XrayLibWrap
(element, info_type, energy=None)¶ High-level interface to xraylib.
This class exposes various functions in xraylib
This is an interface to wrap xraylib to perform calculation related to xray fluorescence.
The code does one to one map between user options, such as emission line, or binding energy, to xraylib function calls.
- Parameters
- elementint
atomic number
- info_type{‘lines’, ‘binding_e’, ‘jump’, ‘yield’}
option to choose which physics quantity to calculate as follows: :lines: emission lines :binding_e: binding energy :jump: absorption jump factor :yield: fluorescence yield
Examples
Access the lines for zinc
>>> x = XrayLibWrap(30, 'lines') # 30 is atomic number for element Zn
Access the energy of the Kα1 line.
>>> x['Ka1'] # energy of emission line Ka1 8.047800064086914
List all of the lines and their energies
>>> x.all # list energy of all the lines [(u'ka1', 8.047800064086914), (u'ka2', 8.027899742126465), (u'kb1', 8.90530014038086), (u'kb2', 0.0), (u'la1', 0.9294999837875366), (u'la2', 0.9294999837875366), (u'lb1', 0.949400007724762), (u'lb2', 0.0), (u'lb3', 1.0225000381469727), (u'lb4', 1.0225000381469727), (u'lb5', 0.0), (u'lg1', 0.0), (u'lg2', 0.0), (u'lg3', 0.0), (u'lg4', 0.0), (u'll', 0.8112999796867371), (u'ln', 0.8312000036239624), (u'ma1', 0.0), (u'ma2', 0.0), (u'mb', 0.0), (u'mg', 0.0)]
-
__init__
(self, element, info_type, energy=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self, element, info_type[, energy])Initialize self.
get
(self, key[, default])items
(self)keys
(self)values
(self)Attributes
all
List the physics quantity for all the lines or shells.
info_type
option to choose which physics quantity to calculate as follows:
opts_info_type