POSEIDON.transmission

Functions for transmission spectra radiative transfer calculations.

Module Contents

Functions

zone_boundaries(N_b, N_sectors, N_zones, b, r_up, ...)

Compute the maximum and minimal radial distance from the centre of the

path_distribution_geometric(b, r_up, r_low, dr, i_bot, ...)

Compute the path distribution tensor, in the geometric limit where rays

extend_rad_transfer_grids(phi_edge, theta_edge, R_s, ...)

Extend the background atmosphere geometric grids (north hemisphere)

compute_tau_vert(N_phi, N_layers, N_zones, N_wl, ...)

Computes the vertical optical depth tensor across each layer within

delta_ray_geom(N_phi, N_b, b, b_p, y_p, phi_grid, R_s_sq)

Compute the ray tracing Kronecker delta factor in the geometric limit.

TRIDENT(P, r, r_up, r_low, dr, wl, kappa_clear, ...)

Main function used by the TRIDENT forward model to solve the equation

POSEIDON.transmission.zone_boundaries(N_b, N_sectors, N_zones, b, r_up, k_zone_back, theta_edge_min, theta_edge_max)

Compute the maximum and minimal radial distance from the centre of the planet that a ray at impact parameter b experiences in each azimuthal sector and zenith zone.

These quantities are ‘r_min’ and ‘r_max’ in MacDonald & Lewis (2022).

Parameters:
  • N_b (int) – Number of impact parameters (length of b).

  • N_sectors (int) – Number of azimuthal sectors.

  • N_zones (int) – Number of zenith zones.

  • b (np.array of float) – Stellar ray impact parameters.

  • r_up (3D np.array of float) – Upper layer boundaries in each atmospheric column (m).

  • k_zone_back (np.array of int) – Indices encoding which background atmosphere zone each zenith integration element corresponds to.

  • theta_edge_min (np.array of float) – Minimum zenith angle of each zone (radians).

  • theta_edge_max (np.array of float) – Maximum zenith angle of each zone (radians).

Returns:

Minimum radial extent encountered by a ray when traversing a given

layer in a column defined by its sector and zone (m).

r_max (3D np.array of float):

Maximum radial extent encountered by a ray when traversing a given layer in a column defined by its sector and zone (m).

Return type:

r_min (3D np.array of float)

POSEIDON.transmission.path_distribution_geometric(b, r_up, r_low, dr, i_bot, j_sector_back, N_layers, N_sectors_back, N_zones_back, N_zones, N_phi, k_zone_back, theta_edge_all)

Compute the path distribution tensor, in the geometric limit where rays travel in straight lines, using the equations in MacDonald & Lewis (2022).

Parameters:
  • b (np.array of float) – Stellar ray impact parameters.

  • r_up (3D np.array of float) – Upper layer boundaries in each atmospheric column (m).

  • r_low (3D np.array of float) – Lower layer boundaries in each atmospheric column (m).

  • dr (3D np.array of float) – Layer thicknesses in each atmospheric column (m).

  • i_bot (int) – Layer index of bottom of atmosphere (rays with b[i < i_bot] are ignored). By default, i_bot = 0 so all rays are included in the radiative transfer calculation.

  • j_sector_back (np.array of int) – Indices encoding which background atmosphere sector each azimuthal integration element falls in (accounts for north-south symmetry of background atmosphere, since the path distribution need only be calculated once for the northern hemisphere).

  • N_layers (int) – Number of layers.

  • N_sectors_back (int) – Number of azimuthal sectors in the background atmosphere.

  • N_zones_back (int) – Number of zenith zones in the background atmosphere.

  • N_phi (int) – Number of azimuthal integration elements (not generally the same as N_sectors, especially when the planet partially overlaps the star).

  • k_zone_back (np.array of int) – Indices encoding which background atmosphere zone each zenith integration element corresponds to.

  • theta_edge_all (np.array of float) – Zenith angles at the edge of each zone (radians).

Returns:

Path distribution tensor for 3D atmospheres.

Return type:

Path (4D np.array of float)

