def test_against_jpl_horizons():
 obstime = Time(u'1998-07-28 03:00')
 location = EarthLocation(lon=Angle(u'248.405300d'), lat=Angle(u'31.9585d'), height=(2.06 * u.km))
 altaz_frame = AltAz(obstime=obstime, location=location)
 altaz = SkyCoord(u'143.2970d 2.6223d', frame=altaz_frame)
 radec_actual = altaz.transform_to(u'icrs')
 radec_expected = SkyCoord(u'19h24m55.01s -40d56m28.9s', frame=u'icrs')
 distance = radec_actual.separation(radec_expected).to(u'arcsec')
 assert (distance < (1 * u.arcsec))

def test_against_jpl_horizons ( ) : obstime = Time ( u'1998-07-28 03:00' ) location = EarthLocation ( lon = Angle ( u'248.405300d' ) , lat = Angle ( u'31.9585d' ) , height = ( 2.06 * u . km ) ) altaz_frame = AltAz ( obstime = obstime , location = location ) altaz = SkyCoord ( u'143.2970d 2.6223d' , frame = altaz_frame ) radec_actual = altaz . transform_to ( u'icrs' ) radec_expected = SkyCoord ( u'19h24m55.01s -40d56m28.9s' , frame = u'icrs' ) distance = radec_actual . separation ( radec_expected ) . to ( u'arcsec' ) assert ( distance < ( 1 * u . arcsec ) )
check that astropy gives consistent results with the jpl horizons example .