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