def _setTime(confDict): if confDict["selection"]["timetype"] == "MJD": confDict["selection"]["tmax"] = AstroUtils.time_mjd_to_tt( confDict["selection"]["tmax"]) confDict["selection"]["tmin"] = AstroUtils.time_mjd_to_tt( confDict["selection"]["tmin"]) confDict["selection"]["timetype"] = "TT"
def test_astro_utils_time_mjd_to_tt(self): sec_tolerance = 0.001 tt = AstroUtils.time_mjd_to_tt(58871.45616898) # 506861812.99987227 self.assertEqual(True, abs(506861813 - tt) <= sec_tolerance)