:mod:`pytmosph3r.emission` ========================== .. py:module:: pytmosph3r.emission Module Contents --------------- .. function:: surface_projection(local_latitudes, n_per_latitudes, local_longitudes, n_per_longitudes, n_total_longitudes, obs_latitude, obs_longitude, planet_radius, 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=None, phase_curve=None, n_phases=None, surface_resolution=None, store_raw_flux=None, **kwargs) Bases: :class:`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. A phase curve mode can be activated, in which case, we iterate over :attr:`n_phases` longitudes for the observer and scale the flux using the projection of the surface onto that direction. :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 phase_curve: Activates the computation of the phase curve. :type phase_curve: bool :param n_phases: Number of phases for the pĥase curve. Defaults to 100. :type n_phases: int :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 or not to store raw flux (over each (latitude, longitude)). :type store_raw_flux: bool :param kwargs: See `documentation of Exo_k `_ to see what other options are available. :type kwargs: dict :returns: 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}`). :rtype: (Spectrum) .. attribute:: planet_to_star_flux_ratio Returns the planet to star flux ratio instead of the planet flux. .. attribute:: phase_curve_mode Activates the computation of the phase curve. .. attribute:: n_phases Number of phases in the phase curve. .. attribute:: flux Output spectrum (Exo_k object). .. attribute:: surface_resolution Number of grid points to calculate projected surface. .. attribute:: store_raw_flux Whether or not to store raw flux (over each (latitude, longitude)). .. method:: build(self, model) No need for an altitude-based grid (as done in transmission), so we just copy the input grid. .. method:: compute_projection(self) Compute the projection surface of the grid cells over the plane of the sky. .. method:: compute(self, 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). 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 (either planet flux or planet-to-star flux ratio, following if :attr:`planet_to_star_flux_ratio` is activated). :rtype: Spectrum (exo_k object) .. method:: compute_phase_curve(self) Computation of a phase curve, along :attr:`n_phases` observer longitudes. This function is called by :func:`compute`. .. method:: inputs(self) .. method:: outputs(self)