Contributions (taurex.contributions)

Classes related to the computation of the optical depth

Base Contribution

Base contribution classes and functions for computing optical depth.

class Contribution(name: str | None = None)[source]

Bases: Fittable, Loggable, Writeable, Citable

The base class for modelling contributions to the optical depth.

Abstract class

By default this handles contributions from cross-sections. If the type of contribution being implemented is a sigma-type like the form given in contribute_tau() then To function in Taurex3, it only requires the concrete implementation of:

Different forms may require reimplementing contribute() as well as prepare()

build(model: object) None[source]

Called during forward model build phase.

Does nothing by default

Parameters:

model (ForwardModel) – Forward model

contribute(model: object, start_layer: int, end_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None)[source]

Computes an integral for a single layer for the optical depth.

Parameters:
  • model (ForwardModel) – A forward model

  • start_layer (int) – Lowest layer limit for integration

  • end_layer (int) – Upper layer limit of integration

  • density_offset (int) – offset in density layer

  • layer (int) – atmospheric layer being computed

  • density (array) – density profile of atmosphere

  • tau (array) – optical depth to store result

  • path_length (array) – integration length

finalize(model: object, tau: ndarray[tuple[int, ...], dtype[float64]])[source]

Called in the last phase of the calculation.

Called after the optical depth has be completely computed.

classmethod input_keywords() List[str][source]

List of input keywords for identification.

property name: str

Name of the contribution. Identifier for plots.

property order: int

Computational order.

Lower numbers are given higher priority and are computed first.

Returns:

Order of computation

Return type:

int

prepare(model: object, wngrid: ndarray[tuple[int, ...], dtype[float64]]) None[source]

Used to prepare the contribution for the calculation.

Called before the forward model performs the main optical depth calculation. Default behaviour is to loop through prepare_each() and sum all results into a single cross-section.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

prepare_each(model: object, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Requires implementation.

Used to prepare each component of the contribution. For context when the main taurex program is run with the option each spectra is the component for the contribution. For cross-section based contributions, the components are each molecule Should yield the name of the component and the component itself

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Name of component and component itself

property sigma: ndarray[tuple[int, ...], dtype[float64]]

(Effective) Cross-section for contribution.

write(output: OutputGroup) OutputGroup[source]

Writes contribution class and arguments to file.

Parameters:

output (Output) – Output object to write to.

contribute_tau(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]]

Generic cross-section integration function for tau.

This has the form:

