From 28b19876086cd5b23831a2ff21868e07802f571f Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Mon, 20 Jun 2016 22:48:51 +0200 Subject: [PATCH] Adapt to new GammaLib interface. --- cscripts/csresmap.py | 6 +++--- src/ctbin/ctbin.cpp | 2 +- src/ctcubemask/ctcubemask.cpp | 6 +++--- src/ctmodel/ctmodel.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cscripts/csresmap.py b/cscripts/csresmap.py index 98a629e..5e78898 100755 --- a/cscripts/csresmap.py +++ b/cscripts/csresmap.py @@ -228,7 +228,7 @@ class csresmap(ctools.cscript): cta_counts_cube = bin.cube() # Assign GCTAEventCube to skymap - countmap = cta_counts_cube.map() + countmap = cta_counts_cube.counts() # Write header if self._logTerse(): @@ -245,13 +245,13 @@ class csresmap(ctools.cscript): model.run() # Get model map into GSkyMap object - modelmap = model.cube().map().copy() + modelmap = model.cube().counts().copy() # Store counts map as residual map. Note that we need a # special construct here to avoid memory leaks. This seems # to be a SWIG feature as SWIG creates a new object when # calling bin.cube() - #residualmap = bin.cube().map() + #residualmap = bin.cube().counts() self._resmap = countmap.copy() self._resmap.stack_maps() modelmap.stack_maps() diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index cf03319..5465ad1 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -465,7 +465,7 @@ void ctbin::get_parameters(void) GCTAEventCube cube = create_cube(m_obs); // Get the skymap from the cube and initialise all pixels to zero - m_cube = cube.map(); + m_cube = cube.counts(); m_cube = 0.0; // Get energy boundaries diff --git a/src/ctcubemask/ctcubemask.cpp b/src/ctcubemask/ctcubemask.cpp index 4b0af3b..85d7658 100644 --- a/src/ctcubemask/ctcubemask.cpp +++ b/src/ctcubemask/ctcubemask.cpp @@ -383,7 +383,7 @@ void ctcubemask::publish(const std::string& name) } // Publish counts cube - cube->map().publish(user_name); + cube->counts().publish(user_name); } } @@ -492,7 +492,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs) if (cube != NULL) { // Extract event cube and energy boundaries - GSkyMap map = cube->map(); + GSkyMap map = cube->counts(); const GEbounds& ebounds = cube->ebounds(); // If no energy selection is required set energy boundaries to cube boundaries @@ -625,7 +625,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs) } // Put back map into the event cube - cube->map(map); + cube->counts(map); } // endif: observation contained an event cube diff --git a/src/ctmodel/ctmodel.cpp b/src/ctmodel/ctmodel.cpp index 45a7445..c5c14cc 100644 --- a/src/ctmodel/ctmodel.cpp +++ b/src/ctmodel/ctmodel.cpp @@ -395,7 +395,7 @@ void ctmodel::publish(const std::string& name) } // Publish model cube - m_cube.map().publish(user_name); + m_cube.counts().publish(user_name); // Return return; -- libgit2 0.21.4