hannorein / rebound

💫 An open-source multi-purpose N-body code.
https://rebound.readthedocs.io/
GNU General Public License v3.0
843 stars 219 forks source link

HORIZONS query #577

Closed AstroEloy closed 2 years ago

AstroEloy commented 2 years ago

Hi! For some reason, it seems that REBOUND has a different performance when querying HORIZONS.

Now it cannot be queried a Julian date with more than 3 decimals (before yes).

By the way, it would be nice to query date from YYYY-MM-DD HH:MM:SS not only YYYY-MM-DD HH:MM, so we can have more accurate ephemerides if needed. Is there a reason why REBOUND does not allow YYYY-MM-DD HH:MM:SS query format?

Thank you!

import rebound

sim = rebound.Simulation()

date = "JD2456666.2139"

sim.add("Sun", date=date)
sim.add('Geocenter', date=date)
hannorein commented 2 years ago

I suspect this is due to the recent changes in the Horizons API. @Findus23 do you have any idea if that is easy to fix?

hannorein commented 2 years ago

This should all be working now! Thanks for pointing this out!

hannorein commented 2 years ago

I think it should work. Did you check the latest version?

AstroEloy commented 2 years ago

Yes sorry, I just checked the first modification. Thank you! :)