def test_angle_ops(): sign, idmsf = erfa.a2af(6, -np.pi) assert sign == b'-' assert idmsf.item() == (180, 0, 0, 0) sign, ihmsf = erfa.a2tf(6, np.pi) assert sign == b'+' assert ihmsf.item() == (12, 0, 0, 0) rad = erfa.af2a('-', 180, 0, 0.0) np.testing.assert_allclose(rad, -np.pi) rad = erfa.tf2a('+', 12, 0, 0.0) np.testing.assert_allclose(rad, np.pi) rad = erfa.anp(3. * np.pi) np.testing.assert_allclose(rad, np.pi) rad = erfa.anpm(3. * np.pi) np.testing.assert_allclose(rad, -np.pi) sign, ihmsf = erfa.d2tf(1, -1.5) assert sign == b'-' assert ihmsf.item() == (36, 0, 0, 0) days = erfa.tf2d('+', 3, 0, 0.0) np.testing.assert_allclose(days, 0.125)
# TT date tai1, tai2 = erfa.utctai(utc1, utc2) tt1, tt2 = erfa.taitt(tai1, tai2) # EOPs: polar motion in radians, UT1-UTC in seconds. xp = np.array([50.995e-3 * erfa.DAS2R]) yp = np.array([376.723e-3 * erfa.DAS2R]) dut1 = np.array([155.0675e-3]) ##print('xp, yp', xp, yp) # Corrections to IAU 2000A CIP (radians). dx = 0.269e-3 * erfa.DAS2R dy = -0.274e-3 * erfa.DAS2R # Star ICRS RA,Dec (radians). rc = erfa.tf2a(np.array([[14, 34, 16.81183]])) dc = erfa.af2a(np.array([[-12, 31, 10.3965]])) ##print('rc, dc', rc,dc) # reprd("ICRS, epoch J2000.0:", rc, dc) # Proper motion: RA/Dec derivatives, epoch J2000.0. pr = np.array([math.atan2(-354.45e-3 * erfa.DAS2R, math.cos(dc))]) pd = np.array([595.35e-3 * erfa.DAS2R]) # print('pr, pd: ', pr, pd) # Parallax (arcsec) and recession speed (km/s). px = np.array([164.99e-3]) rv = np.array([0.0]) # ICRS to CIRS (geocentric observer).
# TT date tai1, tai2 = erfa.utctai(utc1, utc2) tt1, tt2 = erfa.taitt(tai1, tai2) # EOPs: polar motion in radians, UT1-UTC in seconds. xp = 50.995e-3 * erfa.DAS2R yp = 376.723e-3 * erfa.DAS2R dut1 = 155.0675e-3 ##print('xp, yp', xp, yp) # Corrections to IAU 2000A CIP (radians). dx = 0.269e-3 * erfa.DAS2R dy = -0.274e-3 * erfa.DAS2R # Star ICRS RA,Dec (radians). rc = erfa.tf2a(14,34,16.81183) dc = erfa.af2a(-12,31,10.3965) ##print('rc, dc', rc,dc) # reprd("ICRS, epoch J2000.0:", rc, dc ) # Proper motion: RA/Dec derivatives, epoch J2000.0. pr = math.atan2(-354.45e-3 * erfa.DAS2R, math.cos(dc)) pd = 595.35e-3 * erfa.DAS2R #print('pr, pd: ', pr, pd) # Parallax (arcsec) and recession speed (km/s). px = 164.99e-3 rv = 0.0 # ICRS to CIRS (geocentric observer).
# TT date tai1, tai2 = erfa.utctai(utc1, utc2) tt1, tt2 = erfa.taitt(tai1, tai2) # EOPs: polar motion in radians, UT1-UTC in seconds. xp = 50.995e-3 * erfa.DAS2R yp = 376.723e-3 * erfa.DAS2R dut1 = 155.0675e-3 ##print('xp, yp', xp, yp) # Corrections to IAU 2000A CIP (radians). dx = 0.269e-3 * erfa.DAS2R dy = -0.274e-3 * erfa.DAS2R # Star ICRS RA,Dec (radians). rc = erfa.tf2a(14, 34, 16.81183) dc = erfa.af2a(-12, 31, 10.3965) ##print('rc, dc', rc,dc) # reprd("ICRS, epoch J2000.0:", rc, dc) # Proper motion: RA/Dec derivatives, epoch J2000.0. pr = math.atan2(-354.45e-3 * erfa.DAS2R, math.cos(dc)) pd = 595.35e-3 * erfa.DAS2R #print('pr, pd: ', pr, pd) # Parallax (arcsec) and recession speed (km/s). px = 164.99e-3 rv = 0.0 # ICRS to CIRS (geocentric observer).