You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an eccentric orbit, juliet calculates a light travel time (LTT) delay of +51 seconds for eclipses of WASP-17b and HAT-P-26b, as expected (2aRs/c). For a circular orbit, juliet calculates an LTT delay of minus 10 seconds for HAT-P-26b and minus 30 seconds for WASP-17b, which is unphysical and inconsistent with the eccentric case.
In utils.correct_light_travel_time, the code path for a circular orbit has an np.sin(params.inc), which assumes inclination is in radians:
if params.ecc > 0:
# Need to solve Kepler's equation, so use the KeplerOrbit class
# for rapid computation. In the SPIDERMAN notation z is the radial
# coordinate, while for Bell_EBM the radial coordinate is x
orbit = KeplerOrbit(a=a, Porb=params.per, inc=params.inc,
t0=params.t0, e=params.ecc, argp=params.w)
old_x, _, _ = orbit.xyz(times)
transit_x, _, _ = orbit.xyz(params.t0)
else:
# No need to solve Kepler's equation for circular orbits, so save
# some computation time
transit_x = a*np.sin(params.inc)
old_x = transit_x*np.cos(2*np.pi*(times-params.t0)/params.per)
But params.inc is in degrees. KeplerOrbit and batman assume inclination is in degrees and multiply by np.pi/180 before use in trigonometric functions. Mistakenly feeding degrees rather than radians to the cos function multiplies the LTT delay by a factor between -1 and 1. Changing the circular orbit code to np.sin(params.inc*np.pi/180) yields an LTT delay of +51 seconds, consistent with expectations and the eccentric orbit case.
For an eccentric orbit, juliet calculates a light travel time (LTT) delay of +51 seconds for eclipses of WASP-17b and HAT-P-26b, as expected (2aRs/c). For a circular orbit, juliet calculates an LTT delay of minus 10 seconds for HAT-P-26b and minus 30 seconds for WASP-17b, which is unphysical and inconsistent with the eccentric case.
In
utils.correct_light_travel_time
, the code path for a circular orbit has annp.sin(params.inc)
, which assumes inclination is in radians:But
params.inc
is in degrees.KeplerOrbit
andbatman
assume inclination is in degrees and multiply bynp.pi/180
before use in trigonometric functions. Mistakenly feeding degrees rather than radians to thecos
function multiplies the LTT delay by a factor between -1 and 1. Changing the circular orbit code tonp.sin(params.inc*np.pi/180)
yields an LTT delay of +51 seconds, consistent with expectations and the eccentric orbit case.Eureka! currently has the same bug: Issue #735
The text was updated successfully, but these errors were encountered: