Forward Models (taurex.model)

Base

class ForwardModel(name)[source]

Bases: taurex.log.logger.Logger, taurex.data.fittable.Fittable, taurex.output.writeable.Writeable, taurex.data.citation.Citable

A base class for producing forward models

add_contribution(contrib)[source]
build()[source]
citations()[source]
compute_error(samples, wngrid=None, binner=None)[source]
defaultBinner()[source]
property derivedParameters
property fittingParameters
generate_profiles()[source]

Must return a dictionary of profiles you want to store after modeling

classmethod input_keywords()[source]
model(wngrid=None, cutoff_grid=True)[source]

Computes the forward model for a wngrid

model_full_contrib(wngrid=None, cutoff_grid=True)[source]

Computes the forward model for a wngrid for each contribution

write(output)[source]

Basic Model

class SimpleForwardModel(name, planet=None, star=None, pressure_profile=None, temperature_profile=None, chemistry=None, nlayers=100, atm_min_pressure=0.0001, atm_max_pressure=1000000.0)[source]

Bases: taurex.model.model.ForwardModel

A ‘simple’ base model in the sense that its just a fairly standard single profiles model. It will handle settingup and initializing, building collecting parameters from given profiles for you. The only method that requires implementation is:

Parameters
  • name (str) – Name to use in logging

  • planet (Planet, optional) – Planet model, default planet is Jupiter

  • star (Star, optional) – Star model, default star is Sun-like

  • pressure_profile (PressureProfile, optional) – Pressure model, alternative is to set nlayers, atm_min_pressure and atm_max_pressure

  • temperature_profile (TemperatureProfile, optional) – Temperature model, default is an Isothermal profile at 1500 K

  • chemistry (Chemistry, optional) – Chemistry model, default is TaurexChemistry with H2O and CH4

  • nlayers (int, optional) – Number of layers. Used if pressure_profile is not defined.

  • atm_min_pressure (float, optional) – Pressure at TOA. Used if pressure_profile is not defined.

  • atm_max_pressure (float, optional) – Pressure at BOA. Used if pressure_profile is not defined.

property altitudeProfile

Atmospheric altitude profile in m

build()[source]

Build the forward model. Must be called at least once before running model()

property chemistry

Chemistry model

citations()[source]
collect_derived_parameters()[source]

Collects all derived parameters from all profiles within the forward model

collect_fitting_parameters()[source]

Collects all fitting parameters from all profiles within the forward model

compute_error(samples, wngrid=None, binner=None)[source]

Computes standard deviations from samples

Parameters

samples

property densityProfile

Atmospheric density profile in m-3

generate_profiles()[source]

Must return a dictionary of profiles you want to store after modeling

initialize_profiles()[source]

Initializes all profiles

model(wngrid=None, cutoff_grid=True)[source]

Runs the forward model

Parameters
  • wngrid (array, optional) – Wavenumber grid, default is to use native grid

  • cutoff_grid (bool) – Run model only on wngrid given, default is True

Returns

  • native_grid (array) – Native wavenumber grid, clipped if wngrid passed

  • depth (array) – Resulting depth

  • tau (array) – Optical depth.

  • extra (None) – Empty

model_contrib(wngrid=None, cutoff_grid=True)[source]

Models each contribution seperately

model_full_contrib(wngrid=None, cutoff_grid=True)[source]

Like model_contrib() except all components for each contribution are modelled

property nLayers

Number of layers

property nativeWavenumberGrid

Searches through active molecules to determine the native wavenumber grid

Returns

wngrid – Native grid

Return type

array

Raises

InvalidModelException – If no active molecules in atmosphere

path_integral(wngrid, return_contrib)[source]
property planet

Planet model

property pressure

Pressure model

property pressureProfile

Atmospheric pressure profile in Pa

property star

Star model

property temperature

Temperature model

property temperatureProfile

Atmospheric temperature profile in K

write(output)[source]

Transmission

class TransmissionModel(planet=None, star=None, pressure_profile=None, temperature_profile=None, chemistry=None, nlayers=100, atm_min_pressure=0.0001, atm_max_pressure=1000000.0, new_path_method=False)[source]

