particle_symbolο
- plasmapy.particles.symbols.particle_symbol( ) str[source]ο
Return the symbol of a particle.
- Parameters:
particle (particle-like) β A
strrepresenting a particle, element, isotope, or ion or anintrepresenting an atomic numbermass_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 particle symbol, containing charge and mass number information when available. The result will generally be returned as something like
'e-','Fe','He-4 2+','D','n','mu-', or'p+'.- Return type:
- Raises:
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.
See also
Examples
>>> particle_symbol("electron") 'e-' >>> particle_symbol("proton") 'p+' >>> particle_symbol("alpha") 'He-4 2+' >>> particle_symbol("H-1", Z=-1) 'H-1 1-'