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 0769966..0e89b33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +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-18 Juergen Knoedlseder * Version 0.7.0 released diff --git a/NEWS b/NEWS index 10c5658..a6e0c6d 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,8 @@ -New Features and Important Changes in ctools 00-07-00 +New Features and Important Changes in ctools 00-07-01 Author(s) : Juergen Knoedlseder -18 January 2014 +21 January 2014 1. Introduction @@ -10,17 +10,16 @@ Author(s) : Juergen Knoedlseder This document briefly summarizes executable by executable the most important changes made since the last release of ctools. -With version 00-08-00, GammaLib has undergone a major interface -change. The adaption of ctools to this interface changed will not be -detailed below as they do not impact the functionalities. - 2. Configuration ----------------- -The configuration script now updates any parameter files in the users -pfiles directory that is older than the system parameter files. This -corrects for problems that arose when parameter files in the pfiles -directory did not include all parameters necessary for the latest version. +Some hyphens were missing in the configuration script when synchronising +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 @@ -30,20 +29,7 @@ None 4. ctobssim - CTA observation simulation ---------------------------------------- -The application now checks for each event whether it lies within the -circular region of interested defined by the region centre (parameters -ra and dec) and region radius (parameter rad). A margin of 0.5 has been -added internally to the radius so that also sources at the edge but -slightly outside of the ROI will be simulated correctly. - -ctobssim now supports any kind of data space model for background -simulations, using the abstract mc() method that is now available -in the GModelData base class. - -The time slice duration is now computed from the source flux and -set so that no more than 1000000 photons will be simulated in a -given slice. This limits the memory requirements during simulations -to about 100 MB, yet saving may still need more memory. +None 5. ctselect - CTA event selection @@ -53,15 +39,7 @@ None 6. ctbin - CTA event binning ---------------------------- -The ebinalg parameter is now used to specify the type of binning. -Linear (LIN) binning and binning retrieved from a FITS file (FILE) -is now supported. For the latter, an extension named EBOUNDS or -ENERGYBINS is expected. - -The ebinalg and ebinfile parameters are now automatic. - -Counts maps generated by ctbin now have the longitude increasing -towards the left. +None 7. ctlike - CTA maximum likelihood fitting @@ -71,14 +49,12 @@ None 8. ctskymap - CTA sky mapping ----------------------------- -Skymaps generated by ctskymap now have the longitude increasing -towards the left. +None 9. ctmodel - CTA counts map modelling ------------------------------------- -Model maps generated by ctmodel now have the longitude increasing -towards the left. +None 10. Examples diff --git a/configure.ac b/configure.ac index 581cc6d..7d0bfab 100644 --- a/configure.ac +++ b/configure.ac @@ -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/src/ctools-setup.in b/src/ctools-setup.in index 1583174..f4359fb 100644 --- a/src/ctools-setup.in +++ b/src/ctools-setup.in @@ -173,7 +173,8 @@ fi # Set MANPATH # ============== if [ "x$MANPATH" = x ]; then - MANPATH="$man_dir:$(manpath)" + manpath=${manpath:-} + MANPATH="$man_dir:${manpath}" else MANPATH=`echo ":$MANPATH:" | \ sed "s%:$man_dir:%:%g" | sed "s%::*$%%"` diff --git a/test/test_cscripts.sh.in b/test/test_cscripts.sh.in index 0593f13..643bbea 100755 --- a/test/test_cscripts.sh.in +++ b/test/test_cscripts.sh.in @@ -49,7 +49,7 @@ export PFILES=pfiles # # Test cspull # =========== -$ECHO -n "Test cspull: " +$ECHO @ECHO_N@ "Test cspull: " chmod +x @abs_top_srcdir@/scripts/cspull.py @abs_top_srcdir@/scripts/cspull.py \ srcmdl="data/crab.xml" \ @@ -67,10 +67,10 @@ chmod +x @abs_top_srcdir@/scripts/cspull.py rad=5.0 \ npix=200 \ binsz=0.05 > cspull.log -$ECHO -n "." +$ECHO @ECHO_N@ "." if [ -s "pull.dat" ] then - $ECHO -n "." + $ECHO @ECHO_N@ "." else $ECHO " pull.dat file is not valid" exit 1 @@ -81,7 +81,7 @@ $ECHO " ok" # # Test cssens # =========== -#echo -n "Test cssens: " +#echo @ECHO_N@ "Test cssens: " #chmod +x @abs_top_srcdir@/scripts/cssens.py #@abs_top_srcdir@/scripts/cssens.py \ # duration=3600.0 \ @@ -91,10 +91,10 @@ $ECHO " ok" # offset="0.0" \ # bkg="data/bkg_dummy.txt" \ # rad=5.0 > cssens.log -#echo -n "." +#echo @ECHO_N@ "." #if [ -s "sensitivity.dat" ] #then -# echo -n "." +# echo @ECHO_N@ "." #else # echo " sensitivity.dat file is not valid" # exit 1 @@ -105,7 +105,7 @@ $ECHO " ok" # # Test cstsdist # ============= -$ECHO -n "Test cstsdist: " +$ECHO @ECHO_N@ "Test cstsdist: " chmod +x @abs_top_srcdir@/scripts/cstsdist.py @abs_top_srcdir@/scripts/cstsdist.py \ outfile="ts.dat" \ @@ -122,10 +122,10 @@ chmod +x @abs_top_srcdir@/scripts/cstsdist.py rad=5.0 \ npix=200 \ binsz=0.05 > cstsdist.log -$ECHO -n "." +$ECHO @ECHO_N@ "." if [ -s "ts.dat" ] then - $ECHO -n "." + $ECHO @ECHO_N@ "." else $ECHO " ts.dat file is not valid" exit 1 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."