Commit 299899f4adcac6f012c5494ac801411593d3eb09
1 parent
22240156
Set empty energy boundaries in case that all energies are excluded.
Showing
1 changed file
with
3 additions
and
1 deletions
src/ctselect/ctselect.cpp
| ... | ... | @@ -1006,7 +1006,9 @@ GEbounds ctselect::set_ebounds(GCTAObservation* obs, const GEbounds& ebounds) co |
| 1006 | 1006 | |
| 1007 | 1007 | // Set selection energy boundaries |
| 1008 | 1008 | GEbounds result; |
| 1009 | - result.append(GEnergy(emin, "TeV"), GEnergy(emax, "TeV")); | |
| 1009 | + if (emax > emin) { | |
| 1010 | + result.append(GEnergy(emin, "TeV"), GEnergy(emax, "TeV")); | |
| 1011 | + } | |
| 1010 | 1012 | |
| 1011 | 1013 | // Return result |
| 1012 | 1014 | return result; | ... | ... |