def test_true_rightascension_J2000(t1, t2): # Validate against JPL HORIZONS output # https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&TABLE_TYPE=OBSERVER&COMMAND=10&CENTER=500&QUANTITIES=1&ANG_FORMAT=HMS&EXTRA_PREC=YES&TIME_TYPE=TT&TLIST=2448908.5%0A2456460.5 assert_quantity_allclose(sun.true_rightascension(t1, equinox_of_date=False), Angle('13h13m53.65s'), atol=Angle('0h0m0.005s')) assert_quantity_allclose(sun.true_rightascension(t2, equinox_of_date=False), Angle('05h41m40.32s'), atol=Angle('0h0m0.005s'))
def test_true_rightascension(): # Regression-only test assert_quantity_allclose(sun.true_rightascension("2012/11/11"), 226.548*u.deg, atol=1e-3*u.deg) with pytest.warns(ErfaWarning): assert_quantity_allclose(sun.true_rightascension( "2142/02/03"), 316.466*u.deg, atol=1e-3*u.deg) assert_quantity_allclose(sun.true_rightascension("2013/12/11"), 258.150*u.deg, atol=1e-3*u.deg)