Commit 150645a562285e1212e4916ea38d8a1dbdb877cb

Authored by Jürgen Knödlseder
2 parents 8f8aa917 a9bf64c1

Merge branch 'integration' into devel

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 3 * Version 0.10.0 released
4 4 =========================
5 5  
  6 + Check existence of ROI in ctbin (#1476)
6 7 Allocate optimizer in ctlike upon construction (#1471)
7 8 Move cscripts into the ctools Python module (#1470)
8 9  
... ...
... ... @@ -2,7 +2,7 @@ New Features and Important Changes in ctools 0.10.0
2 2  
3 3 Author(s) : Juergen Knoedlseder
4 4  
5   -5 June 2015
  5 +9 June 2015
6 6  
7 7  
8 8 1. Introduction
... ... @@ -40,7 +40,8 @@ None
40 40  
41 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 47 8. ctlike - Maximum likelihood fitting
... ...
src/ctbin/ctbin.cpp
... ... @@ -455,6 +455,15 @@ void ctbin::fill_cube(GCTAObservation* obs)
455 455 // Get the RoI
456 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 467 // Initialise binning statistics
459 468 int num_outside_roi = 0;
460 469 int num_outside_map = 0;
... ...