%pylab inline
Populating the interactive namespace from numpy and matplotlib
from pytransit import OblateStarModel, QuadraticModel
tmo = OblateStarModel(sres=100, pres=8, rstar=1.65)
tmc = QuadraticModel(interpolate=False)
times = linspace(-0.35, 0.35, 500)
tmo.set_data(times)
tmc.set_data(times)
The model can be evaluated for a set of scalar parameters using the tm.evaluate_ps
method. The oblate model takes, in addition to the basic orbital parameters, the stellar rotation period rperiod
, pole temperature tpole
, obliquity phi
, gravity-darkening parameter beta
, and azimuthal angle az
.
The oblate model should be identical to the quadratic model if we set either the rotation period to a large value or the gravity-darkening parameter to zero.
k = array([0.1])
t0, p, a, i, az, e, w = 0.0, 4.0, 4.5, 0.5*pi, 0.0, 0.0, 0.0
rho, rperiod, tpole, phi, beta = 1.4, 0.25, 6500., -0.2*pi, 0.3
ldc = array([0.3, 0.1]) # Quadtratic limb darkening coefficients
flux_qm = tmc.evaluate_ps(k, ldc, t0, p, a, i, e, w)
rperiod = 10
flux_om = tmo.evaluate_ps(k, rho, rperiod, tpole, phi, beta, ldc, t0, p, a, i, az, e, w)
plot(flux_qm, lw=6, c='k')
plot(flux_om, lw=2, c='w');
rperiod = 0.15
b = 0.25
for phi in (-0.25*pi, 0.0, 0.25*pi, 0.5*pi):
tmo.visualize(0.1, b, 0.0, rho, rperiod, tpole, phi, beta, ldc, ires=256)
rperiod = 0.15
phi = 0.25
b = 0.00
for az in (-0.25*pi, 0.0, 0.25*pi, 0.5*pi):
tmo.visualize(0.1, b, az, rho, rperiod, tpole, phi, beta, ldc, ires=256)