Ejemplo n.º 1
0
def test_true_declination_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_declination(t1, equinox_of_date=False),
                             Angle('-7d49m20.84s'), atol=0.005*u.arcsec)
    assert_quantity_allclose(sun.true_declination(t2, equinox_of_date=False),
                             Angle('23d22m13.97s'), atol=0.005*u.arcsec)
Ejemplo n.º 2
0
def test_true_declination():
    # Regression-only test
    assert_quantity_allclose(sun.true_declination("2012/11/11"),
                             -17.470 * u.deg,
                             atol=1e-3 * u.deg)
    with pytest.warns(ErfaWarning):
        assert_quantity_allclose(sun.true_declination("2245/12/01"),
                                 -21.717 * u.deg,
                                 atol=1e-3 * u.deg)
    assert_quantity_allclose(sun.true_declination("2014/05/27"),
                             21.245 * u.deg,
                             atol=1e-3 * u.deg)