utu.spectrum.spectroscopic#

utu.spectrum.spectroscopic(ion, latex=False)[source]#

Write the name of an ion the way a spectroscopist writes it.

The charge state is a Roman numeral, one greater than the charge, so that the neutral atom is I. This is how fiasco numbers its ions as well, only in Arabic numerals, so O 5 becomes O V.

Parameters:
  • ion (str | AbstractScalar) – The name of an ion, or an array of them, as fiasco writes it.

  • latex (bool) – Whether to write the numeral as LaTeX small capitals, which is how it is set in print.

Return type:

str | AbstractScalar

Examples

The ion ESIS was built to observe.

import utu

utu.spectrum.spectroscopic("O 5")
'O V'

And as it would be set in a journal.

utu.spectrum.spectroscopic("O 5", latex=True)
'O\\,\\textsc{v}'