Commit 2c2465cd365902433dbc8a4f3f7914fe6485472e
1 parent
deb49172
Correct pickling of GCTAModelSpatialMultiplicative
Showing
2 changed files
with
10 additions
and
4 deletions
inst/cta/pyext/GCTAModelSpatialMultiplicative.i
inst/cta/test/test_CTA.py
| ... | ... | @@ -397,6 +397,7 @@ class Test(gammalib.GPythonTestSuite): |
| 397 | 397 | test_support.pickeling(self, gammalib.GCTAEventCube()) |
| 398 | 398 | test_support.pickeling(self, gammalib.GCTAEventList()) |
| 399 | 399 | test_support.pickeling(self, gammalib.GCTAInstDir()) |
| 400 | + test_support.pickeling(self, gammalib.GCTAModelBackground()) | |
| 400 | 401 | test_support.pickeling(self, gammalib.GCTAModelAeffBackground()) |
| 401 | 402 | test_support.pickeling(self, gammalib.GCTAModelCubeBackground()) |
| 402 | 403 | test_support.pickeling(self, gammalib.GCTAModelIrfBackground()) |
| ... | ... | @@ -404,6 +405,8 @@ class Test(gammalib.GPythonTestSuite): |
| 404 | 405 | test_support.pickeling(self, gammalib.GCTAModelRadialGauss()) |
| 405 | 406 | test_support.pickeling(self, gammalib.GCTAModelRadialPolynom()) |
| 406 | 407 | test_support.pickeling(self, gammalib.GCTAModelRadialProfile()) |
| 408 | + test_support.pickeling(self, gammalib.GCTAModelSpatialGradient()) | |
| 409 | + test_support.pickeling(self, gammalib.GCTAModelSpatialMultiplicative()) | |
| 407 | 410 | test_support.pickeling(self, gammalib.GCTAObservation()) |
| 408 | 411 | test_support.pickeling(self, gammalib.GCTAOnOffObservation()) |
| 409 | 412 | test_support.pickeling(self, gammalib.GCTAPointing()) |
| ... | ... | @@ -467,6 +470,9 @@ class Test(gammalib.GPythonTestSuite): |
| 467 | 470 | obs5 = gammalib.GCTAOnOffObservation(obs1, ptsrc, ebds, ebds, regs, regs) |
| 468 | 471 | radgauss = gammalib.GCTAModelRadialGauss(1.0) |
| 469 | 472 | radacc = gammalib.GCTAModelRadialAcceptance(radgauss, plaw) |
| 473 | + multi = gammalib.GCTAModelSpatialMultiplicative() | |
| 474 | + multi.append(radgauss, 'Src1') | |
| 475 | + multi.append(radgauss, 'Src2') | |
| 470 | 476 | kingname = self._caldb + '/prod1_king.fits' |
| 471 | 477 | hessaeff = self._data + '/irf_hess_aeff.fits.gz' |
| 472 | 478 | hesspsf = self._data + '/irf_hess_psf.fits.gz' |
| ... | ... | @@ -498,6 +504,7 @@ class Test(gammalib.GPythonTestSuite): |
| 498 | 504 | test_support.pickeling(self, gammalib.GCTAEventCube(cube)) |
| 499 | 505 | test_support.pickeling(self, gammalib.GCTAEventList(list)) |
| 500 | 506 | test_support.pickeling(self, gammalib.GCTAInstDir(instdir)) |
| 507 | + test_support.pickeling(self, gammalib.GCTAModelBackground(radgauss,plaw)) | |
| 501 | 508 | test_support.pickeling(self, gammalib.GCTAModelAeffBackground(plaw)) |
| 502 | 509 | test_support.pickeling(self, gammalib.GCTAModelCubeBackground(plaw)) |
| 503 | 510 | test_support.pickeling(self, gammalib.GCTAModelIrfBackground(plaw)) |
| ... | ... | @@ -505,6 +512,8 @@ class Test(gammalib.GPythonTestSuite): |
| 505 | 512 | test_support.pickeling(self, gammalib.GCTAModelRadialGauss(1.0)) |
| 506 | 513 | test_support.pickeling(self, gammalib.GCTAModelRadialPolynom([1.0,2.0])) |
| 507 | 514 | test_support.pickeling(self, gammalib.GCTAModelRadialProfile(1.0,2.0,3.0)) |
| 515 | + test_support.pickeling(self, gammalib.GCTAModelSpatialGradient(1.0,2.0)) | |
| 516 | + test_support.pickeling(self, gammalib.GCTAModelSpatialMultiplicative(multi)) | |
| 508 | 517 | test_support.pickeling(self, gammalib.GCTAObservation(obs1)) |
| 509 | 518 | test_support.pickeling(self, gammalib.GCTAObservation(obs2)) |
| 510 | 519 | test_support.pickeling(self, gammalib.GCTAObservation(obs3)) | ... | ... |