New Features and Important Changes in ctools 1.2.0 4 October 2016 Introduction ------------ This document briefly summarizes the changes that have been made in this ctools release with respect to the precedent release. Configuration ------------- The testing.py script has been modified so that cscripts that are executed from the command line are included in the coverage reports (#1827). Python interface ---------------- A pars() method has been added to the Python interface of all ctools and cscripts that allows assigning parameters from a dictionary or retrieving all parameters in a dictionary (#1838). Support model ------------- The ctobservation base class that derives from the ctool base class was introduced to provide a common base class for all ctools that hold an observation container. The class implements the following methods: - obs() Returns reference to observation container - first_unbinned_observation() First unbinned CTA observation in container - next_unbinned_observation() Next unbinned CTA observation in container The following ctools derive from the class: - ctbin - ctbkgcube - ctcubemask - ctedispcube - ctexpcube - ctmodel - ctobssim - ctpsfcube - ctselect - ctskymap The ctlikelihood base class that derives from the ctobservation base class was introduced to provide a common base class for all ctools that perform maximum likelihood optimisations. The class holds an optimizer member. The class implements the following methods: - opt() Returns pointer to optimizer - evaluate() Evaluates log-likelihood at a given parameter value The following ctools derive from the class: - ctbutterfly - cterror - ctlike - cttsmap - ctulimit The introduction of these base classes avoids code duplication. ctobssim - CTA observation simulation ------------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctselect - CTA event selection ------------------------------ The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The time_reference() method has been removed since the method is part of the ctool base class, and exposed in Python as _time_reference(). ctbin - CTA event binning ------------------------- The ctbin segfaulted when running on an observation container with different energy thresholds. This problem is now fixed (#1850). The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The save() method led to a segmentation violation in case it was applied on an empty ctbin instance, and specifically in case that the instance contains an empty observation container. This bug has been fixed (#1835). ctlike - Maximum likelihood fitting ----------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The class now derives from ctlikelihood (#1828). cttsmap - Generation of Test Statistic map ------------------------------------------ The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The class now derives from ctlikelihood (#1828). ctskymap - CTA sky mapping -------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The ctskymap::map() method has been renamed to ctskymap::skymap() to avoid a name conflict with Python (#1828). ctmodel - CTA counts cube modelling ----------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctexpcube - CTA exposure cube generation ---------------------------------------- Set hidden "addbounds" parameter by default to "no" (#1819). The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctpsfcube - CTA point spread function cube generation ----------------------------------------------------- Set hidden "addbounds" parameter by default to "no" (#1819). The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctedispcube - CTA energy dispersion cube generation --------------------------------------------------- Set hidden "addbounds" parameter by default to "no" (#1819). The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctbkgcube - CTA background cube generation ------------------------------------------ Set hidden "addbounds" parameter by default to "no" (#1819). The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctmapcube - CTA map cube generation ----------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctcubemask - CTA cube filtering ------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctbutterfly - Generate butterfly diagrams ----------------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). ctulimit - Compute upper limit ------------------------------ The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The tool now also supports spectral models with the new naming conventions, and in particular the "PhotonFlux" and "EnergyFlux" names (#1832). The class now derives from ctlikelihood (#1828). cterror - Likelihood profile error computation ---------------------------------------------- The clear() method now calls GApplication::clear() to conserve the properties of the tool (#1835). The class now derives from ctlikelihood (#1828). cscripts -------- Added the support modules "modutils" and "ioutils" to the cscripts module and removed the obsolete functions fit(), cterror(), cntmap() and modmap() from the "obsutils" module (#1830). The csroot2caldb script now takes the zenith and azimuth angles as parameters and writes them into the calibration database. Examples -------- None caldb ----- None models ------ None