Commit bf92101cfed93795658f96182fefa0c1617cf2e4
Merge branch 'issue_1091' into integration
Conflicts: ChangeLog NEWS
Showing
20 changed files
with
122 additions
and
26 deletions
.gitignore
ChangeLog
| 1 | 1 | 2014-01-21 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> |
| 2 | - | |
| 2 | + | |
| 3 | 3 | * Bug fix Version 0.7.1 released |
| 4 | 4 | ================================ |
| 5 | - | |
| 5 | + | |
| 6 | 6 | Added missing hyphens in pfiles synchronisation section (#1091) |
| 7 | + Add configuration test script (#1091) | |
| 7 | 8 | |
| 8 | 9 | |
| 9 | -2014-01-17 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> | |
| 10 | +2014-01-18 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> | |
| 10 | 11 | |
| 11 | 12 | * Version 0.7.0 released |
| 12 | 13 | ======================== | ... | ... |
NEWS
| ... | ... | @@ -18,6 +18,9 @@ the user and system parameter files. This led to an error message on the |
| 18 | 18 | console, but did not impact the proper configuration. Hyphens have now |
| 19 | 19 | been added as needed. |
| 20 | 20 | |
| 21 | +The configuration test script testconf.sh has been added to allow testing | |
| 22 | +configuration script during continous integration. | |
| 23 | + | |
| 21 | 24 | |
| 22 | 25 | 3. Python interface |
| 23 | 26 | ------------------- | ... | ... |
README
| 1 | 1 | ctools information |
| 2 | 2 | ================== |
| 3 | -Version: 00-07-00 (November 29th, 2013) | |
| 3 | +Version: 00-07-00 (18 January 2014) | |
| 4 | 4 | Author: Juergen Knodlseder (jurgen.knodlseder@irap.omp.eu) |
| 5 | 5 | GammaLib dependency: 00-08-00 |
| 6 | 6 | |
| ... | ... | @@ -29,10 +29,10 @@ See the files "NEWS" and "ChangeLog". |
| 29 | 29 | What are the ctools anyway? |
| 30 | 30 | =========================== |
| 31 | 31 | ctools are ftools-like executable for the scientific analysis of |
| 32 | -CTA observations. They are based on GammaLib, a versatile toolbox | |
| 32 | +CTA observations. They are based on GammaLib, a versatile toolbox | |
| 33 | 33 | for the high-level analysis of astronomical gamma-ray data. |
| 34 | 34 | |
| 35 | -The following tools are so far available: | |
| 35 | +The following tools are available: | |
| 36 | 36 | |
| 37 | 37 | ctbin - event binning |
| 38 | 38 | ctlike - maximum likelihood model fitting |
| ... | ... | @@ -49,10 +49,11 @@ https://cta-redmine.irap.omp.eu/projects/ctools - for ctools development |
| 49 | 49 | http://gammalib.sourceforge.net - for GammaLib documentation |
| 50 | 50 | https://sourceforge.net/projects/gammalib/ - for GammaLib downloads |
| 51 | 51 | |
| 52 | + | |
| 52 | 53 | Prerequisites |
| 53 | 54 | ============= |
| 54 | -ctools require GammaLib. Please refer to http://gammalib.sourceforge.net | |
| 55 | -for instructions about how to install GammaLib. The GammaLib code can | |
| 55 | +ctools require GammaLib. Please refer to http://gammalib.sourceforge.net | |
| 56 | +for instructions about how to install GammaLib. The GammaLib code can | |
| 56 | 57 | be downloaded from https://sourceforge.net/projects/gammalib/. |
| 57 | 58 | |
| 58 | 59 | Once GammaLib is properly installed, make sure that you added the setup |
| ... | ... | @@ -164,12 +165,31 @@ To be written ... |
| 164 | 165 | |
| 165 | 166 | Documentation |
| 166 | 167 | ============= |
| 167 | -To be written ... | |
| 168 | +The doc directory (usually at /usr/local/gamma/share/doc/ctools) | |
| 169 | +contains the most recent set of updated documentation for this release. | |
| 170 | +A detailed documentation can be created by typing: | |
| 171 | + | |
| 172 | + % make doc | |
| 173 | + | |
| 174 | +before installing the library. Two types of documentation exist: | |
| 175 | +* code documentation | |
| 176 | +* user documentation | |
| 177 | + | |
| 178 | +Code documentation is created using Doxygen. You need Doxygen on your | |
| 179 | +system to generate the code documentation. This includes man pages. | |
| 180 | +Doxygen can be obtained from http://www.stack.nl/~dimitri/doxygen/. | |
| 181 | + | |
| 182 | +User documentation is created using Sphinx. You need Sphinx on your | |
| 183 | +system to generate the user documentation. Sphinx can be obtained | |
| 184 | +from http://sphinx-doc.org/install.html. | |
| 168 | 185 | |
| 169 | 186 | |
| 170 | 187 | Bug reports |
| 171 | 188 | =========== |
| 172 | -To be written ... | |
| 189 | +To report or search for bugs, please use the ctools Bug Tracker at | |
| 190 | +https://cta-redmine.irap.omp.eu/projects/ctools. Before using the | |
| 191 | +tracker, please read | |
| 192 | +https://cta-redmine.irap.omp.eu/projects/ctools/wiki/Submission_guidelines | |
| 173 | 193 | |
| 174 | 194 | |
| 175 | 195 | Known problems |
| ... | ... | @@ -177,9 +197,9 @@ Known problems |
| 177 | 197 | Solaris |
| 178 | 198 | Although ctools compile on Solaris using the Sun compiler, there are |
| 179 | 199 | problems with global symbols in the shared GammaLib library that prevent |
| 180 | - the model registry to work correctly. Furthermore, GammaLib is not able | |
| 200 | + the model registry to work correctly. Furthermore, GammaLib is not able | |
| 181 | 201 | to catch its own exceptions, which prevents the FITS interface to work |
| 182 | - correctly. Possible it will work using gcc on Solaris, yet this has not | |
| 202 | + correctly. Possible it will work using gcc on Solaris, yet this has not | |
| 183 | 203 | so far been tested. |
| 184 | 204 | |
| 185 | 205 | ... | ... |
configure.ac
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # Configuration for ctools - a set of tools for science analysis of CTA # |
| 3 | 3 | # data # |
| 4 | 4 | # ------------------------------------------------------------------------- # |
| 5 | -# Copyright (C) 2011-2013 Juergen Knoedlseder # | |
| 5 | +# Copyright (C) 2011-2014 Juergen Knoedlseder # | |
| 6 | 6 | # ------------------------------------------------------------------------- # |
| 7 | 7 | # # |
| 8 | 8 | # This program is free software: you can redistribute it and/or modify # |
| ... | ... | @@ -891,8 +891,10 @@ AC_CONFIG_FILES([Makefile |
| 891 | 891 | models/Makefile |
| 892 | 892 | examples/Makefile |
| 893 | 893 | scripts/Makefile |
| 894 | - ctools.pc], | |
| 895 | - [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi]) | |
| 894 | + ctools.pc | |
| 895 | + testconf.sh], | |
| 896 | + [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi; | |
| 897 | + if test -f testconf.sh; then chmod +x testconf.sh; fi]) | |
| 896 | 898 | AC_OUTPUT |
| 897 | 899 | |
| 898 | 900 | ... | ... |
examples/make_binned_analysis.py
| ... | ... | @@ -96,6 +96,7 @@ def pipeline_v1(): |
| 96 | 96 | bin.logFileOpen() # We need this to explicitely open the log file in Python mode |
| 97 | 97 | bin["evfile"].filename(events_name) |
| 98 | 98 | bin["outfile"].filename(cntmap_name) |
| 99 | + bin["ebinalg"].string("LOG") | |
| 99 | 100 | bin["emin"].real(emin) |
| 100 | 101 | bin["emax"].real(emax) |
| 101 | 102 | bin["enumbins"].integer(enumbins) |
| ... | ... | @@ -192,6 +193,7 @@ def pipeline_v2(): |
| 192 | 193 | |
| 193 | 194 | # Bin events into counts map |
| 194 | 195 | bin = ctbin(sim.obs()) |
| 196 | + bin["ebinalg"].string("LOG") | |
| 195 | 197 | bin["emin"].real(emin) |
| 196 | 198 | bin["emax"].real(emax) |
| 197 | 199 | bin["enumbins"].integer(enumbins) | ... | ... |
scripts/obsutils.py
| ... | ... | @@ -77,6 +77,7 @@ def sim(obs, log=False, debug=False, seed=0, nbins=0, binsz=0.05, npix=200): |
| 77 | 77 | |
| 78 | 78 | # Allocate ctbin application and set parameters |
| 79 | 79 | bin = ctbin(sim.obs()) |
| 80 | + bin["ebinalg"].string("LOG") | |
| 80 | 81 | bin["emin"].real(emin) |
| 81 | 82 | bin["emax"].real(emax) |
| 82 | 83 | bin["enumbins"].integer(nbins) | ... | ... |
src/ctbin/ctbin.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctbin - CTA data binning tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctbin/ctbin.par
src/ctlike/ctlike.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctlike - CTA maximum likelihood tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctlike/ctlike.par
src/ctmodel/ctmodel.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctmodel - CTA counts model tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2012-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2012-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctmodel/ctmodel.par
src/ctobssim/ctobssim.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctobssim - CTA observation simulator tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2011-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2011-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctselect/ctselect.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctselect - CTA data selection tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctselect/ctselect.par
src/ctskymap/ctskymap.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctskymap - CTA sky mapping tool * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
src/ctskymap/ctskymap.par
testall.sh
testconf.sh.in
0 → 100755
| 1 | +#!/bin/sh | |
| 2 | +# ===================================================================== | |
| 3 | +# Test ctools configuration script (used for continuous integration; | |
| 4 | +# assumes that ctools have been installed) | |
| 5 | +# | |
| 6 | +# Copyright (C) 2014 Juergen Knoedlseder | |
| 7 | +# | |
| 8 | +# This program is free software: you can redistribute it and/or modify | |
| 9 | +# it under the terms of the GNU General Public License as published by | |
| 10 | +# the Free Software Foundation, either version 3 of the License, or | |
| 11 | +# (at your option) any later version. | |
| 12 | +# | |
| 13 | +# This program is distributed in the hope that it will be useful, | |
| 14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | +# GNU General Public License for more details. | |
| 17 | +# | |
| 18 | +# You should have received a copy of the GNU General Public License | |
| 19 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | +# ===================================================================== | |
| 21 | +# | |
| 22 | +# Exit on any error | |
| 23 | +# ================= | |
| 24 | +set -e | |
| 25 | + | |
| 26 | +# | |
| 27 | +# Set fixed parameters | |
| 28 | +# ==================== | |
| 29 | +test_dir="home" | |
| 30 | + | |
| 31 | +# | |
| 32 | +# Set parameters | |
| 33 | +# ============== | |
| 34 | +prefix="@prefix@" | |
| 35 | + | |
| 36 | +# | |
| 37 | +# Save current working directory | |
| 38 | +# ============================== | |
| 39 | +base=$PWD | |
| 40 | + | |
| 41 | +# | |
| 42 | +# Create test directory | |
| 43 | +# ===================== | |
| 44 | +@MKDIR_P@ "$test_dir" | |
| 45 | +cd "$test_dir" | |
| 46 | + | |
| 47 | +# | |
| 48 | +# Configure ctools | |
| 49 | +# ================ | |
| 50 | +export CTOOLS="$prefix" | |
| 51 | +. $CTOOLS/bin/ctools-init.sh > config.log 2>&1 | |
| 52 | +output=`cat config.log` | |
| 53 | +if [ "x$output" != x ]; then | |
| 54 | + echo "*** Configuration script was not silent ***" | |
| 55 | + echo "$output" | |
| 56 | + exit 1 | |
| 57 | +fi | |
| 58 | + | |
| 59 | +# | |
| 60 | +# Signal completion | |
| 61 | +# ================= | |
| 62 | +echo "Configuration test successful." | ... | ... |