From f573d21973498f2419b155c9c9152ef4e3393887 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Mon, 3 Jul 2017 14:56:52 +0200 Subject: [PATCH] Add self.logFileOpen() to cstsmapsplit.execute() method (#2127) --- ChangeLog | 3 ++- NEWS | 5 ++++- cscripts/cscaldb.py | 3 +++ cscripts/csebins.py | 38 +++++++++++++++++++------------------- cscripts/csiactcopy.py | 3 +++ cscripts/csiactdata.py | 3 +++ cscripts/csobs2caldb.py | 3 +++ cscripts/cspull.py | 3 +++ cscripts/csroot2caldb.py | 3 +++ cscripts/cssens.py | 3 +++ cscripts/cstsdist.py | 3 +++ cscripts/cstsmapsplit.py | 32 +++++++++++++++++++------------- cscripts/csviscube.py | 3 +++ cscripts/csworkflow.py | 3 +++ doc/source/admin/release_history/1.3.1.rst | 23 +++++++++++++++++++++++ doc/source/admin/release_history/index.rst | 3 ++- 16 files changed, 99 insertions(+), 35 deletions(-) create mode 100644 doc/source/admin/release_history/1.3.1.rst diff --git a/ChangeLog b/ChangeLog index eede89c..6e7cf5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2017-06-30 +2017-07-03 * Bug fix version 1.3.1 released ================================ @@ -6,6 +6,7 @@ Fix csresmap significance computation error (#2136) Use MigMatrixNoTheta2cut_offaxis and AngularPSF2DEtrue_offaxis histograms to compute PSF and energy dispersion IRFs (#2135) + Add self.logFileOpen() to cstsmapsplit.execute() method (#2127) Properly forward working log file pointer in ctobssim::set_mc_id_names() (#2123) Correct computation of standard deviations in cssrcdetect csobsselect accepts an observation container upon construction diff --git a/NEWS b/NEWS index 2416830..bdbdbbd 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in ctools 1.3.1 -29 June 2017 +3 July 2017 Introduction @@ -130,6 +130,9 @@ The csresmap threw an exception for the SIGNIFICANCE method when the model map contained zero entries. This has been fixed now by properly handling the case of zero entries (#2136). +A call to self.logFileOpen() has been added to the cstsmapsplit.execute() method +so that a log file is written when the script is executed (#2127). + Examples -------- diff --git a/cscripts/cscaldb.py b/cscripts/cscaldb.py index 7b61a27..4693653 100755 --- a/cscripts/cscaldb.py +++ b/cscripts/cscaldb.py @@ -204,6 +204,9 @@ class cscaldb(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/csebins.py b/cscripts/csebins.py index b9507ca..a0580c3 100755 --- a/cscripts/csebins.py +++ b/cscripts/csebins.py @@ -272,25 +272,6 @@ class csebins(ctools.cscript): # Return return - def execute(self): - """ - Execute the script - """ - # Open logfile - self.logFileOpen() - - # Read ahead output parameters - self._read_ahead(True) - - # Run the scrip - self.run() - - # Save energy boundaries - self.save() - - # Return - return - def save(self): """ Save energy boundaries @@ -322,6 +303,25 @@ class csebins(ctools.cscript): # Return return self._ebounds + def execute(self): + """ + Execute the script + """ + # Open logfile + self.logFileOpen() + + # Read ahead output parameters + self._read_ahead(True) + + # Run the scrip + self.run() + + # Save energy boundaries + self.save() + + # Return + return + # ======================== # # Main routine entry point # diff --git a/cscripts/csiactcopy.py b/cscripts/csiactcopy.py index 05bd4f7..7b84b1d 100755 --- a/cscripts/csiactcopy.py +++ b/cscripts/csiactcopy.py @@ -743,6 +743,9 @@ class csiactcopy(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/csiactdata.py b/cscripts/csiactdata.py index 934d760..a48dd44 100755 --- a/cscripts/csiactdata.py +++ b/cscripts/csiactdata.py @@ -184,6 +184,9 @@ class csiactdata(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/csobs2caldb.py b/cscripts/csobs2caldb.py index 3cde977..4daa71e 100755 --- a/cscripts/csobs2caldb.py +++ b/cscripts/csobs2caldb.py @@ -400,6 +400,9 @@ class csobs2caldb(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/cspull.py b/cscripts/cspull.py index 56eb1ac..5669185 100755 --- a/cscripts/cspull.py +++ b/cscripts/cspull.py @@ -329,6 +329,9 @@ class cspull(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/csroot2caldb.py b/cscripts/csroot2caldb.py index 9f16151..42281f5 100755 --- a/cscripts/csroot2caldb.py +++ b/cscripts/csroot2caldb.py @@ -1784,6 +1784,9 @@ class csroot2caldb(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/cssens.py b/cscripts/cssens.py index 4165895..e615d47 100755 --- a/cscripts/cssens.py +++ b/cscripts/cssens.py @@ -649,6 +649,9 @@ class cssens(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/cstsdist.py b/cscripts/cstsdist.py index f35029a..2ccd0f4 100755 --- a/cscripts/cstsdist.py +++ b/cscripts/cstsdist.py @@ -295,6 +295,9 @@ class cstsdist(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/cstsmapsplit.py b/cscripts/cstsmapsplit.py index 48e8310..3a17b61 100755 --- a/cscripts/cstsmapsplit.py +++ b/cscripts/cstsmapsplit.py @@ -255,19 +255,6 @@ class cstsmapsplit(ctools.cscript): # Return return - def execute(self): - """ - Execute the script - """ - # Run the script - self.run() - - # Save results - self.save() - - # Return - return - def save(self): """ Save commands to ASCII file @@ -291,6 +278,25 @@ class cstsmapsplit(ctools.cscript): # Return return + def execute(self): + """ + Execute the script + """ + # Open logfile + self.logFileOpen() + + # Read ahead output parameters + self._read_ahead(True) + + # Run the script + self.run() + + # Save results + self.save() + + # Return + return + # ======================== # # Main routine entry point # diff --git a/cscripts/csviscube.py b/cscripts/csviscube.py index 9e3ae2a..8cd55b0 100755 --- a/cscripts/csviscube.py +++ b/cscripts/csviscube.py @@ -519,6 +519,9 @@ class csviscube(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/cscripts/csworkflow.py b/cscripts/csworkflow.py index 98a9939..76a23d2 100755 --- a/cscripts/csworkflow.py +++ b/cscripts/csworkflow.py @@ -360,6 +360,9 @@ class csworkflow(ctools.cscript): # Open logfile self.logFileOpen() + # Read ahead output parameters + self._read_ahead(True) + # Run the script self.run() diff --git a/doc/source/admin/release_history/1.3.1.rst b/doc/source/admin/release_history/1.3.1.rst new file mode 100644 index 0000000..8c784b2 --- /dev/null +++ b/doc/source/admin/release_history/1.3.1.rst @@ -0,0 +1,23 @@ +.. _1.3.1: + +ctools 1.3.1 release (TBD) +========================== + +Overview +-------- + +ctools 1.3.1 is a bug fix for ctools release 1.3. + +The following bugs have been fixed: + +* [`2136 `_] - + Fix csresmap significance computation error +* [`2135 `_] - + Use ``MigMatrixNoTheta2cut_offaxis`` and ``AngularPSF2DEtrue_offaxis`` + histograms to compute PSF and energy dispersion IRFs +* [`2127 `_] - + Add ``self.logFileOpen()`` to ``cstsmapsplit.execute()`` method +* [`2123 `_] - + Properly forward working log file pointer in ``ctobssim::set_mc_id_names()`` +* Correct computation of standard deviations in :ref:`cssrcdetect` +* :ref:`csobsselect` accepts an observation container upon construction diff --git a/doc/source/admin/release_history/index.rst b/doc/source/admin/release_history/index.rst index 7a64c36..2ac4dc4 100644 --- a/doc/source/admin/release_history/index.rst +++ b/doc/source/admin/release_history/index.rst @@ -18,8 +18,9 @@ Bug fix releases: .. toctree:: :maxdepth: 1 - ctools 1.0.1 <1.0.1> + ctools 1.3.1 <1.3.1> ctools 1.2.1 <1.2.1> + ctools 1.0.1 <1.0.1> For older ctools versions see `here `_. -- libgit2 0.21.4