:py:mod:`exo_k.chemistry` ========================= .. py:module:: exo_k.chemistry .. autoapi-nested-parse:: @author: jeremy leconte Module Contents --------------- .. py:class:: EquChemTable(filename=None, remove_zeros=False) Bases: :py:obj:`object` Class to load and interpolate chemistry data. Initializes chemical composition tables from various init files :param filename: Name of the input file :type filename: :class:`str` .. py:method:: read_composition_in(filename=None, remove_zeros=False, skiprows=7) Initializes chemical composition tables from composition.in files :param filename: Name of the input file :type filename: :class:`str` :param skiprows: Number of lines to skip in the file :type skiprows: :class:`int`, *optional* .. py:method:: read_composition_dat(filename=None, remove_zeros=False, skiprows=1) Initializes chemical composition tables from composition.in files :param filename: Name of the input file :type filename: :class:`str` :param skiprows: Number of lines to skip in the file :type skiprows: :class:`int`, *optional* .. py:method:: remove_zeros(deltalog_min_value=30.0) Finds zeros in the chem data and set them to (10.^-deltalog_min_value) times the minimum positive value in the table. This is to be able to work in logspace. .. py:method:: setup_interpolation() Creates interpolating functions to be called later on. .. py:method:: vmr(logP, T, mol) Interpolates a single molecule on a logP-T value .. py:method:: interpolate_vmr(logp_array=None, t_array=None, mols=None, grid=False) Interpolates all molecules in mols on a logP-T grid .. py:class:: InterpolationChemistry(filename=None, t_min=260) Bases: :py:obj:`object` Chemistry model interpolating Volume Mixing Ratios based on a datafile provided by V. Parmentier. :param filename: The path to the datafile. :type filename: :class:`str` :param t_min: minimal temperature to consider. Cannot be below 260K because not enough data in the file. :type t_min: :class:`float` .. py:method:: compute_vmr(molecule=None, logp_array=None, t_array=None) :param molecule: Name of molecule to deal with :type molecule: :class:`str` :param logp_array: Array of log10 pressures (Pa) :type logp_array: :class:`array`, :class:`np.ndarray` :param t_array: Array of temperatures (K) :type t_array: :class:`array`, :class:`np.ndarray` .. py:method:: compute_vmr_grid(molecule=None, logp_array=None, t_array=None)