diff --git a/src/ctmodel/ctmodel.cpp b/src/ctmodel/ctmodel.cpp index 18683f7..09db4f1 100644 --- a/src/ctmodel/ctmodel.cpp +++ b/src/ctmodel/ctmodel.cpp @@ -405,7 +405,6 @@ void ctmodel::init_members(void) m_energy.clear(); m_ewidth.clear(); m_time.clear(); - m_ontime = 0.0; // Return return; @@ -436,7 +435,6 @@ void ctmodel::copy_members(const ctmodel& app) m_energy = app.m_energy; m_ewidth = app.m_ewidth; m_time = app.m_time; - m_ontime = app.m_ontime; // Return return; @@ -773,9 +771,8 @@ void ctmodel::extract_cube_properties(void) } // endfor: looped over spectral bins - // Set time and ontime - m_time = m_cube[0]->time(); - m_ontime = m_cube[0]->ontime(); + // Set time + m_time = m_cube[0]->time(); // Return return; @@ -832,7 +829,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs) // Set event bin attributes that are constant for a counts cube bin.time(m_time); - bin.ontime(m_ontime); + bin.ontime(obs->ontime()); bin.weight(1.0); // Loop over all the spatial bins diff --git a/src/ctmodel/ctmodel.hpp b/src/ctmodel/ctmodel.hpp index 691ec1c..40b925b 100644 --- a/src/ctmodel/ctmodel.hpp +++ b/src/ctmodel/ctmodel.hpp @@ -100,7 +100,6 @@ protected: std::vector m_energy; //!< Cube energies std::vector m_ewidth; //!< Cube energy widths GTime m_time; //!< Cube time - double m_ontime; //!< Cube ontime };