Beispiel #1
0
 def test_full_circle_vectorized(self):
     seconds = sp.array([[34252672.12, 623421.65], [23464.1, 644656784.56]])
     UT = utils.float2time(seconds)
     seconds2 = utils.time2float(UT)
     self.assertTrue(sp.all(UT == utils.float2time(seconds2)))
     self.assertTrue(sp.allclose(seconds, seconds2))
Beispiel #2
0
 def test_full_circle(self):
     seconds = 451732642.56
     UT = utils.float2time(seconds)
     seconds2 = utils.time2float(UT)
     self.assertEqual(UT, utils.float2time(seconds2))
     self.assertAlmostEqual(seconds, seconds2)
Beispiel #3
0
 def test_near_epoch(self):
     UT = "2000-01-01T00:00:54.51"
     self.assertAlmostEqual(54.51, utils.time2float(UT))
     self.assertEqual(utils.float2time(54.51), UT)
Beispiel #4
0
 def test_full_circle_vectorized(self):
     seconds = sp.array([[34252672.12, 623421.65], [23464.1, 644656784.56]])
     UT = utils.float2time(seconds)
     seconds2 = utils.time2float(UT)
     self.assertTrue(sp.all(UT == utils.float2time(seconds2)))
     self.assertTrue(sp.allclose(seconds, seconds2))
Beispiel #5
0
 def test_full_circle(self):
     seconds = 451732642.56
     UT = utils.float2time(seconds)
     seconds2 = utils.time2float(UT)
     self.assertEqual(UT, utils.float2time(seconds2))
     self.assertAlmostEqual(seconds, seconds2)
Beispiel #6
0
 def test_near_epoch(self):
     UT = "2000-01-01T00:00:54.51"
     self.assertAlmostEqual(54.51, utils.time2float(UT))
     self.assertEqual(utils.float2time(54.51), UT)