:py:mod:`pytmosph3r.observations.emission` ========================================== .. py:module:: pytmosph3r.observations.emission Module Contents --------------- .. py:function:: surface_projection(local_latitudes, n_per_latitudes: int, local_longitudes, n_per_longitudes: int, n_total_longitudes: int, obs_latitude: float, obs_longitude: float, planet_radius: float, local_projection) Compute surface projection of :attr:`local_latitudes` and :attr:`local_longitudes` on the plane of the sky (as seen from the observer). :attr:`local_projection` is the output of the function. .. py:class:: Emission(planet_to_star_flux_ratio: bool = False, surface_resolution: int = 500, store_raw_flux: bool = False, top_flux_from_star: bool = False, mu_from_obs: bool = False, compute_contribution_function: bool = False, **kwargs) Bases: :py:obj:`pytmosph3r.log.Logger` The emission module computes the flux emitted by a body by iterating over the latitudes and longitudes of the model. It relies on `Exo_k `_ for the computation of the 1D flux in each column. The flux is then scaled with respected to the surface of the atmosphere projected onto the plane of the sky. All options are deactivated by default. :param planet_to_star_flux_ratio: The output spectrum will be a ratio between the flux of the planet and that of the star (instead of the flux of the planet). :type planet_to_star_flux_ratio: bool :param surface_resolution: Number of grid points to calculate projected surface (the more points, the more accurate). Defaults to 500. :type surface_resolution: int :param store_raw_flux: Whether to store raw flux (over each (latitude, longitude)). :type store_raw_flux: bool :param top_flux_from_star: Whether to use the star flux as top flux (weighted by the cosinus of the angle between the column (lat,lon) and the star). :type top_flux_from_star: bool :param mu_from_obs: Whether to use the position of the observer for computing a :math:`\mu_0` for :func:`emission_spectrum_2stream`. :type mu_from_obs: bool :param compute_contribution_function: Compute the contribution function. See `documentation of Exo_k ` :type compute_contribution_function: bool :param kwargs: See `documentation of Exo_k `_ to see what other options are available. :type kwargs: dict Returns: (Spectrum): If :attr:`planet_to_star_flux_ratio` is True, the planet to star flux ratio ( :math:`F_P/F_S * (R_P/R_S)^2`), else the planet flux (in :math:`W/m^2/cm^{-1}`). .. py:attribute:: planet_to_star_flux_ratio :type: bool Returns the planet to star flux ratio instead of the planet flux. .. py:attribute:: surface_resolution :type: Optional[int] Number of grid points to calculate projected surface. .. py:attribute:: store_raw_flux :type: bool Whether or not to store raw flux (over each (latitude, longitude)). .. py:attribute:: top_flux_from_star :type: bool Whether or not to use the star flux as top flux (weighted by the cosine of the angle between the column (lat,lon) and the star). .. py:attribute:: mu_from_obs :type: bool Use the position of the observer for computing a :math:`\mu_0` for :func:`emission_spectrum_2stream`. .. py:attribute:: compute_contribution_function :type: bool Allow to compute the contribution function. .. py:attribute:: spectrum :type: Optional[exo_k.Spectrum] Output spectrum (Exo_k object). .. py:attribute:: spectrum_normalized :type: Optional[exo_k.Spectrum] Output spectrum (Exo_k object) normalized with the stellar flux. .. py:method:: build(model) No need for an altitude-based grid (as done in transmission), so we just copy the input grid. .. py:method:: compute_projection() Compute the projection surface of the grid cells over the plane of the sky. .. py:method:: compute(model) Iterate over vertical columns (lat/lon) of the model, in which we use the exo_k 1D two-stream emission function (emission_spectrum_2stream() for the `Atm` class). Then integrate the output flux in the direction of the observer. For that, we compute the solid angle associated to the position of the observer, projecting the visible surface of the atmosphere onto the plane of the sky. The flux is scaled with respect to that projected surface. If :attr:`planet_to_star_flux_ratio` is True, the flux is scaled to the flux of the star (a blackbody) and stored in `self.spectrum_normalized`. If the phase curve mode is activated, this function also computes a :attr:`phase_curve` object with the spectrum associated to all :attr:`n_phases` phase/observer longitudes (see :func:`compute_phase_curve`). :param model: Model in which to read latitudes, longitudes, pressure, etc. :type model: :class:`~pytmosph3r.model.model.Model` :returns: Spectrum, planet flux (stored in `self.spectrum`). `self.spectrum_normalized` store the planet to star ratio if `self.planet_to_star_flux_ratio` is `True`. :rtype: Spectrum (exo_k object) .. py:method:: outputs()