Commit 3eeb5c49ee5ee5eb47a176ffa44cf7d0ffc8155b
1 parent
3c3c3153
Change GEbounds::is_in_range() to GEbounds::contains()
Showing
2 changed files
with
7 additions
and
4 deletions
src/ctbin/ctbin.cpp
| @@ -529,7 +529,9 @@ void ctbin::fill_cube(GCTAObservation* obs) | @@ -529,7 +529,9 @@ void ctbin::fill_cube(GCTAObservation* obs) | ||
| 529 | 529 | ||
| 530 | // Determine energy bin. Skip if we are outside the energy range | 530 | // Determine energy bin. Skip if we are outside the energy range |
| 531 | int index = m_ebounds.index(event->energy()); | 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 | num_outside_ebds++; | 535 | num_outside_ebds++; |
| 534 | continue; | 536 | continue; |
| 535 | } | 537 | } |
src/ctmodel/ctmodel.cpp
| @@ -590,7 +590,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | @@ -590,7 +590,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | ||
| 590 | const GGti& gti = obs->events()->gti(); | 590 | const GGti& gti = obs->events()->gti(); |
| 591 | 591 | ||
| 592 | // Get the ebounds | 592 | // Get the ebounds |
| 593 | - const GEbounds& obs_ebounds = obs->ebounds(); | 593 | + const GEbounds& obs_ebounds = obs->ebounds(); |
| 594 | const GEbounds& cube_ebounds = m_cube.ebounds(); | 594 | const GEbounds& cube_ebounds = m_cube.ebounds(); |
| 595 | 595 | ||
| 596 | // Initialise statistics | 596 | // Initialise statistics |
| @@ -608,7 +608,9 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | @@ -608,7 +608,9 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | ||
| 608 | 608 | ||
| 609 | // Skip bin if it is outside the energy range of the observation | 609 | // Skip bin if it is outside the energy range of the observation |
| 610 | int index = cube_ebounds.index(bin->energy()); | 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 | num_outside_ebds++; | 614 | num_outside_ebds++; |
| 613 | continue; | 615 | continue; |
| 614 | } | 616 | } |
| @@ -618,7 +620,6 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | @@ -618,7 +620,6 @@ void ctmodel::fill_cube(const GCTAObservation* obs) | ||
| 618 | 620 | ||
| 619 | // Compute model value for cube bin | 621 | // Compute model value for cube bin |
| 620 | double model = m_obs.models().eval(*bin, *obs) * bin->size(); | 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 | // Add model to actual value | 624 | // Add model to actual value |
| 624 | value += model; | 625 | value += model; |