POSEIDON.transmission.extend_rad_transfer_grids(phi_edge, theta_edge, R_s, d, R_max, f_cloud, phi_0, theta_0, N_sectors_back, N_zones_back, enable_deck, N_phi_max=36)

Extend the background atmosphere geometric grids (north hemisphere) to produce the full geometric grids used for radiative transfer.

This function first duplicates the north hemisphere to symmetrically extend to the south hemisphere. Then, additional sectors and zones are added for cloudy models at the angular locations where they slice the existing background sectors / zones.

In cases where the planet only partially transits the stellar disc (e.g. grazing transits, ingress, or egress) the ‘N_phi_max’ parameter specifies how many azimuthal sectors the atmosphere is spatially resolved into. In this case, the nearest background 2D / 3D atmosphere sector is placed on the fine grid during radiative transfer.

Parameters:
  • phi_edge (np.array of float) – Boundary angles for each sector (radians).

  • theta_edge (np.array of float) – Boundary angles for each zone (radians).

  • R_s (float) – Stellar radius (m).

  • d (float) – Distance between planet and star centres.

  • R_max (float) – Maximum radial extent of entire 3D atmosphere (top of atmosphere).

  • f_cloud (float) – Terminator azimuthal cloud fraction for 2D/3D models.

  • phi_0 (float) – Azimuthal angle in terminator plane, measured clockwise from the North pole, where the patchy cloud begins for 2D/3D models (degrees).

  • theta_0 (float) – Zenith angle from the terminator plane, measured towards the nightside, where the patchy cloud begins for 2D/3D models (degrees).

  • N_sectors_back (int) – Number of azimuthal sectors in the background atmosphere.

  • N_zones_back (int) – Number of zenith zones in the background atmosphere.

  • enable_deck (int) – 1 if the model contains a cloud deck, else 0.

  • N_phi_max (int, optional) – Maximum number of azimuthal integration elements to use for partial transits when discretising the atmosphere.

Returns:

Angles in the centre of each azimuthal integration element (radians). dphi_grid (np.array of float):

Angular width each azimuthal integration element (radians).

theta_grid (np.array of float):

Angles in the centre of each zenith integration element (radians).

theta_edge_all (np.array of float):

Boundary angles at the edge of each zenith integration element (radians).

N_sectors (int):

Total number of azimuthal sectors (including addition of southern hemisphere and any extra sectors needed to handle patchy clouds).

N_zones (int):

Total number of zenith zones (including any additional zones needed to handle patchy clouds).

N_phi (int):

Number of azimuthal integration elements.

j_sector (np.array of int):

Indices specifying which sector each azimuthal integration element falls in (for the full list of sectors, including cloud sectors).

j_sector_back (np.array of int):

Indices specifying which sector of the background atmosphere each azimuthal integration element falls in (clear atmosphere only).

k_zone_back (np.array of int):

Indices encoding which background atmosphere zone each zenith integration element corresponds to.

cloudy_sectors (np.array of int):

0 if a given sector is clear, 1 if it contains a cloud.

cloudy_zones (np.array of int):

0 if a given zone is clear, 1 if it contains a cloud.

Return type:

phi_grid (np.array of float)

POSEIDON.transmission.compute_tau_vert(N_phi, N_layers, N_zones, N_wl, j_sector, j_sector_back, k_zone_back, cloudy_zones, cloudy_sectors, kappa_clear, kappa_cloud, dr)

Computes the vertical optical depth tensor across each layer within each column as a function of wavelength.

Parameters:
  • N_phi (int) – Number of azimuthal integration elements.

  • N_layers (int) – Number of atmospheric layers.

  • N_zones (int) – Number of zenith zones.

  • N_wl (int) – Number of wavelengths.

  • j_sector (np.array of int) – Indices specifying which sector each azimuthal integration element falls in (for the full list of sectors, including cloud sectors).

  • j_sector_back (np.array of int) – Indices specifying which sector of the background atmosphere each azimuthal integration element falls in (clear atmosphere only).

  • k_zone_back (np.array of int) – Indices encoding which background atmosphere zone each zenith integration element corresponds to.

  • cloudy_zones (np.array of int) – 0 if a given zone is clear, 1 if it contains a cloud.

  • cloudy_sectors (np.array of int) – 0 if a given sector is clear, 1 if it contains a cloud.

  • kappa_clear (4D np.array of float) – Extinction coefficient from the clear atmosphere (combination of line absorption, CIA, bound-free and free-free absorption, and Rayleigh scattering) (m^-1).

  • kappa_cloud (4D np.array of float) – Extinction coefficient from the cloudy / haze contribution (m^-1).

  • dr (3D np.array of float) – Layer thicknesses in each atmospheric column (m).

