-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling Transit Timing Variations (TTV) Fitting with Jaxoplanet #251
base: main
Are you sure you want to change the base?
Conversation
- Minor bug fixes to less-common ttv approaches such as ttvs+period and delta_log_period addition - Removed per-transit loops, enhanced the jax.jit ability of the script (loops only remain for per planet, which enables static jitting) - added small docstrings and comments - slightly improved logic of unit handling
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
- Improved logic of notebook - Added more comments on some choices.
for more information, see https://pre-commit.ci
Just to note, made last improvements to ttv script. It now correctly works for all inputs of transit_times, transit_times+log_delta_period and ttvs+period. I've also removed most of the for loops and enabled more jitting functionality than previously (as well as vmapping in most scenarios). I've also improved the units logic somewhat and removed some redundancies. This should overall be a lot more polished version for inspection. I've also updated the tutorial notebook a little bit for some minor additional comments and model changes. These are the last PR changes I'll make on this but hopefully it may prove helpful in future! |
Thanks so much @TylerFair and sorry for the delay on this. I'll have a look by the end of the week! |
This is essentially a carbon copy of exoplanet's TTVOrbit integrated into the jaxoplanet architecture. I will note I am definitely not an expert at jax, and therefore this model will be slightly unoptimized, but from my benchmark tests, the model performs reasonably well at 10,000 points with ~50 transits between two planets with a convergence time of ~10 mins. One small thing is that for a reason unknown to me the model plummets to target_accept values of 0.00 if dense_mass is set to True, so setting it to false seems to be a must for high-parameter solutions, which I assume is why it is defaulted False in numpyro.infer.
To explain the module briefly: This implementation provides a framework for handling Transit Timing Variations (TTVs) by extending the base TransitOrbit class with time-warping capabilities. This is in a sense identical to TTVOrbit from Exoplanet which builds off of KeplerianOrbit. The core functionality remains the same, enabling users to either directly input TTV offsets or provide observed transit times, from which the code automatically computes the linear ephemeris and ttvs through linear regression. Using a binning-based lookup system, it maps arbitrary observation times to their corresponding (possibly shifted) transit events, handling both single and multi-planet configurations. The code maintains full compatibility with TransitOrbit while adding TTV-specific features like period/t0 inference, transit time tracking, and automatic unit handling (hopefully).
This should presumably go into an experimental folder if deemed clear to try until completely cleared but pushing to typical location anyway. Please feel free to make any changes you seem necessary or reject if you believe it should be built differently.
I have tested this on some previous case studies of mine and it appears to work well for known TESS systems thusfar.