pytmosph3r.observations.emission

Module Contents

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)[source]

Compute surface projection of local_latitudes and local_longitudes on the plane of the sky (as seen from the observer). local_projection is the output of the function.

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)[source]

Bases: 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.

Parameters:
  • planet_to_star_flux_ratio (bool) – 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).

  • surface_resolution (int) – Number of grid points to calculate projected surface (the more points, the more accurate). Defaults to 500.

  • store_raw_flux (bool) – Whether to store raw flux (over each (latitude, longitude)).

  • top_flux_from_star (bool) – Whether to use the star flux as top flux (weighted by the cosinus of the angle between the column (lat,lon) and the star).

  • mu_from_obs (bool) – Whether to use the position of the observer for computing a \(\mu_0\) for emission_spectrum_2stream().

  • compute_contribution_function (bool) – Compute the contribution function. See documentation of Exo_k <http://perso.astrophy.u-bordeaux.fr/~jleconte/exo_k-doc/autoapi/exo_k/atm/index.html#exo_k.atm.Atm.contribution_function>

  • kwargs (dict) – See documentation of Exo_k to see what other options are available.

Returns: (Spectrum): If planet_to_star_flux_ratio is True, the planet to star flux ratio ( \(F_P/F_S * (R_P/R_S)^2\)), else the planet flux (in \(W/m^2/cm^{-1}\)).

planet_to_star_flux_ratio: bool

Returns the planet to star flux ratio instead of the planet flux.

surface_resolution: int | None

Number of grid points to calculate projected surface.

store_raw_flux: bool

Whether or not to store raw flux (over each (latitude, longitude)).

top_flux_from_star: 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).

mu_from_obs: bool

Use the position of the observer for computing a \(\mu_0\) for emission_spectrum_2stream().

compute_contribution_function: bool

Allow to compute the contribution function.

spectrum: exo_k.Spectrum | None

Output spectrum (Exo_k object).

spectrum_normalized: exo_k.Spectrum | None

Output spectrum (Exo_k object) normalized with the stellar flux.

build(model)[source]

No need for an altitude-based grid (as done in transmission), so we just copy the input grid.

compute_projection()[source]

Compute the projection surface of the grid cells over the plane of the sky.

compute(model)[source]

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 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 phase_curve object with the spectrum associated to all n_phases phase/observer longitudes (see compute_phase_curve()).

Parameters:

model (Model) – Model in which to read latitudes, longitudes, pressure, etc.

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.

Return type:

Spectrum (exo_k object)

outputs()[source]