atomic_symbol

plasmapy.particles.symbols.atomic_symbol(element: Particle) str[source]

Return the atomic symbol.

Parameters:

element (atom-like) – A str representing an element, isotope, or ion; or an int or str representing an atomic number.

Returns:

The atomic symbol of the element, isotope, or ion.

Return type:

str

Raises:

Notes

This function returns the symbol of the element rather than the symbol of an isotope or ion. For example, 'deuterium', 'T', or 'hydrogen-2' will yield 'H'; 'alpha' will yield 'He'; and 'iron-56' or 'Fe-56' will yield 'Fe'.

This function is case insensitive when there is no potential for ambiguity associated with case. However, this function will return 'H' for hydrogen for lower case 'p' but capital 'P' if the argument is 'P' for phosphorus. This function will return 'N' for nitrogen if the argument is capital 'N', but will not accept lower case 'n' for neutrons.

Examples

>>> atomic_symbol("helium")
'He'
>>> atomic_symbol(42)
'Mo'
>>> atomic_symbol("D")
'H'
>>> atomic_symbol("C-13")
'C'
>>> atomic_symbol("alpha")
'He'
>>> atomic_symbol("79")
'Au'
>>> atomic_symbol("N")  # Nitrogen
'N'
>>> atomic_symbol("P"), atomic_symbol("p")  # Phosphorus, proton
('P', 'H')