Commit b8d08ecf3e16b9a2825ed9caad068052656dbb9a
1 parent
dce5f4de
Modified ontime value in ctmodel (#2147)
Changed the on time for a given bin to be set from the observation being filled into the cube rather than the cube itself. Reformat code (#2147)
Showing
2 changed files
with
3 additions
and
7 deletions
src/ctmodel/ctmodel.cpp
| ... | ... | @@ -405,7 +405,6 @@ void ctmodel::init_members(void) |
| 405 | 405 | m_energy.clear(); |
| 406 | 406 | m_ewidth.clear(); |
| 407 | 407 | m_time.clear(); |
| 408 | - m_ontime = 0.0; | |
| 409 | 408 | |
| 410 | 409 | // Return |
| 411 | 410 | return; |
| ... | ... | @@ -436,7 +435,6 @@ void ctmodel::copy_members(const ctmodel& app) |
| 436 | 435 | m_energy = app.m_energy; |
| 437 | 436 | m_ewidth = app.m_ewidth; |
| 438 | 437 | m_time = app.m_time; |
| 439 | - m_ontime = app.m_ontime; | |
| 440 | 438 | |
| 441 | 439 | // Return |
| 442 | 440 | return; |
| ... | ... | @@ -773,9 +771,8 @@ void ctmodel::extract_cube_properties(void) |
| 773 | 771 | |
| 774 | 772 | } // endfor: looped over spectral bins |
| 775 | 773 | |
| 776 | - // Set time and ontime | |
| 777 | - m_time = m_cube[0]->time(); | |
| 778 | - m_ontime = m_cube[0]->ontime(); | |
| 774 | + // Set time | |
| 775 | + m_time = m_cube[0]->time(); | |
| 779 | 776 | |
| 780 | 777 | // Return |
| 781 | 778 | return; |
| ... | ... | @@ -832,7 +829,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs) |
| 832 | 829 | |
| 833 | 830 | // Set event bin attributes that are constant for a counts cube |
| 834 | 831 | bin.time(m_time); |
| 835 | - bin.ontime(m_ontime); | |
| 832 | + bin.ontime(obs->ontime()); | |
| 836 | 833 | bin.weight(1.0); |
| 837 | 834 | |
| 838 | 835 | // Loop over all the spatial bins | ... | ... |
src/ctmodel/ctmodel.hpp