In [1]:
import batman
import numpy as np
import matplotlib.pyplot as plt
% matplotlib inline
In [2]:
params = batman.TransitParams()
params.t0 = 0. #time of inferior conjunction
params.per = 1. #orbital period
params.rp = 0.1 #planet radius (in units of stellar radii)
params.a = 15. #semi-major axis (in units of stellar radii)
params.inc = 87. #orbital inclination (in degrees)
params.ecc = 0. #eccentricity
params.w = 90. #longitude of periastron (in degrees)
params.u = [0.1, 0.3] #limb darkening coefficients
params.limb_dark = "quadratic" #limb darkening model
In [3]:
t = np.linspace(-0.05, 0.05, 100)
In [4]:
m = batman.TransitModel(params, t) #initializes model
flux = m.light_curve(params) #calculates light curve
In [5]:
plt.plot(t, flux)
plt.xlabel("Time from central transit")
plt.ylabel("Relative flux")
plt.ylim((0.989, 1.001))
plt.savefig("lc.png")
plt.show()
In [ ]:
params = batman.TransitParams()
params.t0 = 0.0 #time of inferior conjunction
params.per = 1.63 #orbital period
params.rp = 0.01 #planet radius (in units of stellar radii)
params.a = 16.0 #semi-major axis (in units of stellar radii)
params.inc = 87. #orbital inclination (in degrees)
params.ecc = 0.0 #eccentricity
params.w = 90.0 #longitude of periastron (in degrees)
params.u = [0.1, 0.3] #limb darkening coefficients
params.limb_dark = "quadratic"
In [ ]:
t = np.linspace(-0.05, 0.05, 100)
m = batman.TransitModel(params, t) #initializes model
flux = m.light_curve(params)
In [ ]:
plt.title("GJ 1132 b")
plt.plot(t, flux)
plt.xlabel("Time from central transit")
plt.ylabel("Relative flux")
plt.ylim((0.989, 1.001))
plt.savefig("lc.png")
plt.show()