@pytest.mark.parametrize(u'testframe', totest_frames)
def test_icrs_altaz_moonish(testframe):
 (earth_pv_helio, earth_pv_bary) = epv00(*get_jd12(testframe.obstime, u'tdb'))
 earth_icrs_xyz = (earth_pv_bary[0] * u.au)
 moonoffset = ([0, 0, MOONDIST.value] * MOONDIST.unit)
 moonish_icrs = ICRS(CartesianRepresentation((earth_icrs_xyz + moonoffset)))
 moonaa = moonish_icrs.transform_to(testframe)
 assert ((1000 * u.km) < np.abs((moonaa.distance - MOONDIST)).to(u.au) < (7000 * u.km))

@ pytest . mark . parametrize ( u'testframe' , totest_frames ) def test_icrs_altaz_moonish ( testframe ) : ( earth_pv_helio , earth_pv_bary ) = epv00 ( * get_jd12 ( testframe . obstime , u'tdb' ) ) earth_icrs_xyz = ( earth_pv_bary [ 0 ] * u . au ) moonoffset = ( [ 0 , 0 , MOONDIST . value ] * MOONDIST . unit ) moonish_icrs = ICRS ( CartesianRepresentation ( ( earth_icrs_xyz + moonoffset ) ) ) moonaa = moonish_icrs . transform_to ( testframe ) assert ( ( 1000 * u . km ) < np . abs ( ( moonaa . distance - MOONDIST ) ) . to ( u . au ) < ( 7000 * u . km ) )
check that something expressed in *icrs* as being moon-like goes to the right altaz distance .