Esempio n. 1
0
def test_kepler_2d_inverse():
    t = 23
    p = kepler.Kepler2DParameters(a=2, pb=3, eps1=0.2, eps2=0.1, t0=t - 1)
    xyv, _ = kepler.kepler_2d(p, t)
    m = kepler.mass(p.a, p.pb)
    p2 = kepler.inverse_kepler_2d(xyv, m, t)

    assert_allclose(p, p2, atol=1e-8)
Esempio n. 2
0
def test_kepler_2d_inverse():
    t = 23
    p = kepler.Kepler2DParameters(a=2, pb=3, eps1=0.2, eps2=0.1, t0=t-1)
    xyv, _ = kepler.kepler_2d(p,t)
    m = kepler.mass(p.a, p.pb)
    p2 = kepler.inverse_kepler_2d(xyv, m, t)

    assert_allclose(p,p2,atol=1e-8)
Esempio n. 3
0
def test_kepler_2d_t0_pb():
    p = kepler.Kepler2DParameters(a=2, pb=3, eps1=0.1, eps2=0.2, t0=1)
    xyv, _ = kepler.kepler_2d(p, p.t0 + p.pb)
    assert xyv[0] > 0
    assert_allclose(xyv[1], 0, atol=1e-8)
Esempio n. 4
0
def test_kepler_2d_t0_pb():
    p = kepler.Kepler2DParameters(a=2, pb=3, eps1=0.1, eps2=0.2, t0=1)
    xyv, _ = kepler.kepler_2d(p, p.t0+p.pb)
    assert xyv[0]>0
    assert_allclose(xyv[1], 0, atol=1e-8)