From 11838063abf540d4d781b21bff263e2f17329984 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 6 Mar 2019 15:33:16 +0100 Subject: [PATCH] RING background fix in ctskymap (#2839) --- ChangeLog | 1 + NEWS | 4 +++- doc/source/admin/release_history/1.6.rst | 2 ++ src/ctskymap/ctskymap.cpp | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cff2e5c..3314ef5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ ======================== Log warning if edisp=no (#2842) + Fix ring background computation in ctskymap for small roiradius (#2839) Add max_iter parameter to ctbutterfly, cterror, ctlike, cttsmap, ctulimit and cstsmapsplit ctbkgcube now requires an input counts cube (#2763) diff --git a/NEWS b/NEWS index 88d0ef1..64fe746 100755 --- a/NEWS +++ b/NEWS @@ -216,7 +216,9 @@ of the input observations (#2054). ctskymap - CTA sky mapping -------------------------- -Add exclusion_map() methods (#2725) +Fix an issue with artefacts for small roiradius values (#2839). + +Add exclusion_map() methods (#2725). Add the "inmap", "iterations" and "threshold" parameters. The hidden "inmap" parameter allows specifying a sky map file containing a "COUNTS" diff --git a/doc/source/admin/release_history/1.6.rst b/doc/source/admin/release_history/1.6.rst index c043c7f..8aba147 100644 --- a/doc/source/admin/release_history/1.6.rst +++ b/doc/source/admin/release_history/1.6.rst @@ -22,6 +22,8 @@ In particular, this release provides: Bug fixes --------- +* [`2839 `_] - + Fix ring background computation in :ref:`ctskymap` for small roiradius * [`2721 `_] - Apply event bin weighting in :ref:`ctmodel` for stacked computation * [`2694 `_] - diff --git a/src/ctskymap/ctskymap.cpp b/src/ctskymap/ctskymap.cpp index ab63f44..f742aca 100755 --- a/src/ctskymap/ctskymap.cpp +++ b/src/ctskymap/ctskymap.cpp @@ -1371,7 +1371,8 @@ void ctskymap::compute_ring_values(const int& ipixel, } // ... otherwise check if pixel is inside source region - else if (position.cos_dist(skydir) >= m_cos_roiradius) { + else if ((position.cos_dist(skydir) >= m_cos_roiradius) || + (ipixel == i)) { // Update n_on non += counts(i); -- libgit2 0.21.4