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, star_pos: Tuple[float, float] | None) Tuple[float, float, float, float][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, planet_to_top_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, stellar_mode: Literal['diffusive', 'collimated'] = 'diffusive', **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 the 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 cosines 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>

  • stellar_mode – Set the method to be used to take into account the star flux. 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.emission_spectrum_2stream>

  • 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 = False

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

planet_to_top_flux_ratio = False

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

surface_resolution: int | None = 500

Number of grid points to calculate projected surface.

store_raw_flux: bool = False

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

top_flux_from_star: bool = False

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 = False

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

compute_contribution_function: bool = False

Allow to compute the contribution function.

stellar_mode: Literal['diffusive', 'collimated'] = 'diffusive'

Method to take into account the top flux from star (if self.top_flux_from_star is True)

kwargs
spectrum: exo_k.Spectrum | None = None

Output spectrum (Exo_k object).

spectrum_normalized: exo_k.Spectrum | None = None

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

factor_normalized: exo_k.Spectrum | None = None
build(model)[source]

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

compute_projection(star_pos: Tuple[float, float] | None)[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 with 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 stores the planet-to-star ratio if self.planet_to_star_flux_ratio is True.

Return type:

Spectrum (exo_k object)

outputs()[source]