Atomic number and elemental symbols

class PyAstronomy.pyasl.AtomicNo

Methods

getAtomicNo(sym)

Convert elemental symbol into atomic number.

getElSymbol(atn)

Convert atomic number into elemental symbol.

getElementName(atn)

Convert atomic number into elemental name.

showAll()

Print atomic number, elemental symbol, and element name.

getAtomicNo(sym)

Convert elemental symbol into atomic number.

Parameters
symstring

Elemental symbol

Returns
Atomic numberint

Atomic number

getElSymbol(atn)

Convert atomic number into elemental symbol.

Parameters
atnint

Atomic number

Returns
Symbolstring

Elemental symbol

getElementName(atn)

Convert atomic number into elemental name.

Parameters
atnint

Atomic number

Returns
Namestring

Name of element

showAll()

Print atomic number, elemental symbol, and element name.

Example

from __future__ import print_function, division
from PyAstronomy import pyasl

an = pyasl.AtomicNo()

# Show table with all atomic numbers, elemental
# symbols, and the names of the elements
an.showAll()

print(an.getElSymbol(26))

print(an.getAtomicNo("He"))

print(an.getElementName(25))