Bases: taurex.model.simplemodel.SimpleForwardModel

A forward model for transits

Parameters
  • planet (Planet, optional) – Planet model, default planet is Jupiter

  • star (Star, optional) – Star model, default star is Sun-like

  • pressure_profile (PressureProfile, optional) – Pressure model, alternative is to set nlayers, atm_min_pressure and atm_max_pressure

  • temperature_profile (TemperatureProfile, optional) – Temperature model, default is an Isothermal profile at 1500 K

  • chemistry (Chemistry, optional) – Chemistry model, default is TaurexChemistry with H2O and CH4

  • nlayers (int, optional) – Number of layers. Used if pressure_profile is not defined.

  • atm_min_pressure (float, optional) – Pressure at TOA. Used if pressure_profile is not defined.

  • atm_max_pressure (float, optional) – Pressure at BOA. Used if pressure_profile is not defined.

compute_absorption(tau, dz)[source]
compute_path_length()[source]
compute_path_length_old(dz)[source]
classmethod input_keywords()[source]
path_integral(wngrid, return_contrib)[source]

Emission

class EmissionModel(planet=None, star=None, pressure_profile=None, temperature_profile=None, chemistry=None, nlayers=100, atm_min_pressure=0.0001, atm_max_pressure=1000000.0, ngauss=4)[source]

Bases: taurex.model.simplemodel.SimpleForwardModel

A forward model for eclipses

Parameters
  • planet (Planet, optional) – Planet model, default planet is Jupiter

  • star (Star, optional) – Star model, default star is Sun-like

  • pressure_profile (PressureProfile, optional) – Pressure model, alternative is to set nlayers, atm_min_pressure and atm_max_pressure

  • temperature_profile (TemperatureProfile, optional) – Temperature model, default is an Isothermal profile at 1500 K

  • chemistry (Chemistry, optional) – Chemistry model, default is TaurexChemistry with H2O and CH4

  • nlayers (int, optional) – Number of layers. Used if pressure_profile is not defined.

  • atm_min_pressure (float, optional) – Pressure at TOA. Used if pressure_profile is not defined.

  • atm_max_pressure (float, optional) – Pressure at BOA. Used if pressure_profile is not defined.

  • ngauss (int, optional) – Number of gaussian quadrature points, default = 4

compute_final_flux(f_total)[source]
evaluate_emission(wngrid, return_contrib)[source]
evaluate_emission_ktables(wngrid, return_contrib)[source]
classmethod input_keywords()[source]
property logBolometricFlux
partial_model(wngrid=None, cutoff_grid=True)[source]
path_integral(wngrid, return_contrib)[source]
set_num_gauss(value, coeffs=None)[source]
set_quadratures(mu, weight, coeffs=None)[source]
property usingKTables
write(output)[source]
contribute_ktau_emission[source]

Direct Image

class DirectImageModel(planet=None, star=None, pressure_profile=None, temperature_profile=None, chemistry=None, nlayers=100, atm_min_pressure=0.0001, atm_max_pressure=1000000.0, ngauss=4)[source]

Bases: taurex.model.emission.EmissionModel

A forward model for direct imaging of exo-planets

Parameters
  • planet (Planet, optional) – Planet model, default planet is Jupiter

  • star (Star, optional) – Star model, default star is Sun-like

  • pressure_profile (PressureProfile, optional) – Pressure model, alternative is to set nlayers, atm_min_pressure and atm_max_pressure

  • temperature_profile (TemperatureProfile, optional) – Temperature model, default is an Isothermal profile at 1500 K

  • chemistry (Chemistry, optional) – Chemistry model, default is TaurexChemistry with H2O and CH4

  • nlayers (int, optional) – Number of layers. Used if pressure_profile is not defined.

  • atm_min_pressure (float, optional) – Pressure at TOA. Used if pressure_profile is not defined.

  • atm_max_pressure (float, optional) – Pressure at BOA. Used if pressure_profile is not defined.

  • ngauss (int, optional) – Number of gaussian quadrature points, default = 4

compute_final_flux(f_total)[source]
classmethod input_keywords()[source]