nist_lines: Atomic Line Data from the NIST Atomic Spectra Database

View source: R/nist.R

nist_linesR Documentation

Atomic Line Data from the NIST Atomic Spectra Database

Description

Retrieves the lines of an atom or ion in a wavelength range from the NIST Atomic Spectra Database (ASD): wavelengths, transition probabilities, level energies and statistical weights, as needed by boltzmann() and saha_boltzmann(). The data are downloaded on demand; they are not distributed with specProc.

Usage

nist_lines(species, wavelength, with_aki = TRUE, timeout = 120)

Arguments

species

A character vector of emitters in spectroscopic notation, such as "Ca II" or c("Ca I", "Ca II"). The lines of several species are returned in one table, species by species.

wavelength

A numeric vector of length 2: the wavelength range, in nm.

with_aki

A logical: keep only the lines with a transition probability (TRUE, default).

timeout

The download timeout, in seconds. Default is 120.

Details

Wavelengths are in air between 200 and 2000 nm, and in vacuum outside this range, as in the ASD. The observed wavelength is used when there is one, the Ritz wavelength otherwise. Energies in brackets or with other qualifiers are returned as they can be read as numbers; check the ASD for such levels. The accuracy grade of the transition probability (accuracy: AAA, AA, A+, A, B+, B, C+, C, D+, D, E) matters for plasma diagnostics: prefer lines of grade B or better.

The results of a query are cached for the R session, and between sessions with the persistent cache (see download_cache()). Cite the database when you use these data:

  • Kramida, A., Ralchenko, Yu., Reader, J., and NIST ASD Team. NIST Atomic Spectra Database, https://physics.nist.gov/asd. National Institute of Standards and Technology, Gaithersburg, MD.

Value

A tibble with one row per line and columns species, wavelength (nm), Aki (s^{-1}), fik (oscillator strength), accuracy, Ei and Ek (lower and upper level energies, eV), gi and gk (statistical weights), lower and upper (configuration, term and J of the levels) and intensity (the relative intensity listed by the ASD, as text).

Author(s)

Christian L. Goueguel

See Also

nist_ionization_energy(), boltzmann(), saha_boltzmann(), starkb_lines()

Examples


# needs an internet connection; gives up after 20 s if NIST does not answer
ca <- try(nist_lines(c("Ca I", "Ca II"), wavelength = c(390, 400), timeout = 20))
if (!inherits(ca, "try-error")) ca


specProc documentation built on Nov. 20, 2026, 5:11 p.m.