def test_cirs_itrs():
 (ra, dec, _) = randomly_sample_sphere(200)
 cirs = CIRS(ra=ra, dec=dec, obstime=u'J2000')
 cirs6 = CIRS(ra=ra, dec=dec, obstime=u'J2006')
 cirs2 = cirs.transform_to(ITRS).transform_to(cirs)
 cirs6_2 = cirs6.transform_to(ITRS).transform_to(cirs)
 assert_allclose(cirs.ra, cirs2.ra)
 assert_allclose(cirs.dec, cirs2.dec)
 assert (not allclose(cirs.ra, cirs6_2.ra))
 assert (not allclose(cirs.dec, cirs6_2.dec))

def test_cirs_itrs ( ) : ( ra , dec , _ ) = randomly_sample_sphere ( 200 ) cirs = CIRS ( ra = ra , dec = dec , obstime = u'J2000' ) cirs6 = CIRS ( ra = ra , dec = dec , obstime = u'J2006' ) cirs2 = cirs . transform_to ( ITRS ) . transform_to ( cirs ) cirs6_2 = cirs6 . transform_to ( ITRS ) . transform_to ( cirs ) assert_allclose ( cirs . ra , cirs2 . ra ) assert_allclose ( cirs . dec , cirs2 . dec ) assert ( not allclose ( cirs . ra , cirs6_2 . ra ) ) assert ( not allclose ( cirs . dec , cirs6_2 . dec ) )
check basic cirs<->itrs transforms for round-tripping .