Commit 1a53a9f5ae995d964927caed710ec03b4ec05831

Authored by Jürgen Knödlseder
1 parent e6b2bde1

Switch back to /= operator for testing

Showing 1 changed file with 10 additions and 10 deletions
scripts/csresmap.py
@@ -291,21 +291,21 @@ class csresmap(gammalib.GApplication): @@ -291,21 +291,21 @@ class csresmap(gammalib.GApplication):
291 291
292 # Subtract and divide by model map 292 # Subtract and divide by model map
293 self.resmap -= modelmap 293 self.resmap -= modelmap
294 - #self.resmap /= modelmap # Python 3.x does not like this !!!  
295 - for pixel in modelmap:  
296 - if pixel != 0.0:  
297 - pixel = 1.0/pixel  
298 - self.resmap *= modelmap 294 + self.resmap /= modelmap # Python 3.x does not like this !!!
  295 + #for pixel in modelmap:
  296 + # if pixel != 0.0:
  297 + # pixel = 1.0/pixel
  298 + #self.resmap *= modelmap
299 299
300 elif self.m_algorithm == "SUBDIVSQRT": 300 elif self.m_algorithm == "SUBDIVSQRT":
301 301
302 # subtract and divide by sqrt of model map 302 # subtract and divide by sqrt of model map
303 self.resmap -= modelmap 303 self.resmap -= modelmap
304 - #self.resmap /= modelmap.sqrt() # Python 3.x does not like this !!!  
305 - for pixel in modelmap:  
306 - if pixel != 0.0:  
307 - pixel = 1.0/math.sqrt(pixel)  
308 - self.resmap *= modelmap 304 + self.resmap /= modelmap.sqrt() # Python 3.x does not like this !!!
  305 + #for pixel in modelmap:
  306 + # if pixel != 0.0:
  307 + # pixel = 1.0/math.sqrt(pixel)
  308 + #self.resmap *= modelmap
309 309
310 else: 310 else:
311 311