Commit 28b19876086cd5b23831a2ff21868e07802f571f

Authored by Jürgen Knödlseder
1 parent 739a7cc5

Adapt to new GammaLib interface.

The GCTAEventCube::map() method has been renamed to GCTAEventCube::counts() (#1789)
cscripts/csresmap.py
... ... @@ -228,7 +228,7 @@ class csresmap(ctools.cscript):
228 228 cta_counts_cube = bin.cube()
229 229  
230 230 # Assign GCTAEventCube to skymap
231   - countmap = cta_counts_cube.map()
  231 + countmap = cta_counts_cube.counts()
232 232  
233 233 # Write header
234 234 if self._logTerse():
... ... @@ -245,13 +245,13 @@ class csresmap(ctools.cscript):
245 245 model.run()
246 246  
247 247 # Get model map into GSkyMap object
248   - modelmap = model.cube().map().copy()
  248 + modelmap = model.cube().counts().copy()
249 249  
250 250 # Store counts map as residual map. Note that we need a
251 251 # special construct here to avoid memory leaks. This seems
252 252 # to be a SWIG feature as SWIG creates a new object when
253 253 # calling bin.cube()
254   - #residualmap = bin.cube().map()
  254 + #residualmap = bin.cube().counts()
255 255 self._resmap = countmap.copy()
256 256 self._resmap.stack_maps()
257 257 modelmap.stack_maps()
... ...
src/ctbin/ctbin.cpp
... ... @@ -465,7 +465,7 @@ void ctbin::get_parameters(void)
465 465 GCTAEventCube cube = create_cube(m_obs);
466 466  
467 467 // Get the skymap from the cube and initialise all pixels to zero
468   - m_cube = cube.map();
  468 + m_cube = cube.counts();
469 469 m_cube = 0.0;
470 470  
471 471 // Get energy boundaries
... ...
src/ctcubemask/ctcubemask.cpp
... ... @@ -383,7 +383,7 @@ void ctcubemask::publish(const std::string& name)
383 383 }
384 384  
385 385 // Publish counts cube
386   - cube->map().publish(user_name);
  386 + cube->counts().publish(user_name);
387 387  
388 388 }
389 389 }
... ... @@ -492,7 +492,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs)
492 492 if (cube != NULL) {
493 493  
494 494 // Extract event cube and energy boundaries
495   - GSkyMap map = cube->map();
  495 + GSkyMap map = cube->counts();
496 496 const GEbounds& ebounds = cube->ebounds();
497 497  
498 498 // If no energy selection is required set energy boundaries to cube boundaries
... ... @@ -625,7 +625,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs)
625 625 }
626 626  
627 627 // Put back map into the event cube
628   - cube->map(map);
  628 + cube->counts(map);
629 629  
630 630 } // endif: observation contained an event cube
631 631  
... ...
src/ctmodel/ctmodel.cpp
... ... @@ -395,7 +395,7 @@ void ctmodel::publish(const std::string& name)
395 395 }
396 396  
397 397 // Publish model cube
398   - m_cube.map().publish(user_name);
  398 + m_cube.counts().publish(user_name);
399 399  
400 400 // Return
401 401 return;
... ...