In this answer @DavidHammen showed me how to get coordinates from JPL's Horizons using the Earth's equatorial plane as a reference plane by selecting
reference plane: Earth mean equator and equinox of reference epoch
reference system: ICRF/J2000.0
What I would like to do is take positions in that frame from Horizons that I have in a python script and quickly make an approximate projection of the location of one item on the celestial sphere as seen from another. I know this is an option from within Horizons, but I want to do this using existing data, and I don't need the absolute highest accuracy.
Question: If I have a vector x, y, z that is drawn from the observer to the observed, can I get RA and Dec to say a few arcminutes of accuracy with the simple equations:
$$RA = \arctan2(y, x) $$
$$Dec = \arctan2(z, (x^2 + y^2)^{1/2}) $$
Implicit in this is the idea that the $\hat{\mathbf{x}}$ axis points in the direction of $RA, Dec = 0, 0$, and I'm ignoring light time issues, aberration, and motion of the Earth's axis since J2000.0
UPDATE:
I've given this a try and there is a small difference between the calculated RA/Dec based on subtraction of state vectors, and the astrometric position seen from the Geocenter. But there is a huge difference between those and the apparent positions, tenths of a degree!
This is much larger than I expected, and I don't know why!
All data is for January 1, 2018, 00:00 UTC.
I've compared the results of applying those equations to the state vectors from Horizons, then also displayed astrometric (ICRF J2000.0) and apparent positions as viewed from the Geocenter taken from Horizons in Observer Mode.
I've chosen bodies as close as the Moon and as far as the Voyagers, and used Body centers rather than barycenters.
astrometric Equation apparent astrometric Equation apparent
--------- --------- --------- --------- ---------- ---------
Voygr 1 258.25159 258.25184 258.45314 11.97035 11.97037 11.95155
Voygr 2 300.65126 300.6518 300.99952 -57.29555 -57.29610 -57.24509
Nw Horiz 286.63319 286.63353 286.89020 -20.64794 -20.6479 -20.61809
Pluto 290.00861 290.00968 290.26684 -21.70644 -21.70662 -21.67124
Neptune 343.43280 343.43376 343.66156 -8.03381 -8.03345 -7.93949
Uranus 22.73512 22.73629 22.97047 8.8979 8.89837 8.98873
Saturn 271.24249 271.24428 271.50497 -22.53535 -22.5354 -22.53099
Jupiter 224.53584 224.53805 224.78021 -15.8163 -15.81697 -15.88433
Mars 221.74196 221.74522 221.98477 -15.15716 -15.15828 -15.22858
Venus 279.04685 279.05300 279.31079 -23.64835 -23.64834 -23.63092
Sun 281.16631 281.16543 281.42877 -23.04004 -23.04010 -23.01910
Moon 84.2338 84.22705 84.50195 19.31174 19.31069 19.31952
0.27*cos(dec)
degrees. $\endgroup$*
next to the "Apparent RA & Dec". On ssd.jpl.nasa.gov/horizons.cgi?s_tset=1#top it notes* affected by optional atmospheric refraction setting (below)
$\endgroup$