diff --git a/ChangeLog b/ChangeLog index d4a6965..9624691 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ -2019-01-09 +2019-03-06 * Version 1.6.0 released ======================== + Correct Nbgd computation in GCTAOnOffObservation for Non=0 (#2838) Improve OpenMP handling in GWcs::dir2pix (#2770) Add support for Fermi/LAT P8V3 response functions CTA background rates are now per ontime (#2758) diff --git a/NEWS b/NEWS index d113e84..486065f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in GammaLib 1.6.0 -9 January 2019 +6 March 2019 1. Introduction @@ -320,6 +320,9 @@ unit tests for that response functions were added. 20. CTA interface ----------------- +A missing term was added in GCTAOnOffObservation::wstat_value for computation +of the number of background counts in case that Non=0 (#2838). + CTA background rates are now per ontime and not livetime. This makes the IRF background consistent with the cube background, and is also consistent with the open gamma data format (#2758). diff --git a/doc/source/admin/release_history/1.6.rst b/doc/source/admin/release_history/1.6.rst index 937ad36..4f86b05 100644 --- a/doc/source/admin/release_history/1.6.rst +++ b/doc/source/admin/release_history/1.6.rst @@ -19,6 +19,8 @@ In particular, this release provides: Bug fixes --------- +* [`2838 `_] - + Correct Nbgd computation in ``GCTAOnOffObservation`` for Non=0 * [`2708 `_] - Fix precision issue with ``GCTABackground3D`` Monte-Carlo simulations * [`2706 `_] - diff --git a/inst/cta/src/GCTAOnOffObservation.cpp b/inst/cta/src/GCTAOnOffObservation.cpp index ed69bf4..3cff77a 100644 --- a/inst/cta/src/GCTAOnOffObservation.cpp +++ b/inst/cta/src/GCTAOnOffObservation.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAOnOffObservation.cpp - CTA On/Off observation class * * ----------------------------------------------------------------------- * - * copyright (C) 2013-2018 by Chia-Chun Lu & Christoph Deil * + * copyright (C) 2013-2019 by Chia-Chun Lu & Christoph Deil * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -3269,7 +3269,7 @@ double GCTAOnOffObservation::wstat_value(const double& non, // Special case non = 0 else if (non == 0.0) { - nbgd = 0; + nbgd = noff / alphap1; nonpred = ngam + alpharat * noff; logL = ngam + noff * std::log(alphap1); dlogLdsky = 1.0;