Commit 3eeb5c49ee5ee5eb47a176ffa44cf7d0ffc8155b

Authored by Jürgen Knödlseder
1 parent 3c3c3153

Change GEbounds::is_in_range() to GEbounds::contains()

src/ctbin/ctbin.cpp
... ... @@ -529,7 +529,9 @@ void ctbin::fill_cube(GCTAObservation* obs)
529 529  
530 530 // Determine energy bin. Skip if we are outside the energy range
531 531 int index = m_ebounds.index(event->energy());
532   - if (index == -1 || !obs_ebounds.is_in_range(m_ebounds.emin(index), m_ebounds.emax(index))) {
  532 + if (index == -1 ||
  533 + !obs_ebounds.contains(m_ebounds.emin(index),
  534 + m_ebounds.emax(index))) {
533 535 num_outside_ebds++;
534 536 continue;
535 537 }
... ...
src/ctmodel/ctmodel.cpp
... ... @@ -590,7 +590,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs)
590 590 const GGti& gti = obs->events()->gti();
591 591  
592 592 // Get the ebounds
593   - const GEbounds& obs_ebounds = obs->ebounds();
  593 + const GEbounds& obs_ebounds = obs->ebounds();
594 594 const GEbounds& cube_ebounds = m_cube.ebounds();
595 595  
596 596 // Initialise statistics
... ... @@ -608,7 +608,9 @@ void ctmodel::fill_cube(const GCTAObservation* obs)
608 608  
609 609 // Skip bin if it is outside the energy range of the observation
610 610 int index = cube_ebounds.index(bin->energy());
611   - if (index == -1 || !obs_ebounds.is_in_range(cube_ebounds.emin(index), cube_ebounds.emax(index))) {
  611 + if (index == -1 ||
  612 + !obs_ebounds.is_in_range(cube_ebounds.emin(index),
  613 + cube_ebounds.emax(index))) {
612 614 num_outside_ebds++;
613 615 continue;
614 616 }
... ... @@ -618,7 +620,6 @@ void ctmodel::fill_cube(const GCTAObservation* obs)
618 620  
619 621 // Compute model value for cube bin
620 622 double model = m_obs.models().eval(*bin, *obs) * bin->size();
621   - //double model = m_obs.models().eval(*bin, *ptr) * bin->size();
622 623  
623 624 // Add model to actual value
624 625 value += model;
... ...