From 1a53a9f5ae995d964927caed710ec03b4ec05831 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Mon, 27 Oct 2014 10:49:55 +0100 Subject: [PATCH] Switch back to /= operator for testing --- scripts/csresmap.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/csresmap.py b/scripts/csresmap.py index 848cfbb..b4bb983 100755 --- a/scripts/csresmap.py +++ b/scripts/csresmap.py @@ -291,21 +291,21 @@ class csresmap(gammalib.GApplication): # Subtract and divide by model map self.resmap -= modelmap - #self.resmap /= modelmap # Python 3.x does not like this !!! - for pixel in modelmap: - if pixel != 0.0: - pixel = 1.0/pixel - self.resmap *= modelmap + self.resmap /= modelmap # Python 3.x does not like this !!! + #for pixel in modelmap: + # if pixel != 0.0: + # pixel = 1.0/pixel + #self.resmap *= modelmap elif self.m_algorithm == "SUBDIVSQRT": # subtract and divide by sqrt of model map self.resmap -= modelmap - #self.resmap /= modelmap.sqrt() # Python 3.x does not like this !!! - for pixel in modelmap: - if pixel != 0.0: - pixel = 1.0/math.sqrt(pixel) - self.resmap *= modelmap + self.resmap /= modelmap.sqrt() # Python 3.x does not like this !!! + #for pixel in modelmap: + # if pixel != 0.0: + # pixel = 1.0/math.sqrt(pixel) + #self.resmap *= modelmap else: -- libgit2 0.21.4