Opacity#
- class shone.opacity.Opacity(path=None, grid=None)[source]#
Bases:
objectLoad and interpolate from a pre-computed opacity grid.
- Parameters:
Methods Summary
get_available_species([shone_directory])Get a table of available opacity files.
get_binned_interpolator(wavelength, ...)Return a jitted opacity interpolator binned onto wavelength axis
wavelength.Return a jitted opacity interpolator for any number of wavelength points, and one temperature and pressure.
load_demo_species(name)Load a demo opacity archive.
Load an opacity file from its index listed in the output of
get_available_species.load_species_from_name(name)Load an opacity file from its name listed in the output of
get_available_species.Methods Documentation
- classmethod get_available_species(shone_directory=None)[source]#
Get a table of available opacity files.
- get_binned_interpolator(wavelength, temperature, pressure)[source]#
Return a jitted opacity interpolator binned onto wavelength axis
wavelength.- Returns:
interp – A just-in-time compiled opacity interpolator.
- Return type:
function
- get_interpolator()[source]#
Return a jitted opacity interpolator for any number of wavelength points, and one temperature and pressure.
- Returns:
interp – A just-in-time compiled opacity interpolator.
- Return type:
function
- classmethod load_demo_species(name)[source]#
Load a demo opacity archive.
- Parameters:
name (str) – Name of the opacity archive to load.
- classmethod load_species_from_index(idx)[source]#
Load an opacity file from its index listed in the output of
get_available_species.- Parameters:
idx (int) – Index of the opacity file to load.
- classmethod load_species_from_name(name)[source]#
Load an opacity file from its name listed in the output of
get_available_species.- Parameters:
name (str) – Name of the opacity species to load. Since the “name” entry isn’t guaranteed to be unique, an error is raised if more than one file is available by this name.