mass_number

plasmapy.atomic.mass_number(isotope: plasmapy.atomic.particle_class.Particle) → int

Get the mass number (the number of protons and neutrons) of an isotope.

Parameters:

isotope (str or Particle) – A string representing an isotope or a neutron; or an instance of the plasmapy.atomic.Particle class.

Returns:

mass_number – The total number of protons plus neutrons in a nuclide.

Return type:

int

Raises:
  • InvalidParticleError – If the argument does not correspond to a valid particle.
  • InvalidIsotopeError – If the argument does not correspond to a valid isotope.
  • TypeError – The argument is not a str.

See also

atomic_number : returns the number of protons in
an isotope or element

Examples

>>> mass_number("H-1")
1
>>> mass_number("Pb-208")
208
>>> mass_number("tritium")
3
>>> mass_number("alpha")
4