Commit 11838063abf540d4d781b21bff263e2f17329984

Authored by Jürgen Knödlseder
1 parent f11482c0

RING background fix in ctskymap (#2839)

ChangeLog
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 ======================== 4 ========================
5 5
6 Log warning if edisp=no (#2842) 6 Log warning if edisp=no (#2842)
  7 + Fix ring background computation in ctskymap for small roiradius (#2839)
7 Add max_iter parameter to ctbutterfly, cterror, ctlike, cttsmap, 8 Add max_iter parameter to ctbutterfly, cterror, ctlike, cttsmap,
8 ctulimit and cstsmapsplit 9 ctulimit and cstsmapsplit
9 ctbkgcube now requires an input counts cube (#2763) 10 ctbkgcube now requires an input counts cube (#2763)
@@ -216,7 +216,9 @@ of the input observations (#2054). @@ -216,7 +216,9 @@ of the input observations (#2054).
216 216
217 ctskymap - CTA sky mapping 217 ctskymap - CTA sky mapping
218 -------------------------- 218 --------------------------
219 -Add exclusion_map() methods (#2725) 219 +Fix an issue with artefacts for small roiradius values (#2839).
  220 +
  221 +Add exclusion_map() methods (#2725).
220 222
221 Add the "inmap", "iterations" and "threshold" parameters. The hidden 223 Add the "inmap", "iterations" and "threshold" parameters. The hidden
222 "inmap" parameter allows specifying a sky map file containing a "COUNTS" 224 "inmap" parameter allows specifying a sky map file containing a "COUNTS"
doc/source/admin/release_history/1.6.rst
@@ -22,6 +22,8 @@ In particular, this release provides: @@ -22,6 +22,8 @@ In particular, this release provides:
22 Bug fixes 22 Bug fixes
23 --------- 23 ---------
24 24
  25 +* [`2839 <https://cta-redmine.irap.omp.eu/issues/2839>`_] -
  26 + Fix ring background computation in :ref:`ctskymap` for small roiradius
25 * [`2721 <https://cta-redmine.irap.omp.eu/issues/2721>`_] - 27 * [`2721 <https://cta-redmine.irap.omp.eu/issues/2721>`_] -
26 Apply event bin weighting in :ref:`ctmodel` for stacked computation 28 Apply event bin weighting in :ref:`ctmodel` for stacked computation
27 * [`2694 <https://cta-redmine.irap.omp.eu/issues/2694>`_] - 29 * [`2694 <https://cta-redmine.irap.omp.eu/issues/2694>`_] -
src/ctskymap/ctskymap.cpp
@@ -1371,7 +1371,8 @@ void ctskymap::compute_ring_values(const int&amp; ipixel, @@ -1371,7 +1371,8 @@ void ctskymap::compute_ring_values(const int&amp; ipixel,
1371 } 1371 }
1372 1372
1373 // ... otherwise check if pixel is inside source region 1373 // ... otherwise check if pixel is inside source region
1374 - else if (position.cos_dist(skydir) >= m_cos_roiradius) { 1374 + else if ((position.cos_dist(skydir) >= m_cos_roiradius) ||
  1375 + (ipixel == i)) {
1375 1376
1376 // Update n_on 1377 // Update n_on
1377 non += counts(i); 1378 non += counts(i);