def __init__(self): Planet.__init__(self, "Mars", 228000000, 1.8821) self.lengthOfDay = 1 self.diameter = 6794.4
def __init__(self): Planet.__init__(self, "Venus", 108000000, .6156) self.lengthOfDay = 243 self.diameter = 12104
import astropy.units as U from astropy.analytic_functions import blackbody_lambda import numpy as N # ##### The planet class contains all the methods used for the geometry of the planet-star system.: from planet_class import Planet # ##### Import the modules for the thermal model (currently a blackbody model).: from thermal import blackbody as thermal_model # ##### Import the system properties and data of the desired planet (contained in a Python dictionary in a separate file). Create a planet instance with the user-supplied system properties. from data.planet.GJ436b import GJ436b as exoplanet planet = Planet(exoplanet) print('{0} loaded as planet to model.'.format(planet.name)) # ##### Import the instrumental response data (currently for the Spitzer IRAC bands) and the routine to convert surface temperatures to observed planet-star flux ratios in a given band. from data.bandpass.spitzer_IRAC import spitzer_IRAC as instrument from data.bandpass.response import light_curve # ##### Import the likelihood calculation routine. from stats.gaussian import log_likelihood from stats.metropolis import MCMC # ##### Specify the spatial and time resolution for the calculations, including the number of orbits to run. planet.set_resolution(longitude_resolution = 18,
from planet_class import Planet naboo = Planet('Naboo', 300000, 8, 'Naboo System') print(f'Name: {naboo.name}') # print(f'Radius: {naboo.radius}') # print(f'Gravity: {naboo.gravity}') # print(naboo.orbit()) print(Planet.shape) # print(naboo.commons()) print(Planet.spin(4000))
def __init__(self): Planet.__init__(self, "Jupiter", 778000000, 11.862) self.lengthOfDay = .375 self.diameter = 142984
def __init__(self): Planet.__init__(self, "Mercury", 58000000, .2409) self.lengthOfDay = 58 self.diameter = 4879.4
def __init__(self): Planet.__init__(self, "Pluto", 5913000000, 247.7) self.lengthOfDay = 6 self.diameter = 2374
def __init__(self): Planet.__init__(self, "Saturn", 1427000000, 29.456) self.lengthOfDay = .417 self.diameter = 120536
def __init__(self): Planet.__init__(self, "Earth", 150000000, 1) self.lengthOfDay = 1 self.diameter = 12756
from data.bandpass.kepler import kepler as kepler bandpasses = {**kepler.bandpass, **TwoMASS.bandpass, **spitzer_IRAC.bandpass} # *** # ## Planet-specific Modules # ##### The planet class contains all the methods used for the geometry of the planet-star system. from planet_class import Planet # ##### Import the system properties and data of the planets (contained in Python dictionarys in a separate file), into a dictionary of planet classes. paths = [s.split('/')[-1] for s in glob('data/planet/*') if '__' not in s] planets = {} for path in paths: planets[path] = Planet(import_module('data.planet.{0}.{0}'.format(path))) # ##### Import the module for the thermal model. from thermal import blackbody as thermal_model # ##### Import the routine to convert surface temperatures to observed planet-star flux ratios in a given band. from data.bandpass.response import light_curve # ##### Import the likelihood calculation routine. from stats.gaussian import log_likelihood from stats.metropolis import MCMC # ***
# ##### The typical packages to import. import datetime import astropy.constants as C import astropy.units as U from astropy.analytic_functions import blackbody_lambda import numpy as N import matplotlib from matplotlib import pyplot as plt # ##### The planet class contains all the methods used for the geometry of the planet-star system. Create a planet instance with the user-supplied system properties. from planet_class import Planet planet = Planet(exoplanet) print("{0} loaded as planet to model.".format(planet.name)) # ##### Import the modules for the thermal model (currently a blackbody model).: from thermal import blackbody as thermal_model # ##### Import the system properties and data of the desired planet (contained in a Python dictionary in a separate file). from data.planet.HD209458b import HD209458b as exoplanet # ##### Import the instrumental response data (currently for the Spitzer IRAC bands) and the routine to convert surface temperatures to observed planet-star flux ratios in a given band. from data.bandpass.spitzer_IRAC import spitzer_IRAC as instrument from data.bandpass.response import light_curve
def __init__(self): Planet.__init__(self, "Neptune", 4497000000, 164.81) self.lengthOfDay = .667 self.diameter = 49572
def __init__(self): Planet.__init__(self, "Uranus", 2871000000, 84.07) self.lengthOfDay = .708 self.diameter = 51118