Commit d8fcfdf3c98ca08e800d737b9aadbebe1887f7ba

Authored by Jürgen Knödlseder
1 parent fbc4599d

Query energy dispersion cube before background cube

src/support/ctool.cpp
@@ -985,6 +985,10 @@ void ctool::set_obs_response(GCTAObservation* obs) @@ -985,6 +985,10 @@ void ctool::set_obs_response(GCTAObservation* obs)
985 // Get filenames 985 // Get filenames
986 GFilename expcube((*this)["expcube"].filename()); 986 GFilename expcube((*this)["expcube"].filename());
987 GFilename psfcube((*this)["psfcube"].filename()); 987 GFilename psfcube((*this)["psfcube"].filename());
  988 + GFilename edispcube;
  989 + if (query_edisp) {
  990 + edispcube = (*this)["edispcube"].filename();
  991 + }
988 GFilename bkgcube((*this)["bkgcube"].filename()); 992 GFilename bkgcube((*this)["bkgcube"].filename());
989 993
990 // Extract stacked response information if available 994 // Extract stacked response information if available
@@ -1004,9 +1008,6 @@ void ctool::set_obs_response(GCTAObservation* obs) @@ -1004,9 +1008,6 @@ void ctool::set_obs_response(GCTAObservation* obs)
1004 // query it now 1008 // query it now
1005 if (query_edisp) { 1009 if (query_edisp) {
1006 1010
1007 - // Get filename  
1008 - GFilename edispcube((*this)["edispcube"].filename());  
1009 -  
1010 // If filename is valid then use energy dispersion ... 1011 // If filename is valid then use energy dispersion ...
1011 if ((gammalib::toupper(edispcube.url()) != "NONE") && 1012 if ((gammalib::toupper(edispcube.url()) != "NONE") &&
1012 !edispcube.is_empty()) { 1013 !edispcube.is_empty()) {
test/testing.py
@@ -78,7 +78,6 @@ class test(gammalib.GPythonTestSuite): @@ -78,7 +78,6 @@ class test(gammalib.GPythonTestSuite):
78 rc = os.system(cmd+' >/dev/null 2>&1') 78 rc = os.system(cmd+' >/dev/null 2>&1')
79 except: 79 except:
80 rc = -1 80 rc = -1
81 - pass  
82 81
83 # Return return code 82 # Return return code
84 return rc 83 return rc