def test_apparent_declination(): assert_array_almost_equal(sun.apparent_declination("2002/12/22"), -22.964, decimal=0) assert_array_almost_equal(sun.apparent_declination("2003/1/12"), -21.743, decimal=0) assert_array_almost_equal(sun.apparent_declination("2004/02/13"), -13.478, decimal=0) assert_array_almost_equal(sun.apparent_declination("2005/12/3"), -22.152, decimal=0) assert_array_almost_equal(sun.apparent_declination("2013/02/26"), -8.547, decimal=0) assert_array_almost_equal(sun.apparent_declination("2014/05/1"), 15.141, decimal=0)
def test_apparent_declination(): assert_array_almost_equal(sun.apparent_declination("2002/12/22"), -22.964 * u.deg, decimal=0) assert_array_almost_equal(sun.apparent_declination("2003/1/12"), -21.743 * u.deg, decimal=0) assert_array_almost_equal(sun.apparent_declination("2004/02/13"), -13.478 * u.deg, decimal=0) assert_array_almost_equal(sun.apparent_declination("2005/12/3"), -22.152 * u.deg, decimal=0) assert_array_almost_equal(sun.apparent_declination("2013/02/26"), -8.547 * u.deg, decimal=0) assert_array_almost_equal(sun.apparent_declination("2014/05/1"), 15.141 * u.deg, decimal=0)
def test_apparent_declination(): assert_quantity_allclose(sun.apparent_declination("2002/12/22"), -22.964 * u.deg, atol=1 * u.deg) assert_quantity_allclose(sun.apparent_declination("2003/1/12"), -21.743 * u.deg, atol=1 * u.deg) assert_quantity_allclose(sun.apparent_declination("2004/02/13"), -13.478 * u.deg, atol=1 * u.deg) assert_quantity_allclose(sun.apparent_declination("2005/12/3"), -22.152 * u.deg, atol=1 * u.deg) assert_quantity_allclose(sun.apparent_declination("2013/02/26"), -8.547 * u.deg, atol=1 * u.deg) assert_quantity_allclose(sun.apparent_declination("2014/05/1"), 15.141 * u.deg, atol=1 * u.deg)
def test_apparent_declination(): # Validate against a published value from the Astronomical Almanac (1992) t = Time('1992-10-13', scale='tdb') assert_quantity_allclose(sun.apparent_declination(t), Angle('-7d47m01.74s'), atol=0.05*u.arcsec)
def test_apparent_declination_J2000(): # Regression-only test t = Time('1992-10-13', scale='tdb') assert_quantity_allclose(sun.apparent_declination(t, equinox_of_date=False), Angle('-7d49m13.09s'), atol=0.05*u.arcsec)