diff --git a/.gitignore b/.gitignore index 0199620..adaaee5 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ compile stamp-h1 depcomp test-driver +testconf.sh doc/html/doxygen doc/man diff --git a/ChangeLog b/ChangeLog index 10dc562..0e89b33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,13 @@ 2014-01-21 Juergen Knoedlseder - + * Bug fix Version 0.7.1 released ================================ - + Added missing hyphens in pfiles synchronisation section (#1091) + Add configuration test script (#1091) -2014-01-17 Juergen Knoedlseder +2014-01-18 Juergen Knoedlseder * Version 0.7.0 released ======================== diff --git a/NEWS b/NEWS index fec50c1..a6e0c6d 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,9 @@ the user and system parameter files. This led to an error message on the console, but did not impact the proper configuration. Hyphens have now been added as needed. +The configuration test script testconf.sh has been added to allow testing +configuration script during continous integration. + 3. Python interface ------------------- diff --git a/README b/README index 30e85c9..7490233 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ ctools information ================== -Version: 00-07-00 (November 29th, 2013) +Version: 00-07-00 (18 January 2014) Author: Juergen Knodlseder (jurgen.knodlseder@irap.omp.eu) GammaLib dependency: 00-08-00 @@ -29,10 +29,10 @@ See the files "NEWS" and "ChangeLog". What are the ctools anyway? =========================== ctools are ftools-like executable for the scientific analysis of -CTA observations. They are based on GammaLib, a versatile toolbox +CTA observations. They are based on GammaLib, a versatile toolbox for the high-level analysis of astronomical gamma-ray data. -The following tools are so far available: +The following tools are available: ctbin - event binning ctlike - maximum likelihood model fitting @@ -49,10 +49,11 @@ https://cta-redmine.irap.omp.eu/projects/ctools - for ctools development http://gammalib.sourceforge.net - for GammaLib documentation https://sourceforge.net/projects/gammalib/ - for GammaLib downloads + Prerequisites ============= -ctools require GammaLib. Please refer to http://gammalib.sourceforge.net -for instructions about how to install GammaLib. The GammaLib code can +ctools require GammaLib. Please refer to http://gammalib.sourceforge.net +for instructions about how to install GammaLib. The GammaLib code can be downloaded from https://sourceforge.net/projects/gammalib/. Once GammaLib is properly installed, make sure that you added the setup @@ -164,12 +165,31 @@ To be written ... Documentation ============= -To be written ... +The doc directory (usually at /usr/local/gamma/share/doc/ctools) +contains the most recent set of updated documentation for this release. +A detailed documentation can be created by typing: + + % make doc + +before installing the library. Two types of documentation exist: +* code documentation +* user documentation + +Code documentation is created using Doxygen. You need Doxygen on your +system to generate the code documentation. This includes man pages. +Doxygen can be obtained from http://www.stack.nl/~dimitri/doxygen/. + +User documentation is created using Sphinx. You need Sphinx on your +system to generate the user documentation. Sphinx can be obtained +from http://sphinx-doc.org/install.html. Bug reports =========== -To be written ... +To report or search for bugs, please use the ctools Bug Tracker at +https://cta-redmine.irap.omp.eu/projects/ctools. Before using the +tracker, please read +https://cta-redmine.irap.omp.eu/projects/ctools/wiki/Submission_guidelines Known problems @@ -177,9 +197,9 @@ Known problems Solaris Although ctools compile on Solaris using the Sun compiler, there are problems with global symbols in the shared GammaLib library that prevent - the model registry to work correctly. Furthermore, GammaLib is not able + the model registry to work correctly. Furthermore, GammaLib is not able to catch its own exceptions, which prevents the FITS interface to work - correctly. Possible it will work using gcc on Solaris, yet this has not + correctly. Possible it will work using gcc on Solaris, yet this has not so far been tested. diff --git a/configure.ac b/configure.ac index 7f619a1..7d0bfab 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Configuration for ctools - a set of tools for science analysis of CTA # # data # # ------------------------------------------------------------------------- # -# Copyright (C) 2011-2013 Juergen Knoedlseder # +# Copyright (C) 2011-2014 Juergen Knoedlseder # # ------------------------------------------------------------------------- # # # # This program is free software: you can redistribute it and/or modify # @@ -891,8 +891,10 @@ AC_CONFIG_FILES([Makefile models/Makefile examples/Makefile scripts/Makefile - ctools.pc], - [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi]) + ctools.pc + testconf.sh], + [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi; + if test -f testconf.sh; then chmod +x testconf.sh; fi]) AC_OUTPUT diff --git a/examples/make_binned_analysis.py b/examples/make_binned_analysis.py index a4de70e..0bc744f 100755 --- a/examples/make_binned_analysis.py +++ b/examples/make_binned_analysis.py @@ -96,6 +96,7 @@ def pipeline_v1(): bin.logFileOpen() # We need this to explicitely open the log file in Python mode bin["evfile"].filename(events_name) bin["outfile"].filename(cntmap_name) + bin["ebinalg"].string("LOG") bin["emin"].real(emin) bin["emax"].real(emax) bin["enumbins"].integer(enumbins) @@ -192,6 +193,7 @@ def pipeline_v2(): # Bin events into counts map bin = ctbin(sim.obs()) + bin["ebinalg"].string("LOG") bin["emin"].real(emin) bin["emax"].real(emax) bin["enumbins"].integer(enumbins) diff --git a/scripts/obsutils.py b/scripts/obsutils.py index 90baf5c..37b19a2 100755 --- a/scripts/obsutils.py +++ b/scripts/obsutils.py @@ -77,6 +77,7 @@ def sim(obs, log=False, debug=False, seed=0, nbins=0, binsz=0.05, npix=200): # Allocate ctbin application and set parameters bin = ctbin(sim.obs()) + bin["ebinalg"].string("LOG") bin["emin"].real(emin) bin["emax"].real(emax) bin["enumbins"].integer(nbins) diff --git a/src/ctbin/ctbin.hpp b/src/ctbin/ctbin.hpp index 12002df..179e0f4 100644 --- a/src/ctbin/ctbin.hpp +++ b/src/ctbin/ctbin.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctbin - CTA data binning tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctbin/ctbin.par b/src/ctbin/ctbin.par index 8838fba..bb06f73 100644 --- a/src/ctbin/ctbin.par +++ b/src/ctbin/ctbin.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctbin.par # -# Version: 00-05-00 # +# Version: 00-04-00 # # # # Author: Jurgen Knodlseder # # Jurgen.Knodlseder@irap.omp.eu # diff --git a/src/ctlike/ctlike.hpp b/src/ctlike/ctlike.hpp index 2cfe6f6..86bcdf1 100644 --- a/src/ctlike/ctlike.hpp +++ b/src/ctlike/ctlike.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctlike - CTA maximum likelihood tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctlike/ctlike.par b/src/ctlike/ctlike.par index 4faea1a..8c83dfb 100644 --- a/src/ctlike/ctlike.par +++ b/src/ctlike/ctlike.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctlike.par # -# Version: 00-03-00 # +# Version: 00-05-00 # # # # Author: Jurgen Knodlseder # # Jurgen.Knodlseder@irap.omp.eu # diff --git a/src/ctmodel/ctmodel.hpp b/src/ctmodel/ctmodel.hpp index e70d7be..b3b93dd 100644 --- a/src/ctmodel/ctmodel.hpp +++ b/src/ctmodel/ctmodel.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctmodel - CTA counts model tool * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctmodel/ctmodel.par b/src/ctmodel/ctmodel.par index 19476fb..a87e677 100644 --- a/src/ctmodel/ctmodel.par +++ b/src/ctmodel/ctmodel.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctmodel.par # -# Version: 00-01-00 # +# Version: 00-02-00 # # # # Author: Juergen Knoedlseder # # Jurgen.Knodlseder@irap.omp.eu # diff --git a/src/ctobssim/ctobssim.hpp b/src/ctobssim/ctobssim.hpp index a4bd12f..2f48e51 100644 --- a/src/ctobssim/ctobssim.hpp +++ b/src/ctobssim/ctobssim.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctobssim - CTA observation simulator tool * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctselect/ctselect.hpp b/src/ctselect/ctselect.hpp index 129c425..4dfba2e 100644 --- a/src/ctselect/ctselect.hpp +++ b/src/ctselect/ctselect.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctselect - CTA data selection tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctselect/ctselect.par b/src/ctselect/ctselect.par index 22aedde..77cc01b 100644 --- a/src/ctselect/ctselect.par +++ b/src/ctselect/ctselect.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctselect.par # -# Version: 00-04-00 # +# Version: 00-05-00 # # # # Author: Jurgen Knodlseder # # Jurgen.Knodlseder@irap.omp.eu # diff --git a/src/ctskymap/ctskymap.hpp b/src/ctskymap/ctskymap.hpp index 230c290..b5bcf13 100644 --- a/src/ctskymap/ctskymap.hpp +++ b/src/ctskymap/ctskymap.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctskymap - CTA sky mapping tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * diff --git a/src/ctskymap/ctskymap.par b/src/ctskymap/ctskymap.par index 480671d..1606329 100644 --- a/src/ctskymap/ctskymap.par +++ b/src/ctskymap/ctskymap.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctskymap.par # -# Version: 00-01-00 # +# Version: 00-02-00 # # # # Author: Jurgen Knodlseder # # knodlseder@cesr.fr # diff --git a/testall.sh b/testall.sh index f11b4d3..877f346 100755 --- a/testall.sh +++ b/testall.sh @@ -62,6 +62,10 @@ export GAMMALIB=./gammalib # Make pull distribution at sensitivity limit #./make_pull_at_sensitivity_limit.py +# Remove local environment +rm -rf gammalib + +# Step back to base directory cd $base diff --git a/testconf.sh.in b/testconf.sh.in new file mode 100755 index 0000000..c6eb0c7 --- /dev/null +++ b/testconf.sh.in @@ -0,0 +1,62 @@ +#!/bin/sh +# ===================================================================== +# Test ctools configuration script (used for continuous integration; +# assumes that ctools have been installed) +# +# Copyright (C) 2014 Juergen Knoedlseder +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# ===================================================================== +# +# Exit on any error +# ================= +set -e + +# +# Set fixed parameters +# ==================== +test_dir="home" + +# +# Set parameters +# ============== +prefix="@prefix@" + +# +# Save current working directory +# ============================== +base=$PWD + +# +# Create test directory +# ===================== +@MKDIR_P@ "$test_dir" +cd "$test_dir" + +# +# Configure ctools +# ================ +export CTOOLS="$prefix" +. $CTOOLS/bin/ctools-init.sh > config.log 2>&1 +output=`cat config.log` +if [ "x$output" != x ]; then + echo "*** Configuration script was not silent ***" + echo "$output" + exit 1 +fi + +# +# Signal completion +# ================= +echo "Configuration test successful."