diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index da0a52e..13e8f07 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -529,7 +529,9 @@ void ctbin::fill_cube(GCTAObservation* obs) // Determine energy bin. Skip if we are outside the energy range int index = m_ebounds.index(event->energy()); - if (index == -1 || !obs_ebounds.is_in_range(m_ebounds.emin(index), m_ebounds.emax(index))) { + if (index == -1 || + !obs_ebounds.contains(m_ebounds.emin(index), + m_ebounds.emax(index))) { num_outside_ebds++; continue; } diff --git a/src/ctmodel/ctmodel.cpp b/src/ctmodel/ctmodel.cpp index 38f2829..7c17bf9 100644 --- a/src/ctmodel/ctmodel.cpp +++ b/src/ctmodel/ctmodel.cpp @@ -590,7 +590,7 @@ void ctmodel::fill_cube(const GCTAObservation* obs) const GGti& gti = obs->events()->gti(); // Get the ebounds - const GEbounds& obs_ebounds = obs->ebounds(); + const GEbounds& obs_ebounds = obs->ebounds(); const GEbounds& cube_ebounds = m_cube.ebounds(); // Initialise statistics @@ -608,7 +608,9 @@ void ctmodel::fill_cube(const GCTAObservation* obs) // Skip bin if it is outside the energy range of the observation int index = cube_ebounds.index(bin->energy()); - if (index == -1 || !obs_ebounds.is_in_range(cube_ebounds.emin(index), cube_ebounds.emax(index))) { + if (index == -1 || + !obs_ebounds.is_in_range(cube_ebounds.emin(index), + cube_ebounds.emax(index))) { num_outside_ebds++; continue; } @@ -618,7 +620,6 @@ void ctmodel::fill_cube(const GCTAObservation* obs) // Compute model value for cube bin double model = m_obs.models().eval(*bin, *obs) * bin->size(); - //double model = m_obs.models().eval(*bin, *ptr) * bin->size(); // Add model to actual value value += model;