Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# -*- coding: utf-8 -*-
import exoplanet
from packaging import version
import theano.tensor as tt
import numpy as np
from ..ops import autocompile
# NOTE: In version 0.1.7, DFM changed the coordinates
# so that the z-axis points TOWARD the observer!
if version.parse(exoplanet.__version__) > version.parse('0.1.7.dev0'):
z_sign = 1
else:
z_sign = -1
class KeplerianOrbit(exoplanet.orbits.KeplerianOrbit):
"""
A wrapper around `exoplanet.orbits.KeplerianOrbit` that
plays nice with `starry`. Refer to the docs of that class
for all accepted keywords. In addition to those, this class
accepts the following keyword arguments:
Args:
r_planet: The radius of the planet in ``R_sun``. Default is
the radius of the Earth.
rot_period: The period of rotation of the planet in days.
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
# Hide Theano compilelock warnings
import logging
logger = logging.getLogger("theano.gof.compilelock")
logger.setLevel(logging.ERROR)
import theano
print("theano version: {0}".format(theano.__version__))
import pymc3
print("pymc3 version: {0}".format(pymc3.__version__))
import exoplanet
print("exoplanet version: {0}".format(exoplanet.__version__))
import starry
print("starry version: {0}".format(starry.__version__))
import logging
logger = logging.getLogger("theano.gof.compilelock")
logger.setLevel(logging.ERROR)
import theano
print("theano version: {0}".format(theano.__version__))
import pymc3
print("pymc3 version: {0}".format(pymc3.__version__))
import exoplanet
print("exoplanet version: {0}".format(exoplanet.__version__))
import logging
logger = logging.getLogger("theano.gof.compilelock")
logger.setLevel(logging.ERROR)
import theano
print("theano version: {0}".format(theano.__version__))
import pymc3
print("pymc3 version: {0}".format(pymc3.__version__))
import exoplanet
print("exoplanet version: {0}".format(exoplanet.__version__))
import matplotlib.pyplot as plt
plt.style.use("default")
plt.rcParams["savefig.dpi"] = 100
plt.rcParams["figure.dpi"] = 100
plt.rcParams["font.size"] = 16
plt.rcParams["font.family"] = "sans-serif"
plt.rcParams["font.sans-serif"] = ["Liberation Sans"]
plt.rcParams["mathtext.fontset"] = "custom"