API¶
The API is under active development. Feedback is welcomed.
PHOENIX¶
Functionality pertaining to the PHOENIX model grid (Husser et al. 2013).
- class gollum.phoenix.PHOENIXGrid(teff_range=None, logg_range=None, Z_range=None, path='~/libraries/raw/PHOENIX/', wl_lo=8038, wl_hi=12849, instrumental_resolution=None, download=False, experimental=False, **kwargs)¶
A container for a grid of PHOENIX precomputed synthetic spectra of stars.
- Parameters:
teff_range (tuple) – The teff limits of the grid model to read in.
logg_range (tuple) – The logg limits of the grid model to read in.
Z_range (tuple) – The metallicity limits of the grid model to read in.
path (str) – The path to your locally downloaded PHOENIX grid library. Default: “~/libraries/raw/PHOENIX/”
wl_lo (float) – The shortest wavelength of the models to keep (Å)
wl_hi (float) – The longest wavelength of the models to keep (Å)
- instrumental_broaden(R)¶
Broaden the grid by a given resolution.
- Parameters:
R (int) – The resolution to broaden the grid to.
- show_dashboard(data=None, notebook_url='localhost:8888')¶
Show an interactive dashboard for the PHOENIX grid; heavily inspired by the lightkurve .interact() method.
If data is used, we recommend that the grid first be truncated to it, with a margin of 50 Angstroms on either end of the spectral axis to allow for radial velocity shift and rotational broadening to operate properly.
- Parameters:
data (Spectrum1D-like) – A normalized data spectrum over which to plot the models
notebook_url (str) – Location of the Jupyter notebook page (default: “localhost:8888”) When showing Bokeh applications, the Bokeh server must be explicitly configured to allow connections originating from different URLs. This parameter defaults to the standard notebook host and port. If you are running on a different location, you will need to supply this value for the application to display properly. If no protocol is supplied in the URL, e.g. if it is of the form “localhost:8888”, then “http” will be used.
- truncate(wavelength_range=None, data=None)¶
Truncate the wavelength range of the grid
- Parameters:
wavelength_range (list or tuple) – A pair of values (with units) that denote the shortest and longest wavelengths for truncating the grid.
data (Spectrum1D-like) – A spectrum to which this method will match the wavelength limits
- Returns:
truncated_spectrum – The spectrum after being truncated to the given wavelength range
- Return type:
Spectrum1D-like
- class gollum.phoenix.PHOENIXSpectrum(*args, teff=None, logg=None, Z=0.0, path='~/libraries/raw/PHOENIX/', download=False, wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for PHOENIX spectra
- Parameters:
teff (int) – The teff label of the PHOENIX model to read in. Must be on the PHOENIX grid.
logg (float) – The logg label of the PHOENIX model to read in. Must be on the PHOENIX grid.
Z (float) – The metallicity label of the PHOENIX model to read in. Must be on the PHOENIX grid.
path (str) – The path to your locally downloaded PHOENIX grid library. Default: “~/libraries/raw/PHOENIX/”
download (bool) – [Experimental] Set to True if you want to download the spectra from the internet; requires an internet connection.
wl_lo (float) – The shortest wavelength of the models to keep (Å)
wl_hi (float) – The longest wavelength of the models to keep (Å)
Sonora¶
Functionality pertaining to the Sonora series of substellar model grids (Marley et al. 2021, Morley et al. 2024)
- class gollum.sonora.Sonora2017Spectrum(*args, teff=None, logg=None, path='~/libraries/raw/Sonora/', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for Sonora 2017 spectra
- Parameters:
teff (int) – The teff label of the Sonora model to read in. Must be on the Sonora grid.
logg (float) – The logg label of the Sonora model to read in. Must be on the Sonora grid.
path (str) – The path to your local Sonora grid library. You must have the Sonora grid downloaded locally. Default: “~/libraries/raw/Sonora/”
wl_lo (float) – The shortest wavelength of the models to keep (Angstroms)
wl_hi (float) – The longest wavelength of the models to keep (Angstroms)
- class gollum.sonora.Sonora2021Spectrum(*args, teff=None, logg=None, metallicity=0.0, path='~/libraries/raw/SonoraBobcat2021/', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for a single Sonora precomputed synthetic spectrum of a brown dwarfs or free-floating Gas Giant planet.
- Parameters:
teff (int) – The teff label of the Sonora model to read in. Must be on the Sonora grid.
logg (float) – The logg label of the Sonora model to read in. Must be on the Sonora grid.
metallicity (float) – The metallicity label of the Sonora model to read in. Must be on the Sonora grid.
path (str) – The path to your local Sonora grid library. You must have the Sonora grid downloaded locally. Default: “~/libraries/raw/Sonora/”
wl_lo (float) – The shortest wavelength of the models to keep (Angstroms)
wl_hi (float) – The longest wavelength of the models to keep (Angstroms)
- class gollum.sonora.Sonora2024Grid(teff_range=None, logg_range=None, metallicity_range=None, fsed_range=None, path='~/libraries/raw/SonoraDiamondback/', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for a grid of Sonora precomputed synthetic spectra of brown dwarfs and free-floating Gas Giant planets.
- Parameters:
teff_range (tuple) – The Teff limits of the grid model to read in.
logg_range (tuple) – The logg limits of the Sonora model to read in.
metallicity_range (tuple) – The metallicity limits of the Sonora model to read in
fsed_range (tuple) – The fsed limits of the Sonora model to read in
path (str) – The path to your locally downloaded Sonora grid library. Default: “~/libraries/raw/SonoraDiamondback2024/”
wl_lo (float) – The shortest wavelength of the models to keep (Å)
wl_hi (float) – The longest wavelength of the models to keep (Å)
- decimate(decimation_fraction=0.1)¶
Decimate the grid
- instrumental_broaden(resolving_power)¶
Instrumental broaden the grid
- show_dashboard(data=None, notebook_url='localhost:8888')¶
Show an interactive dashboard for the Sonora grid; heavily inspired by the lightkurve .interact() method.
- Parameters:
data (Spectrum1D-like) – A normalized data spectrum over which to plot the models
notebook_url (str) – Location of the Jupyter notebook page (default: “localhost:8888”) When showing Bokeh applications, the Bokeh server must be explicitly configured to allow connections originating from different URLs. This parameter defaults to the standard notebook host and port. If you are running on a different location, you will need to supply this value for the application to display properly. If no protocol is supplied in the URL, e.g. if it is of the form “localhost:8888”, then “http” will be used.
- truncate(wavelength_range=None, data=None)¶
Truncate the wavelength range of the grid
- Parameters:
wavelength_range (list or tuple) – A pair of values (with units) that denote the shortest and longest wavelengths for truncating the grid.
data (Spectrum1D-like) – A spectrum to which this method will match the wavelength limits
- Returns:
truncated_spectrum – The spectrum after being truncated to the given wavelength range
- Return type:
Spectrum1D-like
- class gollum.sonora.Sonora2024Spectrum(*args, teff=None, logg=None, Z=0, fsed=0, path='~/libraries/raw/SonoraDiamondback/', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for Sonora 2024 spectra
- Parameters:
teff (int) – The teff label of the Sonora model to read in. Must be on the Sonora grid.
logg (float) – The logg label of the Sonora model to read in. Must be on the Sonora grid.
Z (float) – The metallicity label of the Sonora model to read in. Must be on the Sonora grid.
fsed (float) – The fsed label of the Sonora model to read in. Must be on the Sonora grid.
path (str) – The path to your local Sonora grid library. You must have the Sonora grid downloaded locally. Default: “~/libraries/raw/Sonora/”
wl_lo (float) – The shortest wavelength of the models to keep (Angstroms)
wl_hi (float) – The longest wavelength of the models to keep (Angstroms)
- class gollum.sonora.SonoraGrid(teff_range=None, logg_range=None, metallicity_range=None, path='~/libraries/raw/SonoraBobcat2021/', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for a grid of Sonora precomputed synthetic spectra of brown dwarfs and free-floating Gas Giant planets.
- Parameters:
teff_range (tuple) – The Teff limits of the grid model to read in.
logg_range (tuple) – The logg limits of the Sonora model to read in.
metallicity_range (tuple) – The metallicity limits of the Sonora model to read in
path (str) – The path to your locally downloaded Sonora grid library. Default: “~/libraries/raw/SonoraBobcat2021/”
wl_lo (float) – The shortest wavelength of the models to keep (Å)
wl_hi (float) – The longest wavelength of the models to keep (Å)
- decimate(decimation_fraction=0.1)¶
Decimate the grid
- instrumental_broaden(resolving_power)¶
Instrumental broaden the grid
- show_dashboard(data=None, notebook_url='localhost:8888', show_telluric=True)¶
Show an interactive dashboard for the Sonora grid; heavily inspired by the lightkurve .interact() method.
- Parameters:
data (Spectrum1D-like) – A normalized data spectrum over which to plot the models
notebook_url (str) – Location of the Jupyter notebook page (default: “localhost:8888”) When showing Bokeh applications, the Bokeh server must be explicitly configured to allow connections originating from different URLs. This parameter defaults to the standard notebook host and port. If you are running on a different location, you will need to supply this value for the application to display properly. If no protocol is supplied in the URL, e.g. if it is of the form “localhost:8888”, then “http” will be used.
- truncate(wavelength_range=None, data=None)¶
Truncate the wavelength range of the grid
- Parameters:
wavelength_range (list or tuple) – A pair of values (with units) that denote the shortest and longest wavelengths for truncating the grid.
data (Spectrum1D-like) – A spectrum to which this method will match the wavelength limits
- Returns:
truncated_spectrum – The spectrum after being truncated to the given wavelength range
- Return type:
Spectrum1D-like
- gollum.sonora.SonoraSpectrum¶
alias of
Sonora2021Spectrum
Telluric¶
Functionality pertaining to telluric synthetic spectra from skycalc (Noll et al. 2012, Jones et al. 2013) and TelFit (Gullikson et al. 2014).
- class gollum.telluric.TelFitSpectrum(*args, path=None, **kwargs)¶
A container for a single TelFit precomputed synthetic spectrum.
- Parameters:
path (str) – The path to a whitespace-delimited ASCII file generated by skycalc on eso.org. You can either provide the file locally or a weblink. ‘default’ uses a demo spectrum
wl_lo (float) – The shortest wavelength of the models to keep (Angstroms)
wl_hi (float) – The longest wavelength of the models to keep (Angstroms)
- air_to_vacuum()¶
Converts a spectrum from air to vacuum
Based on Morton, D. C. 1991, ApJS, 77, 119 :returns: vaccum_spectrum – The spectrum in vacuum :rtype: TelFitSpectrum
- class gollum.telluric.TelluricSpectrum(*args, path='https://gist.githubusercontent.com/gully/b93a04ede17f617d36b2a8ffc32a60e6/raw/01c603ee201509b79b1a464093e6200ae2032198/demo_skycalc_telluric_transmission_spectrum.txt', wl_lo=8038, wl_hi=12849, **kwargs)¶
A container for a single Telluric precomputed synthetic spectrum, currently from the skycalc website at eso.org.
- Parameters:
path (str) – The path to a whitespace-delimited ASCII file generated by skycalc on eso.org. You can either provide the file locally or a weblink. Defaults to a demo spectrum
wl_lo (float) – The shortest wavelength of the models to keep (Angstroms)
wl_hi (float) – The longest wavelength of the models to keep (Angstroms)