exoplanet-dev / exoplanet

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

Add orbital elements diagram to API #225

Open danhey opened 3 years ago

danhey commented 3 years ago

Hey y'all. I've put together some figures for the orbital elements and think this one might be useful for exoplanet, especially considering the confusion regarding Omega / omega (https://github.com/exoplanet-dev/exoplanet/issues/212). Right now I've dropped it in the Orbits API page, but I'm looking for feedback on where it could go.

I've attached a copy of the diagram below. I've tried to make it consistent with the exoplanet orbital conventions but it definitely needs a look over -- one of my concerns is that the periastron and apoastron look pretty much the same distance from the barycenter? elements

dfm commented 3 years ago

Thanks @danhey! I think the relevant comparison is the current figure here: https://docs.exoplanet.codes/en/latest/tutorials/data-and-models/#orbital-conventions

I would imagine that this should replace or complement the existing one?

iancze commented 3 years ago

Looks nice! The original figure is an SVG file I created using shapes in Inkscape, and, as #212 revealed, could certainly be improved/replaced.

After making that figure, I came to the conclusion that it's very hard to make a fully accurate orbital conventions diagram by hand, and doubly hard to ensure that the diagram actually matches what the source code does!

Is yours done by hand, or are you creating the shapes programatically and from the relevant geometric relationships? Though it's certainly more work up front, I think writing source code to generate this type of figure from exoplanet routines directly is the only way to make sure that the orbital conventions diagram is provably correct relative to the package.