Commit de1feffadfbb38f5b3cb720c4e0886c10fbdab58
1 parent
fc1afa2f
Code revision before merging
Showing
1 changed file
with
4 additions
and
6 deletions
src/ctselect/ctselect.cpp
| @@ -543,12 +543,10 @@ void ctselect::select_events(GCTAObservation* obs, const std::string& filename) | @@ -543,12 +543,10 @@ void ctselect::select_events(GCTAObservation* obs, const std::string& filename) | ||
| 543 | // Make time selection | 543 | // Make time selection |
| 544 | if (select_time) { | 544 | if (select_time) { |
| 545 | 545 | ||
| 546 | - // Extract effective time interval in CTA reference time. We need | ||
| 547 | - // this reference for filtering. | ||
| 548 | - // Needs to be gti.reference() so it uses the original fits file's | ||
| 549 | - // time reference. | ||
| 550 | - double tmin = gti.tstart().convert( gti.reference() ) ; | ||
| 551 | - double tmax = gti.tstop( ).convert( gti.reference() ) ; | 546 | + // Extract effective time interval in the reference time of the |
| 547 | + // event list. We get this reference time from gti.reference(). | ||
| 548 | + double tmin = gti.tstart().convert(gti.reference()); | ||
| 549 | + double tmax = gti.tstop().convert(gti.reference()); | ||
| 552 | 550 | ||
| 553 | // Format time with sufficient accuracy and add to selection string | 551 | // Format time with sufficient accuracy and add to selection string |
| 554 | sprintf(cmin, "%.8f", tmin); | 552 | sprintf(cmin, "%.8f", tmin); |