def test_calc_bkg(self): ag = AGAnalysis(self.agilepyconfPath, self.sourcesconfPathcalcBkg) ag.setOptions(tmin=456461778.0, tmax=456537945.0, timetype="TT", galcoeff=[-1, -1, -1, -1], isocoeff=[10, 12, 10, 12]) """ galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', galcoeff=[-1,-1,-1,-1], pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', galcoeff=[0,0,0,0], pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) """ galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', galcoeff=[0.8, 0.6, 0.8, 0.6], pastTimeWindow=0) print("\ngalBkg:", galBkg) print("isoBkg:", isoBkg) ag.destroy()
def test_calc_bkg(self): test_out_dir = self.set_outputfolder("test_calc_bkg") ag = AGAnalysis(self.agilepyConf, self.sourcesConfTxt) ag.setOptions( timetype="TT", galcoeff=[-1, -1, -1, -1], isocoeff=[10, 12, 10, 12] ) """ galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', galcoeff=[-1,-1,-1,-1], pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) galBkg, isoBkg, maplistfile = ag.calcBkg('CYGX3', galcoeff=[0,0,0,0], pastTimeWindow=0) print("\ngalBkg:",galBkg) print("isoBkg:",isoBkg) """ galCoeff, isoCoeff, maplistfile = ag.calcBkg(self.VELA, galcoeff=[0.8, 0.6, 0.8, 0.6], pastTimeWindow=0) self.assertEqual([10, 12, 10, 12], isoCoeff) self.assertEqual([0.8, 0.6, 0.8, 0.6], galCoeff) ag.destroy()