Commit 150645a562285e1212e4916ea38d8a1dbdb877cb
Merge branch 'integration' into devel
Showing
3 changed files
with
14 additions
and
3 deletions
ChangeLog
| 1 | -2015-06-05 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> | 1 | +2015-06-09 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> |
| 2 | 2 | ||
| 3 | * Version 0.10.0 released | 3 | * Version 0.10.0 released |
| 4 | ========================= | 4 | ========================= |
| 5 | 5 | ||
| 6 | + Check existence of ROI in ctbin (#1476) | ||
| 6 | Allocate optimizer in ctlike upon construction (#1471) | 7 | Allocate optimizer in ctlike upon construction (#1471) |
| 7 | Move cscripts into the ctools Python module (#1470) | 8 | Move cscripts into the ctools Python module (#1470) |
| 8 | 9 |
NEWS
| @@ -2,7 +2,7 @@ New Features and Important Changes in ctools 0.10.0 | @@ -2,7 +2,7 @@ New Features and Important Changes in ctools 0.10.0 | ||
| 2 | 2 | ||
| 3 | Author(s) : Juergen Knoedlseder | 3 | Author(s) : Juergen Knoedlseder |
| 4 | 4 | ||
| 5 | -5 June 2015 | 5 | +9 June 2015 |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | 1. Introduction | 8 | 1. Introduction |
| @@ -40,7 +40,8 @@ None | @@ -40,7 +40,8 @@ None | ||
| 40 | 40 | ||
| 41 | 7. ctbin - CTA event binning | 41 | 7. ctbin - CTA event binning |
| 42 | ---------------------------- | 42 | ---------------------------- |
| 43 | -None | 43 | +ctbin now verifies if an ROI has been set properly, and throws an exception in |
| 44 | +case that no ROI information could be found. | ||
| 44 | 45 | ||
| 45 | 46 | ||
| 46 | 8. ctlike - Maximum likelihood fitting | 47 | 8. ctlike - Maximum likelihood fitting |
src/ctbin/ctbin.cpp
| @@ -455,6 +455,15 @@ void ctbin::fill_cube(GCTAObservation* obs) | @@ -455,6 +455,15 @@ void ctbin::fill_cube(GCTAObservation* obs) | ||
| 455 | // Get the RoI | 455 | // Get the RoI |
| 456 | const GCTARoi& roi = events->roi(); | 456 | const GCTARoi& roi = events->roi(); |
| 457 | 457 | ||
| 458 | + // Check for RoI sanity | ||
| 459 | + if (!roi.is_valid()) { | ||
| 460 | + std::string msg = "No RoI information found in input observation " | ||
| 461 | + "\""+obs->name()+"\". Run ctselect to specify " | ||
| 462 | + "an RoI for this observation before running " | ||
| 463 | + "ctbin."; | ||
| 464 | + throw GException::invalid_value(G_FILL_CUBE, msg); | ||
| 465 | + } | ||
| 466 | + | ||
| 458 | // Initialise binning statistics | 467 | // Initialise binning statistics |
| 459 | int num_outside_roi = 0; | 468 | int num_outside_roi = 0; |
| 460 | int num_outside_map = 0; | 469 | int num_outside_map = 0; |