utu.spectrum.ions#
- utu.spectrum.ions(wavelength_min=None, wavelength_max=None, abundance_min=1e-05, **kwargs)[source]#
Find the ions worth computing over a range of wavelengths.
An ion is worth computing if its element is abundant enough to contribute and if it has a line in the range at all. Reading the line list of an ion is cheap; solving its level populations is not, and this is how the second is avoided for ions which cannot matter.
- Parameters:
wavelength_min (None | Quantity | AbstractScalar) – The shortest wavelength worth looking at. If
None(the default), there is no lower bound.wavelength_max (None | Quantity | AbstractScalar) – The longest wavelength worth looking at. If
None(the default), there is no upper bound.abundance_min (float) – The abundance, relative to hydrogen, below which an element is not worth including.
kwargs (object) – Additional arguments passed to
fiasco.Ion.
- Return type:
Notes
Which ions come back is a statement about the database as much as about the wavelengths: an ion the database does not describe cannot be returned, and the databases built for a documentation page or a test suite describe only a few.
The database is read on the first call and remembered afterwards, so the first call takes a few seconds and the rest take none. What is remembered is the wavelengths of the lines of the ions abundant enough to pass
abundance_min, a few megabytes.Examples
The line ESIS was built to observe is a line of \(\mathrm{O\,V}\).
import astropy.units as u import utu "O 5" in utu.spectrum.ions( wavelength_min=629 * u.AA, wavelength_max=630 * u.AA, )
True