petitRADTRANS.stellar_spectra.phoenix#

Manages the Phoenix star table.

Attributes#

Classes#

PhoenixStarTable

Used to store petitRADTRANS's PHOENIX star spectrum models.

Functions#

_print_min_temperature_warning(_)

_print_max_temperature_warning(_)

_build_star_spectrum_cache_key(...)

compute_star_spectrum(star_effective_temperature, ...)

Method to get the PHOENIX spectrum of the star and rebin it

rebin_star_spectrum(star_spectrum, star_wavelengths, ...)

Module Contents#

petitRADTRANS.stellar_spectra.phoenix._print_min_temperature_warning(_)#
petitRADTRANS.stellar_spectra.phoenix._print_max_temperature_warning(_)#
class petitRADTRANS.stellar_spectra.phoenix.PhoenixStarTable#

Used to store petitRADTRANS’s PHOENIX star spectrum models.

The compute_spectrum function can be used to get a star spectrum at a given temperature.

_loaded = False#
log10_effective_temperature_grid = None#
radius_grid = None#
flux_grid = None#
wavelength_grid = None#
compute_spectrum(temperature)#

Returns a matrix where the first column is the wavelength in cm and the second is the stellar flux \(F_\nu\) in units of \(\rm erg/cm^2/s/Hz\), at the surface of the star. The spectra are PHOENIX models from (Husser et al. 2013), the spectral grid used here was described in van Boekel et al. (2012).

Args:
temperature (float):

stellar effective temperature in K.

static get_default_file(path_input_data=None)#
load(file=None, path_input_data=None, search_online=True)#
petitRADTRANS.stellar_spectra.phoenix._PHOENIX_STAR_TABLE#
petitRADTRANS.stellar_spectra.phoenix.phoenix_star_table#
petitRADTRANS.stellar_spectra.phoenix._STAR_SPECTRUM_CACHE#
petitRADTRANS.stellar_spectra.phoenix._build_star_spectrum_cache_key(star_effective_temperature, orbit_semi_major_axis, frequencies, star_radius)#
petitRADTRANS.stellar_spectra.phoenix.compute_star_spectrum(star_effective_temperature, orbit_semi_major_axis, frequencies, star_radius=None)#

Method to get the PHOENIX spectrum of the star and rebin it to the wavelength points. If t_star is not explicitly written, the spectrum will be 0. If the distance is not explicitly written, the code will raise an error and break to urge the user to specify the value.

Args:
star_effective_temperature (float):

the stellar temperature in K.

orbit_semi_major_axis (float):

the semi-major axis of the planet in cm.

frequencies (float):

the frequencies on which to interpolate the spectrum in Hz.

star_radius (float):

if specified, uses this radius in cm to scale the flux, otherwise it uses PHOENIX radius.

petitRADTRANS.stellar_spectra.phoenix.rebin_star_spectrum(star_spectrum, star_wavelengths, wavelengths)#