Commit cf3f1ec986c73bf96eb9102a09f3d4e71ce5654b
Merge branch 'devel' into 2714-joint-binned
Showing
1 changed file
with
15 additions
and
15 deletions
src/ctselect/ctselect.cpp
| ... | ... | @@ -1118,7 +1118,7 @@ void ctselect::select_events(GCTAObservation* obs, |
| 1118 | 1118 | * returned: |
| 1119 | 1119 | * |
| 1120 | 1120 | * NONE: [max(emin,emin_exist),min(emax,emax_exist)] |
| 1121 | - * DEFAULT: [max(emin,emin_exist,emin_save),min(emax,emax_exist,emax_save)] | |
| 1121 | + * DEFAULT: [max(emin,emin_exist,emin_safe),min(emax,emax_exist,emax_safe)] | |
| 1122 | 1122 | * USER: [max(emin,emin_exist,emin_user),min(emax,emax_exist,emax_user)] |
| 1123 | 1123 | * |
| 1124 | 1124 | * where |
| ... | ... | @@ -1127,8 +1127,8 @@ void ctselect::select_events(GCTAObservation* obs, |
| 1127 | 1127 | * emax is the value of the emax parameter |
| 1128 | 1128 | * emin_exist is the value of any existing minimum boundary |
| 1129 | 1129 | * emax_exist is the value of any existing maximum boundary |
| 1130 | - * emin_save is the lower save threshold | |
| 1131 | - * emax_save is the upper save threshold | |
| 1130 | + * emin_safe is the lower safe threshold | |
| 1131 | + * emax_safe is the upper safe threshold | |
| 1132 | 1132 | * emin_user is the lower user threshold |
| 1133 | 1133 | * emax_user is the upper user threshold |
| 1134 | 1134 | * |
| ... | ... | @@ -1157,7 +1157,7 @@ GEbounds ctselect::set_ebounds(GCTAObservation* obs, const GEbounds& ebounds) co |
| 1157 | 1157 | |
| 1158 | 1158 | } // endif: there were already energy boundaries |
| 1159 | 1159 | |
| 1160 | - // Check if default threshold (the one from the IRF, also known as save | |
| 1160 | + // Check if default threshold (the one from the IRF, also known as safe | |
| 1161 | 1161 | // threshold) should be applied |
| 1162 | 1162 | if (m_usethres == "DEFAULT") { |
| 1163 | 1163 | |
| ... | ... | @@ -1171,29 +1171,29 @@ GEbounds ctselect::set_ebounds(GCTAObservation* obs, const GEbounds& ebounds) co |
| 1171 | 1171 | } |
| 1172 | 1172 | |
| 1173 | 1173 | // Retrieve energy range from response information |
| 1174 | - double lo_save_thres = rsp->lo_save_thres(); | |
| 1175 | - double hi_save_thres = rsp->hi_save_thres(); | |
| 1174 | + double lo_safe_thres = rsp->lo_safe_thres(); | |
| 1175 | + double hi_safe_thres = rsp->hi_safe_thres(); | |
| 1176 | 1176 | |
| 1177 | 1177 | // Check threshold information for validity |
| 1178 | - if ((lo_save_thres > 0.0) && | |
| 1179 | - (hi_save_thres > 0.0) && | |
| 1180 | - (lo_save_thres >= hi_save_thres)) { | |
| 1178 | + if ((lo_safe_thres > 0.0) && | |
| 1179 | + (hi_safe_thres > 0.0) && | |
| 1180 | + (lo_safe_thres >= hi_safe_thres)) { | |
| 1181 | 1181 | std::string msg = "IRF \""+obs->name()+"\" contains an invalid " |
| 1182 | - "energy range ["+gammalib::str(lo_save_thres)+","+ | |
| 1183 | - gammalib::str(hi_save_thres)+"] TeV."; | |
| 1182 | + "energy range ["+gammalib::str(lo_safe_thres)+","+ | |
| 1183 | + gammalib::str(hi_safe_thres)+"] TeV."; | |
| 1184 | 1184 | throw GException::invalid_value(G_SET_EBOUNDS, msg); |
| 1185 | 1185 | } |
| 1186 | 1186 | |
| 1187 | 1187 | // Raise minimum energy to lower threshold (if lower threshold exists) |
| 1188 | 1188 | if ((emin == 0.0) || |
| 1189 | - ((lo_save_thres > 0.0) && (emin < lo_save_thres))) { | |
| 1190 | - emin = lo_save_thres; | |
| 1189 | + ((lo_safe_thres > 0.0) && (emin < lo_safe_thres))) { | |
| 1190 | + emin = lo_safe_thres; | |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | 1193 | // Lower maximum energy to upper threshold (if upper threshold exists) |
| 1194 | 1194 | if ((emax == 0.0) || |
| 1195 | - ((hi_save_thres > 0.0) && (emax > hi_save_thres))) { | |
| 1196 | - emax = hi_save_thres; | |
| 1195 | + ((hi_safe_thres > 0.0) && (emax > hi_safe_thres))) { | |
| 1196 | + emax = hi_safe_thres; | |
| 1197 | 1197 | } |
| 1198 | 1198 | |
| 1199 | 1199 | } // endif: usethres was "DEFAULT" | ... | ... |