I'm having trouble calculating the position of an object, given its current RA and DEC. I'm trying to use PyEphem to accomplish this task, but the RA and DEC I calculate are not what I expect. It seems to me that if I've set the epoch to ephem.now()
, the calculated RA and DEC should be the same as the initially supplied RA and DEC. Given the nature of my application, I don't know the J2000 coordinates of the source. Could this relate to the deflection/aberration/nutation issue here?
import ephem
body = ephem.FixedBody()
body._epoch = ephem.now()
body._ra = "7:09:07.54"
body._dec = "-49:35:11.1"
body.compute(ephem.now(), epoch=ephem.now())
print("RA: {}, DEC: {}".format(body.ra, body.dec))
# RA: 7:09:06.12, DEC: -49:35:32.6
print("_RA: {}, _DEC: {}".format(body._ra, body._dec))
# _RA: 7:09:07.54, _DEC: -49:35:11.1