From ea44fb11f118feb64439f2b22ff6cc2460c5a72a Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sat, 10 Nov 2018 09:33:24 +0100 Subject: [PATCH] Definitely remove true energy clipping from stacked response cubes --- inst/cta/src/GCTACubeEdisp.cpp | 20 -------------------- inst/cta/src/GCTACubeExposure.cpp | 19 ------------------- inst/cta/src/GCTACubePsf.cpp | 19 ------------------- 3 files changed, 0 insertions(+), 58 deletions(-) diff --git a/inst/cta/src/GCTACubeEdisp.cpp b/inst/cta/src/GCTACubeEdisp.cpp index 26eb3a2..937f7eb 100644 --- a/inst/cta/src/GCTACubeEdisp.cpp +++ b/inst/cta/src/GCTACubeEdisp.cpp @@ -54,7 +54,6 @@ /* __ Macros _____________________________________________________________ */ /* __ Coding definitions _________________________________________________ */ -//#define G_CLIP_ETRUES //!< Clip true energies to reconstructed ones /* __ Debug definitions __________________________________________________ */ @@ -848,9 +847,6 @@ void GCTACubeEdisp::fill_cube(const GCTAObservation& obs, GSkyMap* exposure, GLog* log) { - // Set energy margin - static const GEnergy margin(1.0, "MeV"); - // Only continue if we have an event list if (obs.eventtype() == "EventList") { @@ -948,22 +944,6 @@ void GCTACubeEdisp::fill_cube(const GCTAObservation& obs, // Loop over all energy bins for (int iebin = 0; iebin < m_energies.size(); ++iebin) { - // Skip energy dispersion cube energy if the energy is - // outside the observation energy. The energy dispersion - // cube energies are true energies while the observation - // energy boundaries are reconstructed energies, hence - // this is only an approximation, but probably the only - // we can really do. - // We allow here for a small margin in case of rounding - // errors in the energy boundaries. - #if defined(G_CLIP_ETRUES) - if (!(obs_ebounds.contains(m_energies[iebin]) || - obs_ebounds.contains(m_energies[iebin]-margin) || - obs_ebounds.contains(m_energies[iebin]+margin))) { - continue; - } - #endif - // Get log10 of true energy in TeV double logEsrc = m_energies[iebin].log10TeV(); diff --git a/inst/cta/src/GCTACubeExposure.cpp b/inst/cta/src/GCTACubeExposure.cpp index 2ddd4f7..91fbf6e 100644 --- a/inst/cta/src/GCTACubeExposure.cpp +++ b/inst/cta/src/GCTACubeExposure.cpp @@ -41,7 +41,6 @@ /* __ Macros _____________________________________________________________ */ /* __ Coding definitions _________________________________________________ */ -//#define G_CLIP_ETRUES //!< Clip true energies to reconstructed ones /* __ Debug definitions __________________________________________________ */ @@ -639,9 +638,6 @@ void GCTACubeExposure::free_members(void) ***************************************************************************/ void GCTACubeExposure::fill_cube(const GCTAObservation& obs, GLog* log) { - // Set energy margin - static const GEnergy margin(1.0, "MeV"); - // Only continue if we have an event list if (obs.eventtype() == "EventList") { @@ -728,21 +724,6 @@ void GCTACubeExposure::fill_cube(const GCTAObservation& obs, GLog* log) // Loop over all exposure cube energies for (int iebin = 0; iebin < m_energies.size(); ++iebin){ - // Skip exposure cube energy if the energy is outside the - // observation energy. The exposure cube energies are true - // energies while the observation energy boundaries are - // reconstructed energies, hence this is only an - // approximation, but probably the only we can really do. - // We allow here for a small margin in case of rounding - // errors in the energy boundaries. - #if defined(G_CLIP_ETRUES) - if (!(obs_ebounds.contains(m_energies[iebin]) || - obs_ebounds.contains(m_energies[iebin]-margin) || - obs_ebounds.contains(m_energies[iebin]+margin))) { - continue; - } - #endif - // Get logE/TeV double logE = m_energies[iebin].log10TeV(); diff --git a/inst/cta/src/GCTACubePsf.cpp b/inst/cta/src/GCTACubePsf.cpp index b44cb9f..dd57102 100644 --- a/inst/cta/src/GCTACubePsf.cpp +++ b/inst/cta/src/GCTACubePsf.cpp @@ -48,7 +48,6 @@ /* __ Macros _____________________________________________________________ */ /* __ Coding definitions _________________________________________________ */ -//#define G_CLIP_ETRUES //!< Clip true energies to reconstructed ones #define G_SMOOTH_PSF //!< Guarantee no singularities #define G_QUADRATIC_BINNING //!< Use quadratic delta spacing @@ -769,9 +768,6 @@ void GCTACubePsf::fill_cube(const GCTAObservation& obs, GSkyMap* exposure, GLog* log) { - // Set energy margin - static const GEnergy margin(1.0, "MeV"); - // Only continue if we have an event list if (obs.eventtype() == "EventList") { @@ -858,21 +854,6 @@ void GCTACubePsf::fill_cube(const GCTAObservation& obs, // Loop over all energy bins for (int iebin = 0; iebin < m_energies.size(); ++iebin) { - // Skip PSF cube energy if the energy is outside the - // observation energy. The PSF cube energies are true - // energies while the observation energy boundaries are - // reconstructed energies, hence this is only an - // approximation, but probably the only we can really do. - // We allow here for a small margin in case of rounding - // errors in the energy boundaries. - #if defined(G_CLIP_ETRUES) - if (!(obs_ebounds.contains(m_energies[iebin]) || - obs_ebounds.contains(m_energies[iebin]-margin) || - obs_ebounds.contains(m_energies[iebin]+margin))) { - continue; - } - #endif - // Get logE/TeV double logE = m_energies[iebin].log10TeV(); -- libgit2 0.21.4