Skip to content
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

Joining forces with PlanetOrbits.jl #5

Open
sefffal opened this issue Jan 2, 2023 · 1 comment
Open

Joining forces with PlanetOrbits.jl #5

sefffal opened this issue Jan 2, 2023 · 1 comment

Comments

@sefffal
Copy link
Member

sefffal commented Jan 2, 2023

Hi folks,
I can't help but notice there is a lot of overlap between PlanetOrbits.jl and Orbits.jl.
Thoughts on merging these two packages? Edit: see previous discussion here JuliaAstro/Transits.jl#31

You can check out the docs for PlanetOrbits.jl here:
https://sefffal.github.io/PlanetOrbits.jl/dev/

A few nice features I've implemented:

  • pluggable Kepler solvers
  • hierarchy of orbit types for different parameterizations, e.g. keplerian orbit, keplerian orbit with distance, Thiele-Innes elements, r.v. orbits
  • flexible plots recipes for most quantities
  • plot orbits over images of a system
  • A nice interface for incrementalling solving an orbit, then calculating quantities of interest:
sol = orbitsolve(orbit, mjd("2020-01-01"))
rv = radvel(sol)
x = raoff(sol)

# or convenience methods:
rv = radvel(orbit, mjd("2020-01-01"))

Features from Orbits.jl that are missing in PlanetOrbits.jl:

  • support for units, instead of hardcoding a default set of unit conversions.
  • some quantities like impact parameter,
  • orbit parameterizations better suited to transit and RV fitting

Features I'd love to have some day:

  • sub-package for N body physics using NBodySimulator.jl. That is, taking a set of orbit structs and propagating them for N years with full interactions between them.
  • better type hierarchy for multiple bodies, even when just doing 2 body physics with Keplers laws. E.g. something like primary.mass and secondary.mass etc.

This would also be a great route for getting solid transit fitting into DirectDetections.jl. I've done some experiments with Transits.jl and joint RV-transit fits. It sort of works, but still feels a bit hacky when mixing Transits.jl with PlanetOrbits.jl.

Challenges:
I think the biggest impediment would probably be agreeing to conventions, e.g. does argument of periapsis refer to the primary (as in RV, transit communities) or secondary (imaging, proper motion communities). This might be solved having an explicit separation between a primary and secondary as different types.

Anyways, let me know what you think!

@BrettKnoss
Copy link

Is it possible to calucate an orbit knowing the mass and rho of both the star and planet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants