From bf02fb089c43d33808baef99d2b88c7470557a7e Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Thu, 22 Nov 2018 15:39:48 +0100 Subject: [PATCH] Use counts cube in background cube generation in obsutils.sim() function (#2706) --- cscripts/obsutils.py | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/cscripts/obsutils.py b/cscripts/obsutils.py index 270d8f5..f775403 100755 --- a/cscripts/obsutils.py +++ b/cscripts/obsutils.py @@ -181,6 +181,10 @@ def sim(obs, log=False, debug=False, chatter=2, edisp=False, seed=0, # cubes and append them to the observation if len(obssim.obs()) > 1: + # Get counts cube. The counts cube is needed to obtained a + # proper background cube. + cntcube = binning.cube() + # Get stacked response (use pointing for map centre) response = get_stacked_response(obssim.obs(), None, None, binsz=binsz, nxpix=npix, nypix=npix, @@ -188,6 +192,7 @@ def sim(obs, log=False, debug=False, chatter=2, edisp=False, seed=0, edisp=edisp, coordsys=coord, proj=proj, addbounds=addbounds, + cntcube=cntcube, log=log, debug=debug, chatter=chatter) -- libgit2 0.21.4