atomic_numberο
- plasmapy.particles.atomic.atomic_number( ) int[source]ο
Return the number of protons in an atom, isotope, or ion.
- Parameters:
element (atom-like) β A string representing an element, isotope, or ion; or an instance of the
Particleclass.- Returns:
The atomic number of an element.
- Return type:
- Raises:
InvalidElementError β If the argument is a valid particle but not a valid element.
InvalidParticleError β If the argument does not correspond to a valid particle.
See also
Examples
>>> atomic_number("H") 1 >>> atomic_number("tritium") 1 >>> atomic_number("alpha") 2 >>> atomic_number("oganesson") 118