示例#1
0
 def test_phase_exposure1(self):
     start_time = 0
     stop_time = 1
     period = 1
     nbin = 16
     expo = phase_exposure(start_time, stop_time, period, nbin)
     np.testing.assert_array_almost_equal(expo, np.ones(nbin))
示例#2
0
 def test_phase_exposure4(self):
     start_time = 0
     stop_time = 1
     gtis = np.array([[-0.2, 1.2]])
     period = 1
     nbin = 16
     expo = phase_exposure(start_time, stop_time, period, nbin, gtis=gtis)
     expected = np.ones(nbin)
     np.testing.assert_array_almost_equal(expo, expected)
示例#3
0
 def test_phase_exposure2(self):
     start_time = 0
     stop_time = 0.5
     period = 1
     nbin = 16
     expo = phase_exposure(start_time, stop_time, period, nbin)
     expected = np.ones(nbin)
     expected[nbin // 2:] = 0
     np.testing.assert_array_almost_equal(expo, expected)
示例#4
0
 def test_phase_exposure3(self):
     start_time = 0
     stop_time = 1
     gtis = np.array([[0, 0.5]])
     period = 1
     nbin = 16
     expo = phase_exposure(start_time, stop_time, period, nbin, gtis=gtis)
     expected = np.ones(nbin)
     expected[nbin // 2:] = 0
     np.testing.assert_array_almost_equal(expo, expected)