I am porting some code that uses PyEphem to using Skyfield. Somewhere along the code I use the body's size attribute:

obs              = ephem.Observer()

obs.lon, obs.lat = np.radians(latitude_degrees), np.radians(longitude_degrees)

obs.date         = ephem.date(time)
moon             = ephem.Moon()

I have looked in Skyfield documentation but couldn't find the equivalent to the body size attribute. Does anyone have an idea if there is an equivalent in Skyfield?

  • 1
    $\begingroup$ Please edit your question, it seems cut-off. $\endgroup$
    – user10509
    Commented Nov 15, 2019 at 15:46
  • $\begingroup$ This question seems clear enough to me. I've added a little formatting and dropped the "thank you in advance". $\endgroup$
    – uhoh
    Commented Nov 16, 2019 at 0:53

1 Answer 1


As far as I know, Skyfield itself doesn't contain any tabulated data on astronomical bodies itself. Instead, it allows you to draw data from other sources.

  • for motion, you select a NASA JPL ephemeris yourself and Skyfield downloads and interpolates the positions and velocities
  • for Earth artificial satellite motion Skyfield downloads TLEs or lets you type them in and uses the standard SGP4 algorithm to propagate them
  • for the 3D positions of Topos relative to Earth's center of mass Skyfield uses the standard WGS84 model, or what some people call "GPS coordinates".
  • for star position Skyfield downloads from a catalog

As far as I know, Skyfield proper doesn't have any masses or periods or orbital elements anywhere inside it, though the standard SGP4 that is imported during installation has a few internal fixed parameters to model Earth's gravity field.

For geometrical things like object size and shape you have to do that yourself in your own script. Skyfield only deals with the centers of mass of objects.

So for example in this answer I don't try to calculate 1st, 2nd, 3rd and 4th contact because I'd have to look up the radius of Mercury. I do use an approximate value for the radius of the Sun, but I had to look that up in Wikipedia, where there are two different values listed!

That nicely illustrates the problem that Skyfield avoids.

In order to calculate atmospheric refraction when observing from Earth's surface, I think there must be a few parameters used in the model.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.