ionic_symbol¶
-
plasmapy.particles.
ionic_symbol
(particle: plasmapy.particles.particle_class.Particle, mass_numb: numbers.Integral = None, Z: numbers.Integral = None) → str¶ Return the ionic symbol of an ion or neutral atom.
- Parameters
- Returns
symbol – The ionic symbol. The result will generally be returned as something like
'He-4 2+'
,'D 1+'
, or'p+'
.- Return type
- 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.
TypeError – If
particle
is not astr
,int
, orParticle
; or if either ofmass_numb
orZ
is not anint
orstr
representing an integer.
- Warns
`~plasmapy.particles.exceptions.ParticleWarning` – If redundant mass number or charge information is provided.
See also
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+'