From 7534afae9d224f34bcad764f98fc91298285a6f3 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 21 Nov 2018 09:44:46 +0100 Subject: [PATCH] Adapt reference unit test result to modified MC code in GCTABackground3D class --- test/test_csworkflow.py | 6 +++--- test/test_ctobssim.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/test_csworkflow.py b/test/test_csworkflow.py index 1e63866..d6cb141 100755 --- a/test/test_csworkflow.py +++ b/test/test_csworkflow.py @@ -139,10 +139,10 @@ class Test(test): models = gammalib.GModels(filename) # Set reference values - prefactor = 3.62775976898809e-16 + prefactor = 3.63152145731529e-16 index = 2.39100016863397 - pre_background = 1.05367124323594 - index_background = 0.0421705243014668 + pre_background = 1.30910556742873 + index_background = 0.252909973473968 # Check fit result values self.test_value(models['Crab'][2].value(), diff --git a/test/test_ctobssim.py b/test/test_ctobssim.py index 5aab421..2ce1e29 100755 --- a/test/test_ctobssim.py +++ b/test/test_ctobssim.py @@ -86,7 +86,7 @@ class Test(test): # Load counts cube and check content. evt = gammalib.GCTAEventList('ctobssim_cmd1.fits') - self._test_list(evt, 251) + self._test_list(evt, 261) # Setup ctobssim command cmd = ctobssim+' inmodel="model_that_does_not_exist.xml"'+ \ @@ -152,21 +152,21 @@ class Test(test): # Check content of observation self._test_observation(sim) - self._test_list(sim.obs()[0].events(), 251) + self._test_list(sim.obs()[0].events(), 261) # Save events sim.save() # Load counts cube and check content. evt = gammalib.GCTAEventList('ctobssim_py1.fits') - self._test_list(evt, 251) + self._test_list(evt, 261) # Copy ctobssim tool cpy_sim = sim.copy() # Retrieve observation and check content of copy self._test_observation(cpy_sim) - self._test_list(cpy_sim.obs()[0].events(), 251) + self._test_list(cpy_sim.obs()[0].events(), 261) # Execute copy of ctobssim tool again, now with a higher chatter # level than before @@ -179,7 +179,7 @@ class Test(test): # Load counts cube and check content. evt = gammalib.GCTAEventList('ctobssim_py2.fits') - self._test_list(evt, 251) + self._test_list(evt, 261) # Set-up observation container pnts = [{'ra': 83.63, 'dec': 21.01}, @@ -206,8 +206,8 @@ class Test(test): # Retrieve observation and check content self._test_observation(sim, nobs=2, pnts=pnts) - self._test_list(sim.obs()[0].events(), 3626) - self._test_list(sim.obs()[1].events(), 3601) + self._test_list(sim.obs()[0].events(), 3630) + self._test_list(sim.obs()[1].events(), 3594) # Save events sim.save() @@ -216,8 +216,8 @@ class Test(test): obs = gammalib.GObservations('ctobssim_py3.xml') # Retrieve observation and check content - self._test_list(obs[0].events(), 3626) - self._test_list(obs[1].events(), 3601) + self._test_list(obs[0].events(), 3630) + self._test_list(obs[1].events(), 3594) # Return return -- libgit2 0.21.4