6.1. Elements and Isotopes

class cherab.core.atomic.elements.Element

Class representing an atomic element.

Parameters:
  • name (str) – Element name.

  • symbol (str) – Element symbol, e.g. ‘H’.

  • atomic_number (int) – Number of protons.

  • atomic_weight (float) – average atomic weight in amu

Variables:
  • name (str) – Element name.

  • symbol (str) – Element symbol, e.g. ‘H’.

  • atomic_number (int) – Number of protons.

  • atomic_weight (float) – average atomic weight in amu

>>> from cherab.core.atomic import Element
>>> helium = Element('helium', 'He', 2, 4.002602)

Some examples of commonly used pre-defined elements:

>>> from cherab.core.atomic import hydrogen, helium, lithium, beryllium, boron, \
>>>     carbon, nitrogen, oxygen, fluorine, neon, argon, krypton, xenon

For the full list of available elements please consult the source file .

cherab.core.atomic.elements.lookup_element(v)

Finds an element by name, symbol or atomic number.

>>> from cherab.core.atomic import lookup_element
>>> hydrogen = lookup_element('hydrogen')
>>> neon = lookup_element('Ne')
>>> argon = lookup_element(18)
Parameters:

v – Search string or integer.

Returns:

Element object.

class cherab.core.atomic.elements.Isotope

Class representing an atomic isotope.

Parameters:
  • name (str) – Isotope name.

  • symbol (str) – Isotope symbol, e.g. ‘T’.

  • element (Element) – The parent element of this isotope, e.g. for Tritium it would be Hydrogen.

  • mass_number (int) – Atomic mass number, which is total number of protons and neutrons. Allows identification of specific isotopes.

  • atomic_weight (float) – atomic weight in amu

  • element – The parent element of this isotope, e.g. for Tritium it would be Hydrogen.

Variables:
  • name (str) – Isotope name.

  • symbol (str) – Isotope symbol, e.g. ‘T’.

  • atomic_number (int) – Number of protons.

  • mass_number (int) – Atomic mass number, which is total number of protons and neutrons. Allows identification of specific isotopes.

  • atomic_weight (float) – atomic weight in amu

>>> from cherab.core.atomic import Isotope, hydrogen
>>> tritium = Isotope('tritium', 'T', hydrogen, 3, 3.0160492777)

Some examples of commonly used pre-defined isotopes:

>>> from cherab.core.atomic import protium, deuterium, tritium, helium3, helium4

For the full list of available isotopes please consult the source file .

cherab.core.atomic.elements.lookup_isotope(v, number=None)

Finds an isotope by name, symbol or number.

Isotopes are uniquely determined by the element type and mass number. These can be specified as a single string or a combination of element and mass number.

>>> from cherab.core.atomic import lookup_isotope
>>> deuterium = lookup_element('deuterium')
>>> tritium = lookup_element(1, number=3)
>>> helium3 = lookup_element('he3')
>>> helium4 = lookup_element('he', number=4)
Parameters:
  • v – Search string, integer or element.

  • number – Integer mass number

Returns:

Element object.