pytmosph3r.emission
¶
Module Contents¶
-
surface_projection
(local_latitudes, n_per_latitudes, local_longitudes, n_per_longitudes, n_total_longitudes, obs_latitude, obs_longitude, planet_radius, local_projection)[source]¶ Compute surface projection of
local_latitudes
andlocal_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=None, phase_curve=None, n_phases=None, surface_resolution=None, store_raw_flux=None, **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. A phase curve mode can be activated, in which case, we iterate over
n_phases
longitudes for the observer and scale the flux using the projection of the surface onto that direction.- 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).
phase_curve (bool) – Activates the computation of the phase curve.
n_phases (int) – Number of phases for the pĥase curve. Defaults to 100.
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 or not to store raw flux (over each (latitude, longitude)).
kwargs (dict) – See documentation of Exo_k to see what other options are available.
- Returns
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}\)).- Return type
(Spectrum)
-
planet_to_star_flux_ratio
¶ Returns the planet to star flux ratio instead of the planet flux.
-
phase_curve_mode
¶ Activates the computation of the phase curve.
-
n_phases
¶ Number of phases in the phase curve.
-
flux
¶ Output spectrum (Exo_k object).
-
surface_resolution
¶ Number of grid points to calculate projected surface.
-
store_raw_flux
¶ Whether or not to store raw flux (over each (latitude, longitude)).
-
build
(self, model)[source]¶ No need for an altitude-based grid (as done in transmission), so we just copy the input grid.
-
compute_projection
(self)[source]¶ Compute the projection surface of the grid cells over the plane of the sky.
-
compute
(self, 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). If the phase curve mode is activated, this function also computes aphase_curve
object with the spectrum associated to alln_phases
phase/observer longitudes (seecompute_phase_curve()
).- Parameters
model (
Model
) – Model in which to read latitudes, longitudes, pressure, etc.- Returns
Spectrum (either planet flux or planet-to-star flux ratio, following if
planet_to_star_flux_ratio
is activated).- Return type
Spectrum (exo_k object)