:py:mod:`pytmosph3r.opacity` ============================ .. py:module:: pytmosph3r.opacity Module Contents --------------- .. py:class:: Opacity(rayleigh: bool = False, cia: Optional[List[str]] = None, wn_range: Optional[Tuple[float, float]] = None, k_data=None, doppler=None) Bases: :py:obj:`pytmosph3r.log.Logger`, :py:obj:`exo_k.util.spectral_object.Spectral_object` This module is the (main) link between pytmosph3r and exo_k. It will load the gas databases (:func:`load_gas_database`), and compute the opacities (:func:`compute`) of a list of cells of the atmosphere (using their physical properties: P, T, etc). The parameters of the Opacity module are: :param rayleigh: Activates Rayleigh. Defaults to None. :type rayleigh: bool, optional :param cia: List of molecules for which to compute Collision Induced Absorption. Defaults to None. Example: :code:`['H2','He']`. :type cia: list, optional :param wn_range: Range (wn_min, wn_max) of wave numbers to select for the computations. Defaults to None. :type wn_range: tuple, optional :param k_data: Exo_k object containing the gas database (especially useful if you will run multiple models, with the same data). Defaults to None. :type k_data: exo_k.Kdatabase, optional :param cia_data: Exo_k object containing the CIA database (especially useful if you will run multiple models, with the same data). Defaults to None. :type cia_data: exo_k.Kdatabase, optional .. py:property:: wns .. py:property:: wnedges .. py:attribute:: rayleigh Activate Rayleigh (by default, it is deactivated). .. py:attribute:: doppler Activate Doppler (by default, it is deactivated). Dictionary containing 'Kp' and 'phi' values. TODO .. py:attribute:: cia List of molecules to look for when computing CIA pairs. .. py:method:: fromQuantity(rayleigh: bool = False, cia: Optional[List] = None, w_range: Optional[List] = None) :classmethod: Create an `Opacity` object using astropy quantity for wn_range. :param rayleigh: :type rayleigh: bool :param cia: :type cia: List[str] :param w_range: Range of quantity to determine (wn_min, wn_max) ie wn_range :type w_range: List[Quantity] :returns: Opacity .. py:method:: load_gas_database(model) Loading :class:`exo_k` gas/CIA/aerosols databases, and potentially clip the spectral range. .. py:method:: compute(log_p, temperature, gas_vmr, aer_reff_densities, winds, coords, wn_range) Compute the opacities for a list of cells of the atmosphere. :param log_p: Log10(pressure) of each cell :type log_p: ndarray :param temperature: Temperature of each cell :type temperature: ndarray :param gas_vmr: gas dictionary (:code:`{gas_name: VMR}`) of each cell :type gas_vmr: ndarray :param aer_reff_densities: Aerosol data of each cell (see :class:`~pytmosph3r.aerosols.PrepareAerosols`) :type aer_reff_densities: ndarray :param winds: Winds (u,v,w) of each cell :type winds: ndarray :param coords: Coordinates (z,lat,lon) of each cell :type coords: ndarray :param wn_range: Wavenumber range to consider :type wn_range: ndarray .. py:method:: outputs()