ionic_symbol

plasmapy.particles.symbols.ionic_symbol(
particle: Particle,
*,
mass_numb: int | None = None,
Z: int | None = None,
) str[source]

Return the ionic symbol of an ion or neutral atom.

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

  • mass_numb (integer, keyword-only, optional) – The mass number of an isotope.

  • Z (integer, keyword-only, optional) – The charge number of an ion or neutral atom.

Returns:

The ionic symbol. The result will generally be returned as something like 'He-4 2+', 'D 1+', or 'p+'.

Return type:

str

Raises:
  • InvalidIonError – If the arguments correspond to a valid particle but not a valid ion or neutral charged particle.

  • InvalidParticleError – If arguments do not correspond to a valid particle or contradictory information is provided.

Warns:

`~plasmapy.particles.exceptions.ParticleWarning` – If redundant mass number or charge information is provided.

Examples

>>> ionic_symbol("alpha")
'He-4 2+'
>>> ionic_symbol(79, mass_numb=197, Z=12)
'Au-197 12+'
>>> ionic_symbol("proton")
'p+'
>>> ionic_symbol("D", Z=1)
'D 1+'
>>> ionic_symbol("H-1", Z=0)
'H-1 0+'