PyAtomDB Atomic module¶
This modules is designed to interact with the main atomic database, extracting real values of coefficients and so on.
atomic.py contains routines related to basic atomic data, e.g. converting integer nuclear charge to element symbols, etc.
Version -.1 - initial release Adam Foster July 17th 2015
-
pyatomdb.atomic.
Z_to_mass
(Z)¶ Converts element symbol to atomic mass, e.g. “C” -> 12.0107
Atomic masses are taken from: Pure Appl. Chem. 81 NO 11, 2131-2156 (2009) Masses for Technetium, Promethium, Polonium, Astatine, Radon, Francium, Radium & Actinum are estimates. If you need these you probably aren’t doing astronomy...
Isotope fractions based on those found in earth’s crust samples, your astrophysical object may vary.
Returns: float
mass in a.m.u. for the element. (e.g. 12.0107 for C)
-
pyatomdb.atomic.
Ztoelname
(Z)¶ Returns element name of element with nuclear charge Z.
INPUTS Z - nuclear charge of element (e.g. 6 for carbon)
RETURNS element name (e.g. “Carbon” for carbon)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
Ztoelsymb
(Z)¶ Returns element symbol of element with nuclear charge Z.
INPUTS Z - nuclear charge of element (e.g. 6 for carbon)
RETURNS element symbol (e.g. “C” for carbon)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
config_to_occup
(cfgstr, nel=-1, shlmax=-1, noccup=[-1])¶
-
pyatomdb.atomic.
elsymb_to_Z
(elsymb)¶ Converts element symbol to nuclear charge, e.g. “C” -> 6
INPUTS elsymb (string), e.g “C”. Case insensitive.
RETURNS Z for the ion. (e.g. 6 for C)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
elsymb_to_z0
(elsymb)¶ Converts element symbol to nuclear charge, e.g. “C” -> 6 (wrapper to elsymb_to_Z, retained for consistency) INPUTS elsymb (string), e.g “C”. Case insensitive.
RETURNS z0 for the ion. (e.g. 6 for C)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
get_maxn
(cfgstr)¶
-
pyatomdb.atomic.
get_parity
(cfgstr)¶
-
pyatomdb.atomic.
int2roman
(number)¶
-
pyatomdb.atomic.
int_to_roman
(input)¶ Convert an integer to Roman numerals.
-
pyatomdb.atomic.
occup_to_cfg
(occlist)¶
-
pyatomdb.atomic.
occup_to_config
(occup)¶
-
pyatomdb.atomic.
parse_config
(cfgstr)¶
-
pyatomdb.atomic.
roman_to_int
(input)¶ Convert a roman numeral to an integer.
-
pyatomdb.atomic.
spectroscopic_name
(Z, z1)¶ Converts Z,z1 to spectroscopic name, e.g. 6,5 to “C V”
INPUTS Z (int) nuclear charge (e.g. 6 for C) z1 (int) ion charge +1 (e.g. 5 for C4+)
RETURNS spectroscopic symbol for ion (e.g. “C V” for C+4)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
spectroscopictoz0
(name)¶ Converts spectroscopic name to Z, z1, e.g. “C V” to 6,5
INPUTS name (string), e.g. “C V” RETURNS Z, z1 for the ion. (e.g. 6,5 for C V)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
z0_to_mass
(z0)¶ Converts element symbol to atomic mass, e.g. “C” -> 12.0107
(wrapper to Z_to_mass, retained for consistency) Atomic masses are taken from: Pure Appl. Chem. 81 NO 11, 2131-2156 (2009) Masses for Technetium, Promethium, Polonium, Astatine, Radon, Francium, Radium & Actinum are estimates. If you need these you probably aren’t doing astronomy...
Isotope fractions based on those found in earth’s crust samples, your astrophysical object may vary.
Parameters: z0 : int
nuclear charge, e.g 6 for C
Returns: float
mass in a.m.u. for the element. (e.g. 12.0107 for C)
-
pyatomdb.atomic.
z0toelname
(z0)¶ Returns element name of element with nuclear charge z0. (wrapper to Ztoelname for compatibility purposes)
INPUTS z0 - nuclear charge of element (e.g. 6 for carbon)
RETURNS element name (e.g. “Carbon” for carbon)
Version 0.1 28 July 2009 Adam Foster
-
pyatomdb.atomic.
z0toelsymb
(z0)¶ Returns element symbol of element with nuclear charge z0. (wrapper to Ztoelsymb for compatibility purposes)
INPUTS z0 - nuclear charge of element (e.g. 6 for carbon)
RETURNS element symbol (e.g. “C” for carbon)
Version 0.1 28 July 2009 Adam Foster