@pytest.mark.parametrize(u'testframe', totest_frames)
def test_cirs_altaz_moonish(testframe):
 moon = CIRS(MOONDIST_CART, obstime=testframe.obstime)
 moonaa = moon.transform_to(testframe)
 assert ((1000 * u.km) < np.abs((moonaa.distance - moon.distance)).to(u.km) < (7000 * u.km))
 moon2 = moonaa.transform_to(moon)
 assert_allclose(moon.cartesian.xyz, moon2.cartesian.xyz)

@ pytest . mark . parametrize ( u'testframe' , totest_frames ) def test_cirs_altaz_moonish ( testframe ) : moon = CIRS ( MOONDIST_CART , obstime = testframe . obstime ) moonaa = moon . transform_to ( testframe ) assert ( ( 1000 * u . km ) < np . abs ( ( moonaa . distance - moon . distance ) ) . to ( u . km ) < ( 7000 * u . km ) ) moon2 = moonaa . transform_to ( moon ) assert_allclose ( moon . cartesian . xyz , moon2 . cartesian . xyz )
sanity-check that an object resembling the moon goes to the right place with a cirs<->altaz transformation .