Ejemplo n.º 1
0
def test_jds_to_mjds_array(s12):
    s, jd1, jd2 = s12
    i, f = jds_to_mjds(jd1, jd2)
    assert np.shape(f) == s
    assert np.shape(i) == s
    for jd1_i, jd2_i, i_i, f_i in np.nditer([jd1, jd2, i, f]):
        assert i_i, f_i == jds_to_mjds(jd1_i, jd2_i)
Ejemplo n.º 2
0
def test_mjd_jd_round_trip(dec, i_f):
    assert_closer_than_ns(jds_to_mjds(*mjds_to_jds(*i_f)), i_f, 1)
Ejemplo n.º 3
0
def test_mjd_jd_round_trip(i_f):
    with decimal.localcontext(decimal.Context(prec=40)):
        assert_closer_than_ns(jds_to_mjds(*mjds_to_jds(*i_f)), i_f, 1)