Esempio n. 1
0
    def test_astro_utils_time_utc_to_jd(self):

        tol = 0.00000001

        dt = "2020-01-23T10:56:53.000"

        jd = AstroUtils.time_fits_to_jd(dt)

        assert abs(2458871.95616898 - jd) <= tol
Esempio n. 2
0
def test_unix_conversion(input_date, expected):

    assert AstroUtils.time_fits_to_agile_seconds(
        input_date) == expected["agile_seconds"]
    assert AstroUtils.time_fits_to_jd(input_date) == pytest.approx(
        expected["jd"], 0.00001)
    assert AstroUtils.time_fits_to_mjd(input_date) == pytest.approx(
        expected["mjd"], 0.00001)
    assert AstroUtils.time_fits_to_unix(input_date) == expected["unix"]
    assert AstroUtils.time_fits_to_iso(input_date) == expected["iso"]