petitRADTRANS.chemistry.pre_calculated_chemistry
================================================

.. py:module:: petitRADTRANS.chemistry.pre_calculated_chemistry

.. autoapi-nested-parse::

   Manage equilibrium chemistry pre-calculated table.



Attributes
----------

.. autoapisummary::

   petitRADTRANS.chemistry.pre_calculated_chemistry.pre_calculated_equilibrium_chemistry_table


Classes
-------

.. autoapisummary::

   petitRADTRANS.chemistry.pre_calculated_chemistry.PreCalculatedEquilibriumChemistryTable


Functions
---------

.. autoapisummary::

   petitRADTRANS.chemistry.pre_calculated_chemistry.interpolate_chemical_table


Module Contents
---------------

.. py:function:: interpolate_chemical_table(co_ratios: jax.typing.ArrayLike, log10_metallicities: jax.typing.ArrayLike, temperatures: jax.typing.ArrayLike, pressures: jax.typing.ArrayLike, largest_co_ratios_indices: jax.typing.ArrayLike, largest_metallicities_indices: jax.typing.ArrayLike, largest_temperatures_indices: jax.typing.ArrayLike, largest_pressures_indices: jax.typing.ArrayLike, table_metallicities: jax.typing.ArrayLike, table_co_ratios: jax.typing.ArrayLike, table_pressures: jax.typing.ArrayLike, table_temperatures: jax.typing.ArrayLike, chemistry_table: jax.typing.ArrayLike, is_mass_fraction: bool) -> jax.typing.ArrayLike

   Performs 4D linear interpolation on the chemical table for n_layers.
   Input indices (largest_..._indices) are 1-based and point to the upper
   bound of the interpolation cell.


.. py:class:: PreCalculatedEquilibriumChemistryTable

   Used to store petitRADTRANS's pre-calculated mass fractions at chemical equilibrium.

   The interpolate_mass_fractions function can be used to get mass fractions at given thermochemical conditions.


   .. py:attribute:: _loaded
      :type:  bool
      :value: False



   .. py:attribute:: mass_fractions
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: mean_molar_masses
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: nabla_adiabatic
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: log10_metallicities
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: co_ratios
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: temperatures
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: pressures
      :type:  jax.typing.ArrayLike
      :value: None



   .. py:attribute:: species
      :type:  tuple[str]
      :value: None



   .. py:method:: get_default_file(path_input_data: str = None) -> str
      :staticmethod:



   .. py:method:: interpolate_mass_fractions(co_ratios: iter, log10_metallicities: iter, temperatures: iter, pressures: iter, carbon_quench_pressure: float = None, full: bool = False, numpy_compatible=False)

      Interpolate mass fractions from a pre-calculated table to the desired parameters.

      Args:
          co_ratios:
              Desired carbon to oxygen ratios, obtained by increasing the amount of oxygen.
          log10_metallicities:
              Base-10 logarithm of the desired metallicities.
          temperatures:
              (K) desired temperatures
          pressures:
              (bar) desired pressures
          carbon_quench_pressure:
              (bar) pressure at which to put a simplistic carbon-bearing species quenching
          full:
              if True, output the pre-calculated mean molar mass and logarithmic derivative of temperature with
              respect to pressure in the adiabatic case (nabla_ad) in addition to the pre-calculated mass fractions



   .. py:method:: load(path: str = None, path_input_data: str = None, file: str = '')


.. py:data:: pre_calculated_equilibrium_chemistry_table

