Skip to content
Discussion options

You must be logged in to vote

Skyfield's usual technique for supporting deflection is to secretly stash the ephemeris that was used to generate a position. It's saved as the ._ephemeris attribute of the Barycentric object. From there, the Barycentric.observe() method saves the ephemeris to the ._ephemeris attribute of the Astrometric position that it returns. Finally, when Astrometric.apparent() is called, it can use the secretly stashed ephemeris object to find out where the Sun and Jupiter and Saturn are.

In your case, ._ephemeris is still its default value of None, so, as you have discovered, deflection doesn't work.

Try loading an ephemeris and telling your barycentric position about it:

eph = load('de421.bsp')
ga…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thunkii
Comment options

Answer selected by thunkii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants