I have been looking at the Moon position from PyEphem and comparing to Horizons. Unless I am doing something really dumb here, the differences in the Astrometric position relative to an observer are quite large.
Attached are difference plots of the RA and DEC Astrometric positions for the Moon from 2022-04-01, 00:00:00 to 05:38:00 UTC. The PyEphem plots are a lot more than 1 arc-second accuracy. AstroPy is bang on, though I am using DE432s.


I also add my PyEphem script below and the Horizons output. In both cases, I have disabled refraction calculations by setting pressure to zero.
Any help appreciated.
Thanks,
Stacy.
#!/usr/bin/python3
from astropy.time import Time
import astropy.units as u
import math
import ephem
from matplotlib import pylab as plt
home = ephem.Observer()
home.lon = ephem.degrees('148.2635192')
home.lat = ephem.degrees('-32.9983897')
home.elevation = 414.666
home.horizon = ephem.degrees('30.25')
home.pressure = 0
tmin = Time("2022-04-01 00:00:00")
moon = ephem.Moon()
for hour in range(0,24):
h = tmin + hour*u.hour
for m in range(0,60):
t = h + m*u.min
home.date = ephem.Date(t.datetime)
moon.compute(home)
if math.degrees(moon.alt) > 30.25:
print("{} {:.3f} {:.3f} {} {}".format(home.date, math.degrees(moon.a_ra), math.degrees(moon.a_dec), math.degrees(float(moon.az)), math.degrees(float(moon.alt))))
I have been looking at the Moon position from PyEphem and comparing to Horizons. Unless I am doing something really dumb here, the differences in the Astrometric position relative to an observer are quite large.
Attached are difference plots of the RA and DEC Astrometric positions for the Moon from 2022-04-01, 00:00:00 to 05:38:00 UTC. The PyEphem plots are a lot more than 1 arc-second accuracy. AstroPy is bang on, though I am using DE432s.
I also add my PyEphem script below and the Horizons output. In both cases, I have disabled refraction calculations by setting pressure to zero.
Any help appreciated.
Thanks,
Stacy.