コード例 #1
0
ファイル: test_utils.py プロジェクト: AGILESCIENCE/Agilepy
    def test_astro_utils_time_utc_to_tt(self):

        tol = 0.0001

        agileseconds = AstroUtils.time_fits_to_agile_seconds(
            "2020-01-23T10:56:53.000")

        assert abs(506861813 - agileseconds) <= tol
コード例 #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"]