From e76e98c3dbe88afc596fa13ba5852f4076d061d7 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 19 Dec 2012 06:12:53 +0100 Subject: [PATCH] Read GTIs before reading the events. --- inst/cta/src/GCTAEventList.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/inst/cta/src/GCTAEventList.cpp b/inst/cta/src/GCTAEventList.cpp index e5e5c65..5de85d9 100644 --- a/inst/cta/src/GCTAEventList.cpp +++ b/inst/cta/src/GCTAEventList.cpp @@ -296,10 +296,6 @@ void GCTAEventList::save(const std::string& filename, bool clobber) const * * @todo Ultimately, any events file should have a GTI extension, hence the * extraction of GTIs from TSTART and TSTOP should not be necessary. - * - * @todo For the moment we simply use the MJD unit from the GTime class, but - * we should add the information from MJDREFI and MJDREFF to allow - * setting of arbitrary time units. ***************************************************************************/ void GCTAEventList::read(const GFits& file) { @@ -309,15 +305,6 @@ void GCTAEventList::read(const GFits& file) // Get event list HDU GFitsTable* events = file.table("EVENTS"); - // Load event data - read_events(events); - - // Read region of interest from data selection keyword - read_ds_roi(events); - - // Read energy boundaries from data selection keyword - read_ds_ebounds(events); - // If we have a GTI extension, then read Good Time Intervals from that // extension if (file.hashdu("GTI")) { @@ -347,6 +334,15 @@ void GCTAEventList::read(const GFits& file) } // endelse: GTI built from TSTART and TSTOP + // Load event data + read_events(events); + + // Read region of interest from data selection keyword + read_ds_roi(events); + + // Read energy boundaries from data selection keyword + read_ds_ebounds(events); + // Return return; } -- libgit2 0.21.4