\[\tau_{\lambda}(z) = \int_{z_{0}}^{z_{1}} \sigma(z') \rho(z') dz',\]

where \(z\) is the layer, \(z_0\) and \(z_1\) are startK and endK respectively. \(\sigma\) is the weighted cross-section sigma. \(rho\) is the density and \(dz'\) is the integration path length path

Parameters:
  • startk (int) – starting layer in integration

  • endk (int) – last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – cross-section

  • density (array_like) – density profile of atmosphere

  • path (array_like) – path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

contribute_tau_numba(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Generic cross-section integration function for tau.

numba-fied for performance.

This has the form:

\[\tau_{\lambda}(z) = \int_{z_{0}}^{z_{1}} \sigma(z') \rho(z') dz',\]

where \(z\) is the layer, \(z_0\) and \(z_1\) are startK and endK respectively. \(\sigma\) is the weighted cross-section sigma. \(rho\) is the density and \(dz'\) is the integration path length path

Parameters:
  • startk (int) – starting layer in integration

  • endk (int) – last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – cross-section

  • density (array_like) – density profile of atmosphere

  • path (array_like) – path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

contribute_tau_numpy(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Generic cross-section integration function for tau.

This has the form:

\[\tau_{\lambda}(z) = \int_{z_{0}}^{z_{1}} \sigma(z') \rho(z') dz',\]

where \(z\) is the layer, \(z_0\) and \(z_1\) are startK and endK respectively. \(\sigma\) is the weighted cross-section sigma. \(rho\) is the density and \(dz'\) is the integration path length path

Parameters:
  • startk (int) – starting layer in integration

  • endk (int) – last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – cross-section

  • density (array_like) – density profile of atmosphere

  • path (array_like) – path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

Absorption

class AbsorptionContribution[source]

Bases: Contribution

Absorption contribution.

contribute(model: ForwardModel, start_horz_layer: int, end_horz_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None) None[source]

Contribute to the optical depth.

Parameters:
  • model (ForwardModel) – Forward model

  • start_horz_layer (int) – Starting horizontal layer

  • end_horz_layer (int) – Ending horizontal layer

  • density_offset (int) – Offset of the density profile

  • layer (int) – Layer index

  • density (npt.NDArray[np.float64]) – Density profile

  • tau (npt.NDArray[np.float64]) – Optical depth

  • path_length (npt.NDArray[np.float64], optional) – Path length, by default None

finalize(model: ForwardModel) None[source]

Finalize the contribution.

Warning

Not yet implemented.

Raises:

NotImplementedError

classmethod input_keywords() Tuple[str][source]

Return input keywords for the contribution.

prepare(model: ForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) None[source]

Used to prepare the contribution for the calculation.

Called before the forward model performs the main optical depth calculation. Default behaviour is to loop through prepare_each() and sum all results into a single cross-section.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

prepare_each(model: ForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Prepare each component opacity.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (npt.NDArray[np.float64]) – Wavenumber grid

Yields:

t.Generator[t.Tuple[str, npt.NDArray[np.float64]], None, None] – Gas name and opacity

property sigma: ndarray[tuple[int, ...], dtype[float64]]

Return effective cross-sections.

CIA

Opacity integration of collision-induced absorption.

class CIAContribution(cia_pairs: List[str] | None = None)[source]

Bases: Contribution

Computes the CIA contribution to the optical depth.

CIA is collisionally induced absorption.

property ciaPairs: Sequence[str]

Returns list of molecular pairs involved.

Returns:

list of molecule pairs of the form mol1-mol2 e.g. H2-He

Return type:

list of str

contribute(model: OneDForwardModel, start_layer: int, end_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None) None[source]

Integrate the optical depth for a given layer.

Parameters:
  • model (OneDForwardModel) – The forward model

  • start_layer (int) – Initial integration layer

  • end_layer (int) – Final integration layer

  • density_offset (int) – offset in density layer

  • layer (int) – atmospheric layer being computed

  • density (npt.NDArray[np.float64]) – density profile of atmosphere

  • tau (npt.NDArray[np.float64]) – optical depth to store result

  • path_length (npt.NDArray[np.float64], optional) – integration length

classmethod input_keywords() Tuple[str][source]

Return list of input keywords for CIA.

prepare_each(model: OneDForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Computes and weighs cross-section for a single pair of molecules.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Molecular pair and the weighted cia opacity.

write(output: OutputGroup) OutputGroup[source]

Write output to file.

Parameters:

output (OutputGroup) – Output group to write to.

Returns:

Output group written to.

Return type:

OutputGroup

contribute_cia(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]]

Integrate the optical depth for a given layer.

Parameters:
  • startk (int) – Starting layer in integration

  • endk (int) – Last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – Cross-section

  • density (array_like) – Density profile of atmosphere

  • path (array_like) – Path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – Total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – Optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

contribute_cia_numba(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Collisionally induced absorption integration function.

This has the form:

\[\tau_{\lambda}(z) = \int_{z_{0}}^{z_{1}} \sigma(z') \rho(z')^{2} dz',\]

where \(z\) is the layer, \(z_0\) and \(z_1\) are startK and endK respectively. \(\sigma\) is the weighted cross-section sigma. \(rho\) is the density and \(dz'\) is the integration path length path

Parameters:
  • startk (int) – starting layer in integration

  • endk (int) – last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – cross-section

  • density (array_like) – density profile of atmosphere

  • path (array_like) – path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

contribute_cia_numpy(startk: int, endk: int, density_offset: int, sigma: ndarray[tuple[int, ...], dtype[float64]], density: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], nlayers: int, ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Integrate the optical depth for a given layer.

Parameters:
  • startk (int) – Starting layer in integration

  • endk (int) – Last layer in integration

  • density_offset (int) – Which part of the density profile to start from

  • sigma (array) – Cross-section

  • density (array_like) – Density profile of atmosphere

  • path (array_like) – Path-length or altitude gradient

  • nlayers (int) – Total number of layers (unused)

  • ngrid (int) – Total number of grid points

  • layer (int) – Which layer we currently on

  • tau (array_like) – Optical depth (well almost you still need to do exp(-tau) yourself)

Returns:

tau – optical depth (well almost you still need to do exp(-tau) yourself)

Return type:

array_like

Rayleigh

Rayleigh scattering contribution.

class RayleighContribution[source]

Bases: Contribution

Computes contribution from Rayleigh scattering.

BIBTEX_ENTRIES = ["\n        @book{cox_allen_rayleigh,\n        title={Allen's astrophysical quantities},\n        author={Cox, Arthur N},\n        year={2015},\n        publisher={Springer}\n        }\n        "]

List of bibtex entries.

classmethod input_keywords() Tuple[str][source]

Return list of keywords for contribution.

prepare_each(model: OneDForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Compute opacity due to rayleigh scattering.

Scattering is weighted by the mixing ratio of the gas from chemistry.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Name of scattering molecule and the weighted rayeligh opacity.

SimpleClouds

Flat Cloud scattering.

class SimpleCloudsContribution(clouds_pressure: float | None = 1000.0)[source]

Bases: Contribution

Optically thick cloud deck up to a certain height.

These have the form:

\[\begin{split}\tau(\lambda,z) = \begin{cases} \infty & \quad \text{if } P(z) >= P_{0}\\ 0 & \quad \text{if } P(z) < P_{0} \end{cases}\end{split}\]

Where \(P_{0}\) is the pressure at the top of the cloud-deck.

property cloudsPressure: float

Cloud top pressure in Pascal.

contribute(model: OneDForwardModel, start_layer: int, end_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None)[source]

Contribute the cloud opacity to the optical depth.

Parameters:
  • model (OneDForwardModel) – The forward model

  • start_layer (int) – Initial integration layer

  • end_layer (int) – Final integration layer

  • density_offset (int) – offset in density layer

  • layer (int) – atmospheric layer being computed

  • density (npt.NDArray[np.float64]) – density profile of atmosphere

  • tau (npt.NDArray[np.float64]) – optical depth to store result

  • path_length (npt.NDArray[np.float64], optional) – integration length

classmethod input_keywords() Tuple[str, str][source]

Return input keywords for the contribution.

property order: int

Return order of contribution.

prepare_each(model: OneDForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Compute cross-section that is infinitely absorbing.

Absorption occurs up to a certain height.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Clouds and opacity array.

write(output: OutputGroup) OutputGroup[source]

Write the cloud pressure to the output.

Parameters:

output (OutputGroup) – Output group to write to.

Returns:

Output group written to.

Return type:

OutputGroup

Mie Scattering (BH)

Warning

This is no longer available in the base TauREx 3 since version 3.1. To use this you must install the taurex_bhmie plugin.

Mie Scattering (Lee)

Mie scattering using Lee et al. 2013 formalism.

class LeeMieContribution(lee_mie_radius: float | None = 0.01, lee_mie_q: float | None = 40, lee_mie_mix_ratio: float | None = 1e-10, lee_mie_bottomP: float | None = -1, lee_mie_topP: float | None = -1)[source]

Bases: Contribution

Computes Mie scattering contribution to optica depth.

Formalism taken from: Lee et al. 2013, ApJ, 778, 97

Parameters:
  • lee_mie_radius (float) – Particle radius in um

  • lee_mie_q (float) – Extinction coefficient

  • lee_mie_mix_ratio (float) – Mixing ratio in atmosphere in particles/m3

  • lee_mie_bottomP (float) – Bottom of cloud deck in Pa

  • lee_mie_topP (float) – Top of cloud deck in Pa

BIBTEX_ENTRIES = ['\n        @article{Lee_2013,\n            doi = {10.1088/0004-637x/778/2/97},\n            url = {https://doi.org/10.1088%2F0004-637x%2F778%2F2%2F97},\n            year = 2013,\n            month = {nov},\n            publisher = {{IOP} Publishing},\n            volume = {778},\n            number = {2},\n            pages = {97},\n            author = {Jae-Min Lee and Kevin Heng and Patrick G. J. Irwin},\n            journal = {The Astrophysical Journal},\n        ']

List of bibtex entries.

contribute(model: object, start_layer: int, end_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None)[source]

Computes an integral for a single layer for the optical depth.

Parameters:
  • model (ForwardModel) – A forward model

  • start_layer (int) – Lowest layer limit for integration

  • end_layer (int) – Upper layer limit of integration

  • density_offset (int) – offset in density layer

  • layer (int) – atmospheric layer being computed

  • density (array) – density profile of atmosphere

  • tau (array) – optical depth to store result

  • path_length (array) – integration length

classmethod input_keywords() Tuple[str][source]

Input keywords.

property mieBottomPressure: float

Pressure at bottom of cloud deck in Pa.

property mieMixing: float

Mixing ratio in atmosphere.

property mieQ: float

Extinction coefficient.

property mieRadius: float

Particle radius in um.

property mieTopPressure: float

Pressure at top of cloud deck in Pa.

prepare_each(model: OneDForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Compute and weights the mie opacity for the pressure regions given.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Lee and the weighted mie opacity.

write(output: OutputGroup) OutputGroup[source]

Write output group.

Parameters:

output (Output) – Output object to write to

Mie Scattering (Flat)

Module for computing flat Mie opacity.

class FlatMieContribution(flat_mix_ratio: float = 1e-10, flat_bottomP: float = -1, flat_topP: float = -1)[source]

Bases: Contribution

Computes a flat (gray) absorption contribution.

Absorption is computed as a flat value between two pressures across all wavenumbers.

classmethod input_keywords() Tuple[str][source]

Return input keywords for the contribution.

property mieBottomPressure: float

Pressure at bottom of absorbing region in Pa.

property mieMixing: float

Opacity of absorbing region in \(m^2\).

property mieTopPressure: float

Pressure at top of absorbing region in Pa.

prepare_each(model: OneDForwardModel, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Computes and flat absorbing opacity for the pressure regions given.

Parameters:
  • model (ForwardModel) – Forward model

  • wngrid (array) – Wavenumber grid

Yields:

component (tuple of type (str, array)) – Flat and the weighted mie opacity.

write(output: OutputGroup) OutputGroup[source]

Write contribution to output.

Parameters:

output (Output) – Output object to write to

Returns:

output – Output object that was written to

Return type:

Output

Mie Scattering (Precomputed grids)

Precomputed Mie extinction grids for scalable cloud retrievals.

exception InvalidPyMieScattGridException[source]

Bases: InvalidModelException

Raised when the precomputed-grid Mie contribution is misconfigured.

class PyMieScattGridExtinctionContribution(mie_particle_mean_radius: Any | None = None, mie_particle_logstd_radius: Any = (0.001,), mie_particle_param_a: Any = (1.0,), mie_particle_param_b: Any = (6.0,), mie_particle_param_c: Any = (6.0,), mie_particle_param_d: Any = (1.0,), mie_particle_radius_nsampling: int = 5, mie_particle_radius_dsampling: float = 2, mie_particle_radius_distribution: str = 'normal', mie_species_path: Any | None = None, species: Any = ('Mg2SiO4',), mie_particle_mix_ratio: Any = (1e-10,), mie_porosity: Any | None = None, mie_midP: Any = (1000.0,), mie_rangeP: Any = (1.0,), mie_nMedium: float = 1, mie_resolution: int = 100, mie_particle_altitude_distrib: str = 'exp_decay', mie_particle_altitude_decay: Any = (-5.0,), name: str = 'PyMieScattGridExtinction')[source]

Bases: Contribution

Cloud opacity from precomputed extinction-efficiency grids.

The supplied HDF5 files are expected to contain a radius_grid dataset in microns, a wavenumber_grid dataset in \(cm^{-1}\), and either a Qext or Qext_grid dataset containing extinction efficiencies.

BIBTEX_ENTRIES = ['\n        @BOOK{1983asls.book.....B,\n               author = {{Bohren}, Craig F. and {Huffman}, Donald R.},\n                title = "{Absorption and scattering of light\n                         by small particles}",\n                 year = 1983,\n               adsurl = {https://ui.adsabs.harvard.edu/abs/\n                         1983asls.book.....B},\n              adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n        }\n        @ARTICLE{2026A&A...707A.127V,\n               author = {{Voyer}, M. and {Changeat}, Q.},\n                title = "{Precomputed aerosol extinction, scattering,\n                         and asymmetry grids for scalable\n                         atmospheric retrievals}",\n              journal = {Astronomy and Astrophysics},\n             keywords = {radiative transfer, methods: numerical,\n                         planets and satellites: atmospheres,\n                         planets and satellites: gaseous planets,\n                         Earth and Planetary Astrophysics,\n                         Instrumentation and Methods for Astrophysics},\n                 year = 2026,\n                month = mar,\n               volume = {707},\n                  eid = {A127},\n                pages = {A127},\n                  doi = {10.1051/0004-6361/202558469},\n        archivePrefix = {arXiv},\n               eprint = {2601.14177},\n         primaryClass = {astro-ph.EP},\n               adsurl = {https://ui.adsabs.harvard.edu/abs/2026A&A...707A.127V},\n              adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n        }\n        ']

List of bibtex entries.

contribute(model: object, start_layer: int, end_layer: int, density_offset: int, layer: int, density: ndarray[tuple[int, ...], dtype[float64]], tau: ndarray[tuple[int, ...], dtype[float64]], path_length: ndarray[tuple[int, ...], dtype[float64]] | None = None)[source]

Contribute to the optical depth.

generate_particle_fitting_params() None[source]

Generate fitting parameters for particle sizes.

The parameters generated are:
  • Rmean_share

  • Rlogstd_share (if distribution is not “budaj”)

  • X_share

  • midP_share

  • rangeP_share

  • decayP_share

  • For each species: Rmean_, Rlogstd_ (if not “budaj”), X_, midP_, rangeP_, decayP_.

  • For each species: Porosity_ if porosity is not None.

classmethod input_keywords() Tuple[str, ...][source]

Return input keywords for the contribution.

load_input_files(paths: Sequence[str]) Tuple[List[ndarray[tuple[int, ...], dtype[float64]]], List[ndarray[tuple[int, ...], dtype[float64]]], List[ndarray[tuple[int, ...], dtype[float64]]]][source]

Load input files for all species.

prepare_each(model: object, wngrid: ndarray[tuple[int, ...], dtype[float64]]) Generator[Tuple[str, ndarray[tuple[int, ...], dtype[float64]]], None, None][source]

Prepare each component of the cloud opacity.

write(output: OutputGroup) OutputGroup[source]

Write contribution to output group.

contribute_mie_tau(start_k: int, end_k: int, sigma: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]]

Integrate Mie optical depth for a given layer using numpy.

contribute_mie_tau_numpy(start_k: int, end_k: int, sigma: ndarray[tuple[int, ...], dtype[float64]], path: ndarray[tuple[int, ...], dtype[float64]], ngrid: int, layer: int, tau: ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Integrate Mie optical depth for a given layer using numpy.