petitRADTRANS.retrieval.models

Module Contents

Functions

emission_model_diseq(pRT_object, parameters, PT_plot_mode=False, AMR=True)

Disequilibrium Chemistry Emission Model

guillot_free_emission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Free Chemistry Emission Model

guillot_eqchem_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Equilibrium Chemistry Transmission Model, Guillot Profile

isothermal_eqchem_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Equilibrium Chemistry Transmission Model, Isothermal Profile

isothermal_free_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Free Chemistry Transmission Model, Guillot Profile

PT_ret_model(T3, delta, alpha, tint, press, FeH, CO, conv=True)

Self-luminous retrieval P-T model.

_make_half_pressure_better(P_clouds, press)

deprecated

fixed_length_amr(P_clouds, press, scaling=10, width=3)

This function takes in the cloud base pressures for each cloud,

get_abundances(pressures, temperatures, line_species, cloud_species, parameters, AMR=False)

This function takes in the C/O ratio, metallicity, and quench pressures and uses them

pglobal_check(press, shape, scaling)

Check to ensure that the global pressure array has the correct length.

set_resolution(lines, abundances, resolution)

deprecated

Attributes

PGLOBAL

petitRADTRANS.retrieval.models.PGLOBAL
petitRADTRANS.retrieval.models.emission_model_diseq(pRT_object, parameters, PT_plot_mode=False, AMR=True)

Disequilibrium Chemistry Emission Model

This model computes an emission spectrum based on disequilibrium carbon chemistry, equilibrium clouds and a spline temperature-pressure profile. (Molliere 2020).

Args:
pRT_objectobject

An instance of the pRT class, with optical properties as defined in the RunDefinition.

parametersdict
Dictionary of required parameters:
  • D_pl : Distance to the planet in [cm]

  • log_g : Log of surface gravity

  • R_pl : planet radius [cm]

  • T_int : Interior temperature of the planet [K]

  • T3 : Innermost temperature spline [K]

  • T2 : Middle temperature spline [K]

  • T1 : Outer temperature spline [K]

  • alpha : power law index in tau = delta * press_cgs**alpha

  • log_delta : proportionality factor in tau = delta * press_cgs**alpha

  • sigma_lnorm : Width of cloud particle size distribution (log normal)

  • log_pquench : Pressure at which CO, CH4 and H2O abundances become vertically constant

  • Fe/H : Metallicity

  • C/O : Carbon to oxygen ratio

  • log_kzz : Vertical mixing parameter

  • fsed : sedimentation parameter

  • log_X_cb : Scaling factor for equilibrium cloud abundances.

PT_plot_modebool

Return only the pressure-temperature profile for plotting. Evaluate mode only.

AMR :

Adaptive mesh refinement. Use the high resolution pressure grid around the cloud base.

Returns:
wlen_modelnp.array

Wavlength array of computed model, not binned to data [um]

spectrum_modelnp.array

Computed emission spectrum [W/m2/micron]

petitRADTRANS.retrieval.models.guillot_free_emission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Free Chemistry Emission Model

This model computes an emission spectrum based on free retrieval chemistry, free Ackermann-Marley clouds and a Guillot temperature-pressure profile. (Molliere 2018).

Args:
pRT_objectobject

An instance of the pRT class, with optical properties as defined in the RunDefinition.

parametersdict
Dictionary of required parameters:
  • D_pl : Distance to the planet in [cm]

  • log_g : Log of surface gravity

  • R_pl : planet radius [cm]

  • T_int : Interior temperature of the planet [K]

  • T_equ : Equilibrium temperature of the planet

  • gamma : Guillot gamma parameter

  • log_kappa_IR : The log of the ratio between the infrared and optical opacities

  • sigma_lnorm : Width of cloud particle size distribution (log normal)

  • log_kzz : Vertical mixing parameter

  • fsed : sedimentation parameter

  • species : Log abundances for each species in rd.line_list (species stands in for the actual name)

  • log_X_cb : Log cloud abundances.

  • Pbase : log of cloud base pressure for each species.

PT_plot_modebool

Return only the pressure-temperature profile for plotting. Evaluate mode only.

AMR :

Adaptive mesh refinement. Use the high resolution pressure grid around the cloud base.

Returns:
wlen_modelnp.array

Wavlength array of computed model, not binned to data [um]

spectrum_modelnp.array

Computed emission spectrum [W/m2/micron]

petitRADTRANS.retrieval.models.guillot_eqchem_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Equilibrium Chemistry Transmission Model, Guillot Profile

This model computes a transmission spectrum based on equilibrium chemistry and a Guillot temperature-pressure profile.

Args:
pRT_objectobject

An instance of the pRT class, with optical properties as defined in the RunDefinition.

parametersdict
Dictionary of required parameters:
  • Rstar : Radius of the host star [cm]

  • log_g : Log of surface gravity

  • R_pl : planet radius [cm]

  • T_int : Interior temperature of the planet [K]

  • T_equ : Equilibrium temperature of the planet

  • gamma : Guillot gamma parameter

  • log_kappa_IR : The log of the ratio between the infrared and optical opacities

  • Fe/H : Metallicity

  • C/O : Carbon to oxygen ratio

  • Pcloud : optional, cloud base pressure of a grey cloud deck.

PT_plot_modebool

Return only the pressure-temperature profile for plotting. Evaluate mode only.

AMR :

Adaptive mesh refinement. Use the high resolution pressure grid around the cloud base.

Returns:
wlen_modelnp.array

