From 8a000436456670c370db4eee40d4a266509da740 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 15 May 2019 11:53:34 +0200 Subject: [PATCH] csspec now properly propagates instrument name for On/Off observations --- ChangeLog | 3 ++- NEWS | 4 +++- cscripts/csspec.py | 6 ++++-- doc/source/admin/release_history/1.6.rst | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6225c59..a1642a1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ -2019-05-06 +2019-05-15 * Version 1.6.0 released ======================== + csspec now properly propagates instrument name for On/Off observations csresspec now also works for observation specific models (#2883) Add more spatial models to csbkgmodel (#2878) Add GAUSS(E) model to csbkgmodel (#2868) diff --git a/NEWS b/NEWS index dbf8d54..a8c0a27 100755 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in ctools 1.6.0 -6 May 2019 +15 May 2019 Introduction @@ -454,6 +454,8 @@ Add hidden "nthreads" parameter and implement parallelisation of computations csspec - Generates Spectral Energy Distribution ----------------------------------------------- +Correctly propagate the instrument name for On/Off observations. + The script no longer skips energy bins with zero counts (#2671). The full true energy range of the RMF is now used in an On/Off analysis to diff --git a/cscripts/csspec.py b/cscripts/csspec.py index 9cdd52d..466a19d 100755 --- a/cscripts/csspec.py +++ b/cscripts/csspec.py @@ -516,11 +516,13 @@ class csspec(ctools.csobservation): rmf[idst_true, idst_reco] = obs.rmf()[isrc_true, isrc_reco] # Set On/Off observations - obsid = obs.id() - statistic = obs.statistic() + obsid = obs.id() + statistic = obs.statistic() + instrument = obs.instrument() obs = gammalib.GCTAOnOffObservation(pha_on, pha_off, arf, rmf) obs.id(obsid) obs.statistic(statistic) + obs.instrument(instrument) # Return observation return obs diff --git a/doc/source/admin/release_history/1.6.rst b/doc/source/admin/release_history/1.6.rst index 868d536..2b062db 100644 --- a/doc/source/admin/release_history/1.6.rst +++ b/doc/source/admin/release_history/1.6.rst @@ -22,6 +22,7 @@ In particular, this release provides: Bug fixes --------- +* :ref:`csspec` now properly propagates instrument name for On/Off observations * [`2883 `_] - :ref:`csresspec` now also works for observation specific models * [`2839 `_] - -- libgit2 0.21.4