Esempio n. 1
0
 def test_estimatetst(self):
     wgt = utils.get_instmap_weights('tst')
     emap = wgt.estimate_expmap(self.arflo, self.arfhi,
                                self.arf)
     self.assertAlmostEqual(8.7867857, emap)
Esempio n. 2
0
 def test_estimatetst_flat_erg(self):
     wgt = utils.get_instmap_weights('tst', fluxtype='erg')
     emap = wgt.estimate_expmap(self.arflo, self.arfhi,
                                self.flatarf)
     self.assertAlmostEqual(1697319264.8564615, emap)
Esempio n. 3
0
 def test_estimate1(self):
     wgt = utils.get_instmap_weights()
     emap = wgt.estimate_expmap(self.arflo, self.arfhi,
                                self.arf)
     self.assertAlmostEqual(3.9091039, emap)
Esempio n. 4
0
 def test_estimate1_flat(self):
     wgt = utils.get_instmap_weights()
     emap = wgt.estimate_expmap(self.arflo, self.arfhi,
                                self.flatarf)
     self.assertAlmostEqual(self.flatarf[0], emap)
Esempio n. 5
0
 def test_estimate1_flat_erg(self):
     wgt = utils.get_instmap_weights(fluxtype='erg')
     emap = wgt.estimate_expmap(self.arflo, self.arfhi,
                                self.flatarf)
     self.assertAlmostEqual(1145127079.8190367, emap)
Esempio n. 6
0
 def test_sumtst(self):
     wgt = utils.get_instmap_weights(id="tst").weight
     self.assertAlmostEqual(1.0, wgt.sum())
     self.assertLess(wgt[0], wgt[-1])
     self.assertEqual(self.nbins['tst'], wgt.size)
Esempio n. 7
0
 def test_sum1(self):
     wgt = utils.get_instmap_weights().weight
     self.assertAlmostEqual(1.0, wgt.sum())
     self.assertAlmostEqual(wgt[0], wgt[-1])
     self.assertEqual(self.nbins[1], wgt.size)
Esempio n. 8
0
 def test_gridtst_erg(self):
     wgt = utils.get_instmap_weights('tst', fluxtype='erg')
     self.check_spacing(wgt, self.nbins['tst'], 2.0, 5.0, 0.1)
Esempio n. 9
0
 def test_grid1_erg(self):
     wgt = utils.get_instmap_weights(fluxtype='erg')
     self.check_spacing(wgt, self.nbins[1], 0.01, 11.0, 0.01)
Esempio n. 10
0
 def test_grid1(self):
     wgt = utils.get_instmap_weights()
     self.check_spacing(wgt, self.nbins[1], 0.01, 11.0, 0.01)