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)
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)
def test_estimate1(self): wgt = utils.get_instmap_weights() emap = wgt.estimate_expmap(self.arflo, self.arfhi, self.arf) self.assertAlmostEqual(3.9091039, emap)
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)
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)
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)
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)
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)
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)
def test_grid1(self): wgt = utils.get_instmap_weights() self.check_spacing(wgt, self.nbins[1], 0.01, 11.0, 0.01)