PyAtomDB Atomic module

This modules contains basic atomic parameters (i.e. atomic numbers, element symbols)

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

Isotope fractions based on those found in earth’s crust samples, your astrophysical object may vary.

Parameters:

Z : int

nuclear charge, e.g 6 for C

Returns:

float

mass in a.m.u. for the element. (e.g. 12.0107 for C)

References

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...

pyatomdb.atomic.Ztoelname(Z)

Returns element name of element with nuclear charge Z.

Parameters:

Z : int

nuclear charge of element (e.g. 6 for carbon)

Returns:

str

element name (e.g. “Carbon” for carbon)

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

Parameters:

elsymb : str

Element symbol, e.g. “C”. Case insensitive.

Returns:

int

Z for the ion. (e.g. 6 for C)

pyatomdb.atomic.elsymb_to_z0(elsymb)

Converts element symbol to nuclear charge, e.g. “C” -> 6 (wrapper to elsymb_to_Z, retained for consistency)

Parameters:

elsymb : str

Element symbol, e.g. “C”. Case insensitive.

Returns:

int

Z for the ion. (e.g. 6 for C)

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.parse_eissner(cfgstr, nel=0)
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”

Parameters:

Z : int

nuclear charge (e.g. 6 for C)

z1 : int

ion charge +1 (e.g. 5 for C4+)

Returns:

str

spectroscopic symbol for ion (e.g. “C V” for C+4)

pyatomdb.atomic.spectroscopictoz0(name)

Converts spectroscopic name to Z, z1, e.g. “C V” to 6,5

Parameters:

name : str

Ion name, e.g. “C V”

Returns:

int, int

Z, z1 for the ion. (e.g. 6,5 for C V)

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)

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)

References

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...

pyatomdb.atomic.z0toelname(z0)

Returns element name of element with nuclear charge z0. (wrapper to Ztoelname for compatibility purposes)

Parameters:

z0 : int

nuclear charge of element (e.g. 6 for carbon)

Returns:

str

element name (e.g. “Carbon” for carbon)

pyatomdb.atomic.z0toelsymb(z0)

Returns element symbol of element with nuclear charge z0. (wrapper to Ztoelsymb for compatibility purposes)

Parameters:

z0 : int

nuclear charge of element (e.g. 6 for carbon)

Returns:

str

element symbol (e.g. “C” for carbon)