I am trying to get the same coordinate of the Moon as seen from Earth with get_body from Astropy (which supposedly uses GCRS) and Astroquery Horizons setting the Moon as target (id=301) and the Earth as observation point (location=399). But the values do not match. Any idea?
Thanks!
from astroquery.jplhorizons import Horizons
from astropy.coordinates import get_body, EarthLocation, SkyCoord
from astropy.time import Time
from astropy import units as u
time = '2011-11-05T22:14:36'
obstime = Time(time, format='isot', scale='utc')
body = get_body("moon", obstime) # gcrs
RA_body = body.ra.degree
DE_body = body.dec.degree
print("Get_body:", RA_body, DE_body)
obj = Horizons(id=301, location=399, epochs=obstime.jd, id_type=None).vectors()
x_moon = float(obj['x']); y_moon = float(obj['y']); z_moon = float(obj['z'])
rf = SkyCoord(x_moon, y_moon, z_moon, representation_type='cartesian', frame='geocentrictrueecliptic')
rf = rf.transform_to("gcrs")
print("Horizons:", rf.ra.deg, rf.dec.deg)