Returns:

Vertical optical depth tensor.

Return type:

tau_vert (4D np.array of float)

POSEIDON.transmission.delta_ray_geom(N_phi, N_b, b, b_p, y_p, phi_grid, R_s_sq)

Compute the ray tracing Kronecker delta factor in the geometric limit.

Parameters:
  • N_phi (int) – Number of azimuthal integration elements (not generally the same as N_sectors, especially when the planet partially overlaps the star).

  • N_b (int) – Number of impact parameters (length of b).

  • b (np.array of float) – Stellar ray impact parameters.

  • b_p (float) – Impact parameter of planetary orbit (m) – NOT in stellar radii!

  • y_p (float) – Perpendicular distance from planet centre to the point where d = b_p (y coord. of planet centre as seen by observer in stellar z-y plane).

  • phi_grid (np.array of float) – Angles in the centre of each azimuthal integration element (radians).

  • R_s_sq (float) – Square of the stellar radius (m^2).

Returns:

1 if a given ray traces back to the star, 0 otherwise.

Return type:

delta_ray (2D np.array of float)

POSEIDON.transmission.TRIDENT(P, r, r_up, r_low, dr, wl, kappa_clear, kappa_cloud, enable_deck, enable_haze, b_p, y_p, R_s, f_cloud, phi_0, theta_0, phi_edge, theta_edge)

Main function used by the TRIDENT forward model to solve the equation of radiative transfer for exoplanet transmission spectra.

This function implements the tensor dot product method derived in MacDonald & Lewis (2022).

Note: This function is purely the atmospheric contribution to the spectrum.

The ‘contamination factor’ contributions (e.g. stellar heterogeneity) are handled afterwards in ‘core.py’.

Parameters:
  • P (np.array of float) – Atmosphere pressure array (bar).

  • r (3D np.array of float) – Radial distance profile in each atmospheric column (m).

  • r_up (3D np.array of float) – Upper layer boundaries in each atmospheric column (m).

  • r_low (3D np.array of float) – Lower layer boundaries in each atmospheric column (m).

  • dr (3D np.array of float) – Layer thicknesses in each atmospheric column (m).

  • wl (np.array of float) – Model wavelength grid (μm).

  • kappa_clear (4D np.array of float) – Extinction coefficient from the clear atmosphere (combination of line absorption, CIA, bound-free and free-free absorption, and Rayleigh scattering) (m^-1).

  • kappa_cloud (4D np.array of float) – Extinction coefficient from the cloudy / haze contribution (m^-1).

  • enable_deck (int) – 1 if the model contains a cloud deck, else 0.

  • enable_haze (int) – 1 if the model contains a haze, else 0.

  • b_p (float) – Impact parameter of planetary orbit (m) – NOT in stellar radii!

  • y_p (float) – Perpendicular distance from planet centre to the point where d = b_p (y coord. of planet centre as seen by observer in stellar z-y plane).

  • R_s (float) – Stellar radius (m).

  • f_cloud (float) – Terminator azimuthal cloud fraction for 2D/3D models.

  • phi_0 (float) – Azimuthal angle in terminator plane, measured clockwise from the North pole, where the patchy cloud begins for 2D/3D models (degrees).

  • theta_0 (float) – Zenith angle from the terminator plane, measured towards the nightside, where the patchy cloud begins for 2D/3D models (degrees).

  • phi_edge (np.array of float) – Boundary angles for each sector (radians).

  • theta_edge (np.array of float) – Boundary angles for each zone (radians).

Returns:

Atmospheric transit depth as a function of wavelength.

Return type:

transit_depth (np.array of float)