exoplanet-dev / exoplanet

Fast & scalable MCMC for all your exoplanet needs!
https://docs.exoplanet.codes
MIT License
206 stars 52 forks source link

`SimpleTransitOrbit` transit shape is not consistent with `KeplerianOrbit` transit shape #147

Closed christinahedges closed 3 years ago

christinahedges commented 3 years ago

Describe the bug The SimpleTransitOrbit class I believe can make transit shapes, without enforcing Kepler's laws. When using it, it wasn't behaving as expected. When I set period, t0, b and duration to the same values, the transit shapes are very different.

To Reproduce Please see https://gist.github.com/christinahedges/ea3ad229e82fded715794be65124695f

Expected behavior I believe if I set period, t0, b and duration to the same value, and have b < r_star - 2*r I should have the same transit shape.

Your setup (please complete the following information):

dfm commented 3 years ago

It looks like this is the issue:

https://github.com/exoplanet-dev/exoplanet/blob/16cc4ef38258573e6a7f3fb4017c12f2fc19cbe7/src/exoplanet/orbits/simple.py#L64

We should refactor the SimpleTransitOrbit to take r_planet as a parameter and re-define the duration properly as the beginning of ingress to end of egress.