Wavlength array of computed model, not binned to data [um]

spectrum_modelnp.array

Computed transmission spectrum R_pl**2/Rstar**2

petitRADTRANS.retrieval.models.isothermal_eqchem_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Equilibrium Chemistry Transmission Model, Isothermal Profile

This model computes a transmission spectrum based on equilibrium chemistry and a Guillot temperature-pressure profile.

Args:
pRT_objectobject

An instance of the pRT class, with optical properties as defined in the RunDefinition.

parametersdict
Dictionary of required parameters:
  • Rstar : Radius of the host star [cm]

  • log_g : Log of surface gravity

  • R_pl : planet radius [cm]

  • T_int : Interior temperature of the planet [K]

  • T_equ : Equilibrium temperature of the planet

  • Fe/H : Metallicity

  • C/O : Carbon to oxygen ratio

  • Pcloud : optional, cloud base pressure of a grey cloud deck.

PT_plot_modebool

Return only the pressure-temperature profile for plotting. Evaluate mode only.

AMR :

Adaptive mesh refinement. Use the high resolution pressure grid around the cloud base.

Returns:
wlen_modelnp.array

Wavlength array of computed model, not binned to data [um]

spectrum_modelnp.array

Computed transmission spectrum R_pl**2/Rstar**2

petitRADTRANS.retrieval.models.isothermal_free_transmission(pRT_object, parameters, PT_plot_mode=False, AMR=False)

Free Chemistry Transmission Model, Guillot Profile

This model computes a transmission spectrum based on free retrieval chemistry and an isothermal temperature-pressure profile.

Args:
pRT_objectobject

An instance of the pRT class, with optical properties as defined in the RunDefinition.

parametersdict
Dictionary of required parameters:
  • Rstar : Radius of the host star [cm]

  • log_g : Log of surface gravity

  • R_pl : planet radius [cm]

  • Temp : Isothermal temperature [K]

  • species : Abundances for each species used in the retrieval

  • Pcloud : optional, cloud base pressure of a grey cloud deck.

PT_plot_modebool

Return only the pressure-temperature profile for plotting. Evaluate mode only.

AMR :

Adaptive mesh refinement. Use the high resolution pressure grid around the cloud base.

Returns:
wlen_modelnp.array

Wavlength array of computed model, not binned to data [um]

spectrum_modelnp.array

Computed transmission spectrum R_pl**2/Rstar**2

petitRADTRANS.retrieval.models.PT_ret_model(T3, delta, alpha, tint, press, FeH, CO, conv=True)

Self-luminous retrieval P-T model.

Arsg:
T3np.array([t1, t2, t3])

temperature points to be added on top radiative Eddington structure (above tau = 0.1). Use spline interpolation, t1 < t2 < t3 < tconnect as prior.

delta :

proportionality factor in tau = delta * press_cgs**alpha

alpha:

power law index in tau = delta * press_cgs**alpha For the tau model: use proximity to kappa_rosseland photosphere as prior.

tint:

internal temperature of the Eddington model

press:

input pressure profile in bar

conv:

enforce convective adiabat yes/no

CO:

C/O for the nabla_ad interpolation

FeH:

metallicity for the nabla_ad interpolation

petitRADTRANS.retrieval.models._make_half_pressure_better(P_clouds, press)

deprecated

petitRADTRANS.retrieval.models.fixed_length_amr(P_clouds, press, scaling=10, width=3)

This function takes in the cloud base pressures for each cloud, and returns an array of pressures with a high resolution mesh in the region where the cloud is located.

Args:
P_cloudsnumpy.ndarray

The cloud base pressures in bar

pressnp.ndarray

The high resolution pressure array.

scalingint

The factor by which the low resolution pressure array is scaled

widthint

The number of low resolution bins to be replaced for each cloud layer.

petitRADTRANS.retrieval.models.get_abundances(pressures, temperatures, line_species, cloud_species, parameters, AMR=False)

This function takes in the C/O ratio, metallicity, and quench pressures and uses them to compute the gas phase and equilibrium condensate abundances. Clouds are currently hard coded into the function.

Args:
pressuresnumpy.ndarray

A log spaced pressure array. If AMR is on it should be the full high resolution grid.

temperaturesnumpy.ndarray

A temperature array with the same shape as pressures

line_speciesList(str)

A list of gas species that will contribute to the line-by-line opacity of the pRT atmosphere.

cloud_speciesList(str)

A list of condensate species that will contribute to the cloud opacity of the pRT atmosphere.

parametersdict

A dictionary of model parameters, in particular it must contain the names C/O, Fe/H and log_pquench. Additionally the cloud parameters log_X_cb_Fe(c) and MgSiO3(c) must be present.

AMRbool

Turn the adaptive mesh grid on or off. See fixed_length_amr for implementation.

Returns:
abundancesdict

Mass fraction abundances of all atmospheric species

MMWnumpy.ndarray

Array of the mean molecular weights in each pressure bin

small_indexnumpy.ndarray

The indices of the high resolution grid to use to define the adaptive grid.

petitRADTRANS.retrieval.models.pglobal_check(press, shape, scaling)

Check to ensure that the global pressure array has the correct length. Updates PGLOBAL.

Args:
pressnumpy.ndarray

Pressure array from a pRT_object. Used to set the min and max values of PGLOBAL

shapeint

the shape of the pressure array if no AMR is used

scaling :

The factor by which the pressure array resolution should be scaled.

petitRADTRANS.retrieval.models.set_resolution(lines, abundances, resolution)

deprecated