astropy.coordinates.get_moon(time, location=None, ephemeris=None)[source]#

Deprecated since version 5.3: The get_moon function is deprecated and may be removed in a future version. Use get_body(“moon”) instead.

Get a SkyCoord for the Earth’s Moon as observed from a location on Earth in the GCRS reference system.


Time of observation


Location of observer on the Earth. If none is supplied, taken from time (if not present, a geocentric observer will be assumed).

ephemerisstr, optional

Ephemeris to use. If not given, use the one set with astropy.coordinates.solar_system_ephemeris.set (which is set to ‘builtin’ by default).


GCRS Coordinate for the Moon


The coordinate returned is the apparent position, which is the position of the moon at time t minus the light travel time from the moon to the observing location.

You can either give an explicit ephemeris or use a default, which is normally

a built-in ephemeris that does not require ephemeris files. To change the default to be the JPL ephemeris:

>>> from astropy.coordinates import solar_system_ephemeris
>>> solar_system_ephemeris.set('jpl')  

Use of any JPL ephemeris requires the jplephem package ( If needed, the ephemeris file will be downloaded (and cached).

One can check which bodies are covered by a given ephemeris using:

>>> solar_system_ephemeris.bodies
('earth', 'sun', 'moon', 'mercury', 'venus', 'earth-moon-barycenter', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune')