platon package

Submodules

platon.TP_profile module

platon.abundance_getter module

platon.combined_retriever module

platon.constants module

platon.constants.AU = 149597870700.0

Astronomical unit

platon.constants.M_earth = 5.97236e+24

Earth mass

platon.constants.M_jup = 1.89819e+27

Jupiter mass

platon.constants.M_sun = 1.98848e+30

Solar mass

platon.constants.R_earth = 6378100.0

Earth radius

platon.constants.R_jup = 71492000.0

Jupiter radius

platon.constants.R_sun = 695700000.0

Solar radius

platon.eclipse_depth_calculator module

platon.errors module

exception platon.errors.AtmosphereError[source]

Bases: Exception

platon.fit_info module

class platon.fit_info.FitInfo(guesses_dict)[source]

Bases: object

__init__(guesses_dict)[source]
add_gases_clr(gases, low_lim=1e-12)[source]
add_gases_vmr(gases, low_lim, high_lim)[source]
add_gaussian_fit_param(name, std, low_guess=None, high_guess=None)[source]

Fit for the parameter name using a Gaussian prior with standard deviation std. If using emcee, the walkers’ initial values for this parameter are randomly selected to be between low_guess and high_guess. If low_guess is None, it is set to mean-2*std; if high_guess is None, it is set to mean+2*std.

add_uniform_fit_param(name, low_lim, high_lim, low_guess=None, high_guess=None)[source]

Fit for the parameter name using a uniform prior between low_lim and high_lim. If using emcee, the walkers’ initial values for this parameter are randomly selected to be between low_guess and high_guess. If not specified, low_guess is set to low_lim, and similarly with high_guess.

platon.retriever module

platon.transit_depth_calculator module

platon.visualizer module

class platon.visualizer.Visualizer(size=1000)[source]

Bases: object

__init__(size=1000)[source]

Initializes the visualizer.

Parameters:

size (int) – size x size is the size of the image to draw

draw(transit_info, color_bins, star_color=[1, 1, 1], method='disk', star_radius=None, star_margin=0.5, max_dist=None, blur_std=1)[source]

Draws an image of a transiting exoplanet.

Parameters:
  • transit_info (dict) – the dictionary returned by compute_depths in TransitDepthCalculator when full_output = True

  • color_bins (array-like, shape (3,2)) – Wavelength bins to use for the R, G, B channels. For example, if color_bins[0] is [3e-6, 4e-6], the red channel will reflect all light transmitted through the atmosphere between 3 and 4 microns.

  • star_color (array-like, length 3, optional) – R, G, B values of the star light, with [1,1,1] being white

  • method (str, optional) – Either ‘disk’ to draw the entire planetary disk with atmosphere, or ‘layers’ to draw a 1D atmospheric profile–essentially an extreme zoom-in on the disk.

  • star_radius (float, optional) – Stellar radius, in meters. If given, the stellar limb will be drawn

  • star_margin (float, optional) – Distance from left side of canvas to stellar limb is star_margin * max_dist

  • max_dist (float, optional) – Maximum distance from planet center to draw, in meters

  • blur_std (float, optional) – STD of Gaussian blur to apply, in pixels

Returns:

canvas – The image of the planet. Can be displayed with plt.imshow()

Return type:

array, shape (self.size, self.size, 3)

Module contents