rodluger / planetplanet

A general photodynamical code for exoplanet light curves
https://rodluger.github.io/planetplanet
GNU General Public License v3.0
45 stars 1 forks source link

Bug in coordinate system #39

Closed rodluger closed 7 years ago

rodluger commented 7 years ago

The coordinate system I'm using is a bit wonky. I had been assuming that the x and y axes were on the plane of the sky and the z axis pointed away from the observer. My convention has been to have the x axis point to the right and the y axis point up, but I realized yesterday that this is a left-handed coordinate system.

I think that REBOUND assumes the z axis points toward the observer, the x axis points to the right, and the y axis points up on the sky. That's a right-handed coordinate system.

In all my calculations and plots so far, I've assumed occultations occur when z_occultor < z_occulted -- in other words, the z axis points away from the observer. This is useful and convenient for plotting the orbits as seen from above, but it's not what's actually happening in REBOUND. Effectively, I have the occultor and occulted backwards.

This has no net effect on the statistics of the PPOs, and I'm trying to convince myself it doesn't matter for specific events, either. My coordinate system is internally consistent -- transits occur at the time of transit (as opposed to at the time of eclipse), and orbits are counter-clockwise. I think everything is just effectively upside-down, which doesn't matter because up and down will be degenerate anyways in these observations.

Anyways, I still haven't wrapped my mind around this and would like to chat about this with you guys...

rodluger commented 7 years ago

We decided to go with the left handed coordinate system.