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: