Commit cb9b38716934db283e1b0a87cfb25d3c6b64cf36

Authored by knodlseder
1 parent cf8643d6

renamed to ctools

ChangeLog
  1 +2011-10-06 Juergen Knoedlseder <knodlseder@cesr.fr>
  2 +
  3 + * Version 0.3.0 released
  4 + ========================
  5 +
  6 + Renamed to ctools
  7 +
  8 +
1 2011-10-03 Juergen Knoedlseder <knodlseder@cesr.fr> 9 2011-10-03 Juergen Knoedlseder <knodlseder@cesr.fr>
2 10
3 * Version 0.2.5 released 11 * Version 0.2.5 released
Makefile.am
@@ -22,7 +22,7 @@ noinst_HEADERS = @@ -22,7 +22,7 @@ noinst_HEADERS =
22 pkgconfigdir = $(libdir)/pkgconfig 22 pkgconfigdir = $(libdir)/pkgconfig
23 23
24 # Files to install in Pkgconfig directory 24 # Files to install in Pkgconfig directory
25 -pkgconfig_DATA = ctatools.pc 25 +pkgconfig_DATA = ctools.pc
26 26
27 # Manual pages to install 27 # Manual pages to install
28 man_MANS = 28 man_MANS =
1 -New Features and Important Changes in ctatools 00-02-05 1 +New Features and Important Changes in ctools 00-03-00
2 2
3 Author(s) : Juergen Knoedlseder 3 Author(s) : Juergen Knoedlseder
4 4
5 -October 3, 2011 5 +October 6, 2011
6 6
7 7
8 1. Introduction 8 1. Introduction
9 --------------- 9 ---------------
10 -This document briefly summarizes executable by executable the most important changes made since the last release of ctatools. 10 +This document briefly summarizes executable by executable the most important changes made since the last release of ctools.
11 11
12 12
13 2. Configuration 13 2. Configuration
14 ----------------- 14 -----------------
15 -None 15 +Renamed package from ctatools to ctools
  16 +
16 17
17 3. Python interface 18 3. Python interface
18 ------------------- 19 -------------------
@@ -31,11 +32,7 @@ None @@ -31,11 +32,7 @@ None
31 32
32 6. ctbin - CTA event binning 33 6. ctbin - CTA event binning
33 ---------------------------- 34 ----------------------------
34 -If an observation container is passed to ctbin, the counts map reference  
35 -pixel is taken from the pointing of each observation and the xref and yref  
36 -parameters are ignored. This allows for pipeline processing of a list of  
37 -observations using ctbin. Note that this feature is only available if cabin  
38 -is used from Python. 35 +None
39 36
40 37
41 7. ctlike - CTA maximum likelihood fitting 38 7. ctlike - CTA maximum likelihood fitting
@@ -45,17 +42,12 @@ None @@ -45,17 +42,12 @@ None
45 42
46 8. Examples 43 8. Examples
47 ----------- 44 -----------
48 -Add folder with example scripts. These scripts will be installed in  
49 -$CTATOOLS/share/examples 45 +None
50 46
51 47
52 9. Scripts 48 9. Scripts
53 ---------- 49 ----------
54 -Add folder with python scripts. These scripts will be installed in  
55 -$CTATOOLS/lib/pythonX.X/site-packages. In addition, symbolic link  
56 -without the .py suffix will be created for cscripts in  
57 -$CTATOOLS/bin so that cscripts are executable as normal ctools.  
58 - 50 +None
59 51
60 10. caldb 52 10. caldb
61 --------- 53 ---------
@@ -64,5 +56,4 @@ None @@ -64,5 +56,4 @@ None
64 56
65 11. models 57 11. models
66 ---------- 58 ----------
67 -Add folder with background models and source model descriptions  
68 -(XML files). 59 +None
1 -ctatools information  
2 -====================  
3 -Version: 00-02-05 (October 3, 2011) 1 +ctools information
  2 +==================
  3 +Version: 00-03-05 (October 6, 2011)
4 Author: Juergen Knodlseder (knodlseder@cesr.fr) 4 Author: Juergen Knodlseder (knodlseder@cesr.fr)
5 GammaLib dependency: 00-04-11 5 GammaLib dependency: 00-04-11
6 6
@@ -26,10 +26,10 @@ What&#39;s new in this release? @@ -26,10 +26,10 @@ What&#39;s new in this release?
26 See the files "NEWS" and "ChangeLog". 26 See the files "NEWS" and "ChangeLog".
27 27
28 28
29 -What are the ctatools anyway?  
30 -=============================  
31 -ctatools are ftools-like executable for the scientific analysis of  
32 -CTA observations. They are based on GammaLib, a vesatile toolbox 29 +What are the ctools anyway?
  30 +===========================
  31 +ctools are ftools-like executable for the scientific analysis of
  32 +CTA observations. They are based on GammaLib, a versatile toolbox
33 for the high-level analysis of astronomical gamma-ray data. 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 so far available:
@@ -42,14 +42,14 @@ The following tools are so far available: @@ -42,14 +42,14 @@ The following tools are so far available:
42 42
43 Web sites 43 Web sites
44 ========= 44 =========
45 -http://cta.irap.omp.eu/ctatools - ctatools documentation 45 +http://cta.irap.omp.eu/ctools - ctools documentation
46 http://gammalib.sourceforge.net - for GammaLib documentation 46 http://gammalib.sourceforge.net - for GammaLib documentation
47 https://sourceforge.net/projects/gammalib/ - for GammaLib downloads 47 https://sourceforge.net/projects/gammalib/ - for GammaLib downloads
48 48
49 49
50 Prerequisites 50 Prerequisites
51 ============= 51 =============
52 -ctatools require GammaLib. Please refer to http://gammalib.sourceforge.net 52 +ctools require GammaLib. Please refer to http://gammalib.sourceforge.net
53 for instructions about how to install GammaLib. The GammaLib code can 53 for instructions about how to install GammaLib. The GammaLib code can
54 be downloaded from https://sourceforge.net/projects/gammalib/. 54 be downloaded from https://sourceforge.net/projects/gammalib/.
55 55
@@ -68,21 +68,21 @@ If you use C shell or a variant then add the following to your @@ -68,21 +68,21 @@ If you use C shell or a variant then add the following to your
68 If you have installed GammaLib in another directory than /usr/local/gamma, 68 If you have installed GammaLib in another directory than /usr/local/gamma,
69 please adapt the path correspondingly. 69 please adapt the path correspondingly.
70 70
71 -Please do NOT attempt to install ctatools in a directory different to that 71 +Please do NOT attempt to install ctools in a directory different to that
72 of GammaLib. The setup procedure does NOT support this feature, although 72 of GammaLib. The setup procedure does NOT support this feature, although
73 you might manage to make it work :-) 73 you might manage to make it work :-)
74 74
75 75
76 Unix Installation 76 Unix Installation
77 ================= 77 =================
78 -To build and install ctatools, simply type the following: 78 +To build and install ctools, simply type the following:
79 79
80 % ./configure 80 % ./configure
81 % make 81 % make
82 % make install 82 % make install
83 83
84 -By default ctatools installs itself in /usr/local/gamma. If you need to  
85 -install ctatools in a different location or in your home directory, use 84 +By default ctools installs itself in /usr/local/gamma. If you need to
  85 +install ctools in a different location or in your home directory, use
86 the --prefix option to ./configure. For example: 86 the --prefix option to ./configure. For example:
87 87
88 % ./configure --prefix=/home/yourname/projects 88 % ./configure --prefix=/home/yourname/projects
@@ -96,7 +96,7 @@ The file INSTALL details more about using configure. Also try @@ -96,7 +96,7 @@ The file INSTALL details more about using configure. Also try
96 96
97 Macintosh OS X Installation 97 Macintosh OS X Installation
98 ============================ 98 ============================
99 -ctatools are known to work on various flavors of OS X. Follow the Unix 99 +ctools are known to work on various flavors of OS X. Follow the Unix
100 installation instructions above. 100 installation instructions above.
101 101
102 In some cases, install problems have been reported with mixed 102 In some cases, install problems have been reported with mixed
@@ -113,13 +113,13 @@ as follows to enable building a bundle for various architectures: @@ -113,13 +113,13 @@ as follows to enable building a bundle for various architectures:
113 113
114 Solaris Installation 114 Solaris Installation
115 ==================== 115 ====================
116 -ctatools compile on Solairs, but there is an issue with using it as a 116 +ctools compile on Solairs, but there is an issue with using it as a
117 shared library (see "Known problems" below). 117 shared library (see "Known problems" below).
118 118
119 119
120 Testing 120 Testing
121 ======= 121 =======
122 -If you want to test ctatools before installation, type the following: 122 +If you want to test ctools before installation, type the following:
123 123
124 % make check 124 % make check
125 125
@@ -142,7 +142,7 @@ To be written ... @@ -142,7 +142,7 @@ To be written ...
142 Known problems 142 Known problems
143 ============== 143 ==============
144 Solaris 144 Solaris
145 - Although ctatools compile on Solaris using the Sun compiler, there are 145 + Although ctools compile on Solaris using the Sun compiler, there are
146 problems with global symbols in the shared GammaLib library that prevent 146 problems with global symbols in the shared GammaLib library that prevent
147 the model registry to work correctly. Furthermore, GammaLib is not able 147 the model registry to work correctly. Furthermore, GammaLib is not able
148 to catch its own exceptions, which prevents the FITS interface to work 148 to catch its own exceptions, which prevents the FITS interface to work
@@ -152,5 +152,5 @@ Solaris @@ -152,5 +152,5 @@ Solaris
152 152
153 Contact 153 Contact
154 ======= 154 =======
155 -To get in touch with the ctatools developers and to contribute to the 155 +To get in touch with the ctools developers and to contribute to the
156 project please contact Juergen Knoedlseder <knodlseder@cesr.fr>. 156 project please contact Juergen Knoedlseder <knodlseder@cesr.fr>.
configure.ac
1 -# Configuration for ctatools - a set of tools for science analysis of CTA data 1 +# Configuration for ctools - a set of tools for science analysis of CTA data
2 # 2 #
3 # Copyright (C) 2011 Jurgen Knodlseder 3 # Copyright (C) 2011 Jurgen Knodlseder
4 # 4 #
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 # 17 #
18 # Process this file with autoconf to produce a configure script 18 # Process this file with autoconf to produce a configure script
19 19
20 -AC_INIT([ctatools], [0.2.5], [knodlseder@cesr.fr], [ctatools]) 20 +AC_INIT([ctools], [0.3.0], [knodlseder@cesr.fr], [ctools])
21 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) 21 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
22 AC_CONFIG_MACRO_DIR([m4]) 22 AC_CONFIG_MACRO_DIR([m4])
23 AC_CONFIG_HEADERS([config.h]) 23 AC_CONFIG_HEADERS([config.h])
@@ -29,11 +29,11 @@ dnl Set prefix @@ -29,11 +29,11 @@ dnl Set prefix
29 dnl ========== 29 dnl ==========
30 AC_PREFIX_DEFAULT([/usr/local/gamma]) 30 AC_PREFIX_DEFAULT([/usr/local/gamma])
31 if test "x$prefix" = xNONE; then 31 if test "x$prefix" = xNONE; then
32 - ctatools_prefix="/usr/local/gamma" 32 + ctools_prefix="/usr/local/gamma"
33 else 33 else
34 - ctatools_prefix=${prefix} 34 + ctools_prefix=${prefix}
35 fi 35 fi
36 -AC_DEFINE_UNQUOTED([PACKAGE_PREFIX], "${ctatools_prefix}", [Location where library is installed]) 36 +AC_DEFINE_UNQUOTED([PACKAGE_PREFIX], "${ctools_prefix}", [Location where library is installed])
37 37
38 38
39 dnl =========================== 39 dnl ===========================
@@ -108,7 +108,7 @@ fi @@ -108,7 +108,7 @@ fi
108 108
109 dnl ========================================================================= 109 dnl =========================================================================
110 dnl Checks if Python bindings are to be build. Python binding requires Python 110 dnl Checks if Python bindings are to be build. Python binding requires Python
111 -dnl and either the files ctatools_wrap.cpp and ctatools.py or swig to create 111 +dnl and either the files ctools_wrap.cpp and ctools.py or swig to create
112 dnl these files. The following conditionals are set: 112 dnl these files. The following conditionals are set:
113 dnl WITH_PYTHON - Python bindings will be built 113 dnl WITH_PYTHON - Python bindings will be built
114 dnl HAVE_SWIG - swig is available 114 dnl HAVE_SWIG - swig is available
@@ -128,7 +128,7 @@ AC_ARG_ENABLE([python-binding], @@ -128,7 +128,7 @@ AC_ARG_ENABLE([python-binding],
128 [ac_enable_python_binding="$enableval"], 128 [ac_enable_python_binding="$enableval"],
129 [ac_enable_python_binding="yes"]) 129 [ac_enable_python_binding="yes"])
130 if test "x$ac_enable_python_binding" = "xno"; then 130 if test "x$ac_enable_python_binding" = "xno"; then
131 - AC_MSG_NOTICE([Python binding for ctatools will not be built]) 131 + AC_MSG_NOTICE([Python binding for ctools will not be built])
132 AC_MSG_NOTICE([Enable Python binding module building with --enable-python-binding]) 132 AC_MSG_NOTICE([Enable Python binding module building with --enable-python-binding])
133 fi 133 fi
134 134
@@ -187,10 +187,10 @@ if test &quot;$SWIG&quot;; then @@ -187,10 +187,10 @@ if test &quot;$SWIG&quot;; then
187 fi 187 fi
188 AM_CONDITIONAL(HAVE_SWIG, test "x$has_swig" = "xyes") 188 AM_CONDITIONAL(HAVE_SWIG, test "x$has_swig" = "xyes")
189 189
190 -# Do we have wrappers (ctatools_wrap.cpp and ctatools.py)?  
191 -AC_CHECK_FILES([pyext/ctatools_wrap.cpp pyext/ctatools.py],,)  
192 -if test "x$ac_cv_file_pyext_ctatools_wrap_cpp" = "xyes"; then  
193 - if test "x$ac_cv_file_pyext_ctatools_py" = "xyes"; then 190 +# Do we have wrappers (ctools_wrap.cpp and ctools.py)?
  191 +AC_CHECK_FILES([pyext/ctools_wrap.cpp pyext/ctools.py],,)
  192 +if test "x$ac_cv_file_pyext_ctools_wrap_cpp" = "xyes"; then
  193 + if test "x$ac_cv_file_pyext_ctools_py" = "xyes"; then
194 has_wrappers="yes" 194 has_wrappers="yes"
195 fi 195 fi
196 fi 196 fi
@@ -225,9 +225,9 @@ if test &quot;x$enable_python&quot; = &quot;xyes&quot;; then @@ -225,9 +225,9 @@ if test &quot;x$enable_python&quot; = &quot;xyes&quot;; then
225 225
226 else 226 else
227 if test "x$has_python_wrap" = "xno" -a "x$has_swig" = "xno"; then 227 if test "x$has_python_wrap" = "xno" -a "x$has_swig" = "xno"; then
228 - AC_MSG_WARN([Neither pyext/ctatools_wrap.cpp and pyext/ctatools.py nor swig has not been found])  
229 - AC_MSG_WARN([Python binding for ctatools cannot be built])  
230 - AC_MSG_WARN([Either use a ctatools distribution with ctatools_wrap.cpp and ctatools.py shipped or install swig on your system]) 228 + AC_MSG_WARN([Neither pyext/ctools_wrap.cpp and pyext/ctools.py nor swig has not been found])
  229 + AC_MSG_WARN([Python binding for ctools cannot be built])
  230 + AC_MSG_WARN([Either use a ctools distribution with ctools_wrap.cpp and ctools.py shipped or install swig on your system])
231 AC_MSG_WARN([swig can be obtained from http://www.swig.org/]) 231 AC_MSG_WARN([swig can be obtained from http://www.swig.org/])
232 fi 232 fi
233 fi 233 fi
@@ -255,7 +255,7 @@ LDFLAGS=$SAVED_LDFLAGS @@ -255,7 +255,7 @@ LDFLAGS=$SAVED_LDFLAGS
255 # If GammaLib has not been found in any standard path then search now in a 255 # If GammaLib has not been found in any standard path then search now in a
256 # number of predefined locations. 256 # number of predefined locations.
257 if test "x$has_gammalib" = "xno"; then 257 if test "x$has_gammalib" = "xno"; then
258 - for i in "$GAMMALIB" "$ctatools_prefix" /opt/local /usr/local /usr ; do 258 + for i in "$GAMMALIB" "$ctools_prefix" /opt/local /usr/local /usr ; do
259 if test -f $i/lib64/libgamma.so -o -f $i/lib64/libgamma.dylib; then 259 if test -f $i/lib64/libgamma.so -o -f $i/lib64/libgamma.dylib; then
260 if test -d $i/include/gammalib; then 260 if test -d $i/include/gammalib; then
261 LIBDIR_GAMMALIB=$i/lib64 261 LIBDIR_GAMMALIB=$i/lib64
@@ -289,7 +289,7 @@ if test &quot;x$has_gammalib&quot; = &quot;xyes&quot;; then @@ -289,7 +289,7 @@ if test &quot;x$has_gammalib&quot; = &quot;xyes&quot;; then
289 AC_SUBST(INCDIR_GAMMALIB) 289 AC_SUBST(INCDIR_GAMMALIB)
290 else 290 else
291 AC_MSG_ERROR([No suitable GammaLib library found. 291 AC_MSG_ERROR([No suitable GammaLib library found.
292 -ctatools require GammaLib for compilation, so please install GammaLib before or, 292 +ctools require GammaLib for compilation, so please install GammaLib before or,
293 if you think that it is installed, set the GAMMALIB environment variable to the 293 if you think that it is installed, set the GAMMALIB environment variable to the
294 root directory of GammaLib.]) 294 root directory of GammaLib.])
295 fi 295 fi
@@ -327,7 +327,7 @@ AC_CONFIG_FILES([Makefile @@ -327,7 +327,7 @@ AC_CONFIG_FILES([Makefile
327 src/ctbin/Makefile 327 src/ctbin/Makefile
328 src/ctlike/Makefile 328 src/ctlike/Makefile
329 src/ctobssim/Makefile 329 src/ctobssim/Makefile
330 - src/ctatools-setup 330 + src/ctools-setup
331 test/Makefile 331 test/Makefile
332 test/test_cscripts.sh 332 test/test_cscripts.sh
333 pyext/Makefile 333 pyext/Makefile
@@ -336,7 +336,7 @@ AC_CONFIG_FILES([Makefile @@ -336,7 +336,7 @@ AC_CONFIG_FILES([Makefile
336 models/Makefile 336 models/Makefile
337 examples/Makefile 337 examples/Makefile
338 scripts/Makefile 338 scripts/Makefile
339 - ctatools.pc], 339 + ctools.pc],
340 [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi]) 340 [if test -f test/test_cscripts.sh; then chmod +x test/test_cscripts.sh; fi])
341 AC_OUTPUT 341 AC_OUTPUT
342 342
@@ -345,7 +345,7 @@ dnl =========================== @@ -345,7 +345,7 @@ dnl ===========================
345 dnl Print configuration summary 345 dnl Print configuration summary
346 dnl =========================== 346 dnl ===========================
347 echo 347 echo
348 -echo " ctatools configuration summary" 348 +echo " ctools configuration summary"
349 echo " ==============================" 349 echo " =============================="
350 if test "x$has_gammalib" = "xyes"; then 350 if test "x$has_gammalib" = "xyes"; then
351 echo " * GammaLib support (yes) ${LIBDIR_GAMMALIB} ${INCDIR_GAMMALIB}" 351 echo " * GammaLib support (yes) ${LIBDIR_GAMMALIB} ${INCDIR_GAMMALIB}"
@@ -418,7 +418,7 @@ if test &quot;x$has_gammalib&quot; = &quot;xyes&quot;; then @@ -418,7 +418,7 @@ if test &quot;x$has_gammalib&quot; = &quot;xyes&quot;; then
418 echo "Now type 'make'" 418 echo "Now type 'make'"
419 echo 419 echo
420 else 420 else
421 - AC_MSG_ERROR([No suitable GammaLib library found. ctatools require GammaLib 421 + AC_MSG_ERROR([No suitable GammaLib library found. ctools require GammaLib
422 for compilation, so please install GammaLib before or provide the 422 for compilation, so please install GammaLib before or provide the
423 location of the library and header files using the LDFLAGS and CPPFLAGS 423 location of the library and header files using the LDFLAGS and CPPFLAGS
424 environnment variables.]) 424 environnment variables.])
examples/README
1 This folder contains Python example scripts that illustrate the 1 This folder contains Python example scripts that illustrate the
2 -usage of the ctatools. 2 +usage of the ctools.
3 3
4 make_binned_analysis.py 4 make_binned_analysis.py
5 Example Python pipelines for binned analysis. 5 Example Python pipelines for binned analysis.
examples/make_binned_analysis.py
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # ========================================================================== 2 # ==========================================================================
3 # This script illustrates how to build a binned analysis pipeline using the 3 # This script illustrates how to build a binned analysis pipeline using the
4 -# ctatools. If matplotlib is installed, a counts spectrum and an offset 4 +# ctools. If matplotlib is installed, a counts spectrum and an offset
5 # histogram will be displayed. 5 # histogram will be displayed.
6 # 6 #
7 # Required 3rd party modules: 7 # Required 3rd party modules:
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 # along with this program. If not, see <http://www.gnu.org/licenses/>. 23 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # 24 #
25 # ========================================================================== 25 # ==========================================================================
26 -from ctatools import * 26 +from ctools import *
27 from gammalib import * 27 from gammalib import *
28 from math import * 28 from math import *
29 import os 29 import os
examples/make_pull_at_sensitivity_limit.py
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 # along with this program. If not, see <http://www.gnu.org/licenses/>. 24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 # 25 #
26 # ========================================================================== 26 # ==========================================================================
27 -from ctatools import * 27 +from ctools import *
28 from gammalib import * 28 from gammalib import *
29 from cspull import * 29 from cspull import *
30 import sys 30 import sys
examples/make_ts_distributions.py
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 # along with this program. If not, see <http://www.gnu.org/licenses/>. 28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29 # 29 #
30 # ========================================================================== 30 # ==========================================================================
31 -from ctatools import * 31 +from ctools import *
32 from gammalib import * 32 from gammalib import *
33 from cstsdist import * 33 from cstsdist import *
34 import sys 34 import sys
examples/make_unbinned_analysis.py
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # ========================================================================== 2 # ==========================================================================
3 # This script illustrates how to build an unbinned analysis pipeline with 3 # This script illustrates how to build an unbinned analysis pipeline with
4 -# the ctatools. If matplotlib is installed, the spectrum will be displayed 4 +# the ctools. If matplotlib is installed, the spectrum will be displayed
5 # on the screen. 5 # on the screen.
6 # 6 #
7 # Required 3rd party modules: 7 # Required 3rd party modules:
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 # along with this program. If not, see <http://www.gnu.org/licenses/>. 23 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # 24 #
25 # ========================================================================== 25 # ==========================================================================
26 -from ctatools import * 26 +from ctools import *
27 from gammalib import * 27 from gammalib import *
28 from math import * 28 from math import *
29 import os 29 import os
pyext/Makefile.am
@@ -6,17 +6,17 @@ @@ -6,17 +6,17 @@
6 if WITH_PYTHON 6 if WITH_PYTHON
7 7
8 # Set SWIG interface filename 8 # Set SWIG interface filename
9 -SWIG_INTERFACE = ctatools.i 9 +SWIG_INTERFACE = ctools.i
10 10
11 # Define the targets that should be built before anything else. 11 # Define the targets that should be built before anything else.
12 # These are honored by 'make all', 'make check' and 'make install'. 12 # These are honored by 'make all', 'make check' and 'make install'.
13 if HAVE_SWIG 13 if HAVE_SWIG
14 - BUILT_SOURCES = ctatools_wrap.cpp ctatools.py 14 + BUILT_SOURCES = ctools_wrap.cpp ctools.py
15 endif 15 endif
16 16
17 # Set files to be removed in clean 17 # Set files to be removed in clean
18 if HAVE_SWIG 18 if HAVE_SWIG
19 - CLEANFILES = ctatools_wrap.cpp ctatools.py 19 + CLEANFILES = ctools_wrap.cpp ctools.py
20 endif 20 endif
21 21
22 all-local: build 22 all-local: build
@@ -26,7 +26,7 @@ all-local: build @@ -26,7 +26,7 @@ all-local: build
26 # of this specific directory. So we build one instance for checking, the other 26 # of this specific directory. So we build one instance for checking, the other
27 # for installation. If we could get the name built by distutils we could avoid 27 # for installation. If we could get the name built by distutils we could avoid
28 # this. 28 # this.
29 -build: ctatools_wrap.cpp ctatools.py 29 +build: ctools_wrap.cpp ctools.py
30 $(PYTHON_BUILD_PREFIX) $(PYTHON) setup.py build --build-platlib build 30 $(PYTHON_BUILD_PREFIX) $(PYTHON) setup.py build --build-platlib build
31 $(PYTHON_BUILD_PREFIX) $(PYTHON) setup.py build 31 $(PYTHON_BUILD_PREFIX) $(PYTHON) setup.py build
32 32
@@ -37,8 +37,8 @@ clean-local: @@ -37,8 +37,8 @@ clean-local:
37 rm -rf build 37 rm -rf build
38 38
39 if HAVE_SWIG 39 if HAVE_SWIG
40 -ctatools_wrap.cpp ctatools.py: $(SWIG_INTERFACE)  
41 - $(SWIG) -c++ -python -Wall -I$(prefix)/share/gammalib/swig -I$(GAMMALIB)/share/gammalib/swig -o ctatools_wrap.cpp -outdir . $(srcdir)/$(SWIG_INTERFACE) 40 +ctools_wrap.cpp ctools.py: $(SWIG_INTERFACE)
  41 + $(SWIG) -c++ -python -Wall -I$(prefix)/share/gammalib/swig -I$(GAMMALIB)/share/gammalib/swig -o ctools_wrap.cpp -outdir . $(srcdir)/$(SWIG_INTERFACE)
42 endif # HAVE_SWIG 42 endif # HAVE_SWIG
43 43
44 endif # WITH_PYTHON 44 endif # WITH_PYTHON
pyext/ctatools.i renamed to pyext/ctools.i
1 /*************************************************************************** 1 /***************************************************************************
2 - * ctatools - SWIG file * 2 + * ctools - SWIG file *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010-2011 by Jurgen Knodlseder * 4 * copyright (C) 2010-2011 by Jurgen Knodlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
@@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
19 * * 19 * *
20 * ----------------------------------------------------------------------- * 20 * ----------------------------------------------------------------------- *
21 * Usage: * 21 * Usage: *
22 - * swig -c++ -python -Wall ctatools.i * 22 + * swig -c++ -python -Wall ctools.i *
23 ***************************************************************************/ 23 ***************************************************************************/
24 -%module ctatools 24 +%module ctools
25 %feature("autodoc", "1"); 25 %feature("autodoc", "1");
26 26
27 /* __ Support module _____________________________________________________ */ 27 /* __ Support module _____________________________________________________ */
pyext/setup.py.in
@@ -31,12 +31,12 @@ if sys.platform.lower().startswith(&quot;darwin&quot;): @@ -31,12 +31,12 @@ if sys.platform.lower().startswith(&quot;darwin&quot;):
31 # Signal darwin compiler adjustments 31 # Signal darwin compiler adjustments
32 print 'Adjust default distutils compiler options for darwin.' 32 print 'Adjust default distutils compiler options for darwin.'
33 33
34 -# Remove any existing symbolic link to libctatools.a 34 +# Remove any existing symbolic link to libctools.a
35 # This will prevent any exception in creating the symbolic link due to 35 # This will prevent any exception in creating the symbolic link due to
36 # an already existing link. 36 # an already existing link.
37 try: 37 try:
38 - os.remove('../src/.libs/libctatools_python.a')  
39 - print 'Removed ../src/.libs/libctatools_python.a' 38 + os.remove('../src/.libs/libctools_python.a')
  39 + print 'Removed ../src/.libs/libctools_python.a'
40 except: 40 except:
41 pass 41 pass
42 42
@@ -44,9 +44,9 @@ except: @@ -44,9 +44,9 @@ except:
44 # dynamic linking. We prefer here static linking to avoid any problems with 44 # dynamic linking. We prefer here static linking to avoid any problems with
45 # finding the gammalib shared library during checking. 45 # finding the gammalib shared library during checking.
46 try: 46 try:
47 - os.symlink('libctatools.a', '../src/.libs/libctatools_python.a')  
48 - print 'Created ../src/.libs/libctatools_python.a'  
49 - libcta='ctatools_python' 47 + os.symlink('libctools.a', '../src/.libs/libctools_python.a')
  48 + print 'Created ../src/.libs/libctools_python.a'
  49 + libcta='ctools_python'
50 except: 50 except:
51 libcta='ctatool' 51 libcta='ctatool'
52 52
@@ -66,11 +66,11 @@ else: @@ -66,11 +66,11 @@ else:
66 66
67 # Add application include files. The method we use here is not very 67 # Add application include files. The method we use here is not very
68 # intelligent as it simple will add all names that start with 'ct' 68 # intelligent as it simple will add all names that start with 'ct'
69 -# in the src directory. Once we added the ctatools script we had to 69 +# in the src directory. Once we added the ctools script we had to
70 # add an explicit filter to avoid appending those. 70 # add an explicit filter to avoid appending those.
71 dirs = glob.glob('../src/ct*') 71 dirs = glob.glob('../src/ct*')
72 for dir in dirs: 72 for dir in dirs:
73 - if len(dir) > 0 and 'ctatools' not in dir: 73 + if len(dir) > 0 and 'ctools' not in dir:
74 path = os.path.abspath(dir) 74 path = os.path.abspath(dir)
75 include_dirs.append(path) 75 include_dirs.append(path)
76 76
@@ -99,12 +99,12 @@ for extra_include_dir in extra_include_dirs: @@ -99,12 +99,12 @@ for extra_include_dir in extra_include_dirs:
99 # Setup 99 # Setup
100 setup(name='@PACKAGE_NAME@', 100 setup(name='@PACKAGE_NAME@',
101 version='@PACKAGE_VERSION@', 101 version='@PACKAGE_VERSION@',
102 - description='ctatools Python binding', 102 + description='ctools Python binding',
103 author='Jurgen Knodlseder', 103 author='Jurgen Knodlseder',
104 author_email='@PACKAGE_BUGREPORT@', 104 author_email='@PACKAGE_BUGREPORT@',
105 url='http://gammalib.sourceforge.net/', 105 url='http://gammalib.sourceforge.net/',
106 - py_modules=['ctatools'],  
107 - ext_modules=[Extension('_ctatools', ['ctatools_wrap.cpp'], 106 + py_modules=['ctools'],
  107 + ext_modules=[Extension('_ctools', ['ctools_wrap.cpp'],
108 include_dirs=include_dirs, 108 include_dirs=include_dirs,
109 library_dirs=library_dirs, 109 library_dirs=library_dirs,
110 libraries=libraries, 110 libraries=libraries,
scripts/cspull.py
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # 19 #
20 # ========================================================================== 20 # ==========================================================================
21 -from ctatools import * 21 +from ctools import *
22 from gammalib import * 22 from gammalib import *
23 import obsutils 23 import obsutils
24 import sys 24 import sys
scripts/cssens.py
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 # along with this program. If not, see <http://www.gnu.org/licenses/>. 33 # along with this program. If not, see <http://www.gnu.org/licenses/>.
34 # 34 #
35 # ========================================================================== 35 # ==========================================================================
36 -from ctatools import * 36 +from ctools import *
37 from gammalib import * 37 from gammalib import *
38 import obsutils 38 import obsutils
39 import sys 39 import sys
scripts/cstsdist.py
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # 20 #
21 # ========================================================================== 21 # ==========================================================================
22 -from ctatools import * 22 +from ctools import *
23 from gammalib import * 23 from gammalib import *
24 import obsutils 24 import obsutils
25 import sys 25 import sys
scripts/obsutils.py
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # 19 #
20 # ========================================================================== 20 # ==========================================================================
21 -from ctatools import * 21 +from ctools import *
22 from gammalib import * 22 from gammalib import *
23 #from math import * 23 #from math import *
24 #import os 24 #import os
src/Makefile.am
@@ -7,19 +7,19 @@ SUBDIRS = ctselect \ @@ -7,19 +7,19 @@ SUBDIRS = ctselect \
7 ctobssim 7 ctobssim
8 8
9 # Scripts to be distributed 9 # Scripts to be distributed
10 -scripts = ctatools-setup \  
11 - ctatools-init.sh \  
12 - ctatools-init.csh 10 +scripts = ctools-setup \
  11 + ctools-init.sh \
  12 + ctools-init.csh
13 13
14 -# Build libtool library for CTA tools. This is needed to provide 14 +# Build libtool library for ctools. This is needed to provide
15 # a shared library that can be loaded for python bindings. We do 15 # a shared library that can be loaded for python bindings. We do
16 # not have to build this library if no python bindings are used. 16 # not have to build this library if no python bindings are used.
17 -lib_LTLIBRARIES = libctatools.la  
18 -libctatools_la_SOURCES =  
19 -libctatools_la_LIBADD = ctbin/libctbin.la \  
20 - ctselect/libctselect.la \  
21 - ctlike/libctlike.la \  
22 - ctobssim/libctobssim.la 17 +lib_LTLIBRARIES = libctools.la
  18 +libctools_la_SOURCES =
  19 +libctools_la_LIBADD = ctbin/libctbin.la \
  20 + ctselect/libctselect.la \
  21 + ctlike/libctlike.la \
  22 + ctobssim/libctobssim.la
23 23
24 # Distribute scripts 24 # Distribute scripts
25 EXTRA_DIST = $(scripts) 25 EXTRA_DIST = $(scripts)
src/ctatools-init.csh deleted
1 -# Filename: ctatools-init.csh  
2 -# Description: C-shell flavor initialization for ctatools  
3 -# runs ctatools-setup to generate a temporary csh script  
4 -# tailored specifically to this user and ctatools  
5 -# installation, then source that.  
6 -# Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011  
7 -#  
8 -if(${?CTATOOLS} == 0) then  
9 - echo "ctatools-init.csh: ERROR -- set CTATOOLS before sourcing ctatools-init.csh"  
10 -else if(-x "$CTATOOLS/bin/ctatools-setup") then  
11 - set ctatools_init=`$CTATOOLS/bin/ctatools-setup csh`  
12 - if($status == 0 && "x$ctatools_init" != x) then  
13 - if(-f "$ctatools_init") then  
14 - source $ctatools_init  
15 - endif  
16 - \rm -f $ctatools_init  
17 - endif  
18 - unset ctatools_init  
19 -else  
20 - echo "ctatools-init.csh: ERROR -- cannot execute $CTATOOLS/bin/ctatools-setup"  
21 -endif  
src/ctatools-init.sh deleted
1 -# Filename: ctatools-init.sh  
2 -# Description: Bourne-shell flavor initialization for ctatools.  
3 -# Runs ctatools-setup to generate a sh script tailored  
4 -# specifically to this user and ctatools installation,  
5 -# then source that.  
6 -# Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011  
7 -#  
8 -if [ "x$CTATOOLS" = x ]; then  
9 - echo "ctatools-init.sh: ERROR -- set CTATOOLS before sourcing ctatools-init.sh"  
10 -elif [ -x "$CTATOOLS/bin/ctatools-setup" ]; then  
11 - ctatools_init=`$CTATOOLS/bin/ctatools-setup sh`  
12 - if [ $? -eq 0 -a "x$ctatools_init" != x ]; then  
13 - if [ -f "$ctatools_init" ]; then  
14 - . $ctatools_init  
15 - fi  
16 - rm -f $ctatools_init  
17 - fi  
18 - unset ctatools_init  
19 -else  
20 - echo "ctatools-init.sh: ERROR -- cannot execute $CTATOOLS/bin/ctatools-setup"  
21 -fi  
src/ctools-init.csh 0 โ†’ 100755
  1 +# Filename: ctools-init.csh
  2 +# Description: C-shell flavor initialization for ctools
  3 +# runs ctools-setup to generate a temporary csh script
  4 +# tailored specifically to this user and ctools
  5 +# installation, then source that.
  6 +# Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011
  7 +#
  8 +if(${?CTOOLS} == 0) then
  9 + echo "ctools-init.csh: ERROR -- set CTOOLS before sourcing ctools-init.csh"
  10 +else if(-x "$CTOOLS/bin/ctools-setup") then
  11 + set ctools_init=`$CTOOLS/bin/ctools-setup csh`
  12 + if($status == 0 && "x$ctools_init" != x) then
  13 + if(-f "$ctools_init") then
  14 + source $ctools_init
  15 + endif
  16 + \rm -f $ctools_init
  17 + endif
  18 + unset ctools_init
  19 +else
  20 + echo "ctools-init.csh: ERROR -- cannot execute $CTOOLS/bin/ctools-setup"
  21 +endif
src/ctools-init.sh 0 โ†’ 100755
  1 +# Filename: ctools-init.sh
  2 +# Description: Bourne-shell flavor initialization for ctools.
  3 +# Runs ctools-setup to generate a sh script tailored
  4 +# specifically to this user and ctools installation,
  5 +# then source that.
  6 +# Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011
  7 +#
  8 +if [ "x$CTOOLS" = x ]; then
  9 + echo "ctools-init.sh: ERROR -- set CTOOLS before sourcing ctools-init.sh"
  10 +elif [ -x "$CTOOLS/bin/ctools-setup" ]; then
  11 + ctools_init=`$CTOOLS/bin/ctools-setup sh`
  12 + if [ $? -eq 0 -a "x$ctools_init" != x ]; then
  13 + if [ -f "$ctools_init" ]; then
  14 + . $ctools_init
  15 + fi
  16 + rm -f $ctools_init
  17 + fi
  18 + unset ctools_init
  19 +else
  20 + echo "ctools-init.sh: ERROR -- cannot execute $CTOOLS/bin/ctools-setup"
  21 +fi
src/ctatools-setup.in renamed to src/ctools-setup.in
1 #! /bin/sh 1 #! /bin/sh
2 -# Filename: ctatools-setup(.in)  
3 -# Description: Writes an initialization script for ctatools software 2 +# Filename: ctools-setup(.in)
  3 +# Description: Writes an initialization script for ctools software
4 # which is custom fit to the user and the particular 4 # which is custom fit to the user and the particular
5 # software installation. Note that this script is 5 # software installation. Note that this script is
6 -# designed to be invoked by ctatools-init.csh/ctatools-init.sh, 6 +# designed to be invoked by ctools-init.csh/ctools-init.sh,
7 # and should not normally be invoked directly by user. 7 # and should not normally be invoked directly by user.
8 # Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011 8 # Author/Date: Juergen Knoedlseder, IRAP, July 16, 2011
9 #------------------------------------------------------------------------------- 9 #-------------------------------------------------------------------------------
@@ -11,15 +11,15 @@ @@ -11,15 +11,15 @@
11 # Set fixed parameters 11 # Set fixed parameters
12 # ==================== 12 # ====================
13 this_script=`echo $0 | sed 's:.*/::'` 13 this_script=`echo $0 | sed 's:.*/::'`
14 -ctatools_info="$this_script:"  
15 -ctatools_error="$ctatools_info ERROR --" 14 +ctools_info="$this_script:"
  15 +ctools_error="$ctools_info ERROR --"
16 16
17 # 17 #
18 # Extract argument 18 # Extract argument
19 # ================ 19 # ================
20 flavor=$1 20 flavor=$1
21 if [ "x$flavor" != xcsh -a "x$flavor" != xsh ]; then 21 if [ "x$flavor" != xcsh -a "x$flavor" != xsh ]; then
22 - echo "$ctatools_info usage $this_script csh|sh" >&2 22 + echo "$ctools_info usage $this_script csh|sh" >&2
23 exit 3 23 exit 3
24 fi 24 fi
25 25
@@ -27,16 +27,16 @@ fi @@ -27,16 +27,16 @@ fi
27 # Set parameters 27 # Set parameters
28 # ============== 28 # ==============
29 prefix="@prefix@" 29 prefix="@prefix@"
30 -ctatools_bin="@prefix@/bin"  
31 -ctatools_lib="@prefix@/lib" 30 +ctools_bin="@prefix@/bin"
  31 +ctools_lib="@prefix@/lib"
32 uname_system=`uname` 32 uname_system=`uname`
33 python_dir="@pythondir@" 33 python_dir="@pythondir@"
34 pkgconfig_dir="@prefix@/lib/pkgconfig" 34 pkgconfig_dir="@prefix@/lib/pkgconfig"
35 -man_dir="@prefix@/share/doc/ctatools/man" 35 +man_dir="@prefix@/share/doc/ctools/man"
36 36
37 # 37 #
38 # Make pfiles available (this is needed for an installation where the 38 # Make pfiles available (this is needed for an installation where the
39 -# ctatools reside in a directory different from GammaLib, as the 39 +# ctools reside in a directory different from GammaLib, as the
40 # system does not know in this case where the syspfiles directory is 40 # system does not know in this case where the syspfiles directory is
41 # =================================================================== 41 # ===================================================================
42 if [ -d $prefix/syspfiles/. ]; then 42 if [ -d $prefix/syspfiles/. ]; then
@@ -45,7 +45,7 @@ if [ -d $prefix/syspfiles/. ]; then @@ -45,7 +45,7 @@ if [ -d $prefix/syspfiles/. ]; then
45 if [ ! -w $HOME/pfiles/. ]; then 45 if [ ! -w $HOME/pfiles/. ]; then
46 mkdir $HOME/pfiles 46 mkdir $HOME/pfiles
47 if [ $? -ne 0 ]; then 47 if [ $? -ne 0 ]; then
48 - echo "$ctatools_error cannot create local pfiles directory $HOME/pfiles" >&2 48 + echo "$ctools_error cannot create local pfiles directory $HOME/pfiles" >&2
49 exit 3 49 exit 3
50 fi 50 fi
51 fi 51 fi
@@ -83,11 +83,11 @@ fi @@ -83,11 +83,11 @@ fi
83 # Set LD_LIBRARY_PATH 83 # Set LD_LIBRARY_PATH
84 # =================== 84 # ===================
85 if [ "x$LD_LIBRARY_PATH" = x ]; then 85 if [ "x$LD_LIBRARY_PATH" = x ]; then
86 - LD_LIBRARY_PATH="$ctatools_lib" 86 + LD_LIBRARY_PATH="$ctools_lib"
87 else 87 else
88 LD_LIBRARY_PATH=`echo ":$LD_LIBRARY_PATH:" | \ 88 LD_LIBRARY_PATH=`echo ":$LD_LIBRARY_PATH:" | \
89 - sed "s%:$ctatools_lib:%:%g" | sed "s%::*$%%"`  
90 - LD_LIBRARY_PATH="$ctatools_lib$LD_LIBRARY_PATH" 89 + sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"`
  90 + LD_LIBRARY_PATH="$ctools_lib$LD_LIBRARY_PATH"
91 fi 91 fi
92 92
93 # 93 #
@@ -96,19 +96,19 @@ fi @@ -96,19 +96,19 @@ fi
96 case $uname_system in 96 case $uname_system in
97 Darwin*) 97 Darwin*)
98 if [ "x$DYLD_LIBRARY_PATH" = x ]; then 98 if [ "x$DYLD_LIBRARY_PATH" = x ]; then
99 - DYLD_LIBRARY_PATH="$ctatools_lib" 99 + DYLD_LIBRARY_PATH="$ctools_lib"
100 else 100 else
101 DYLD_LIBRARY_PATH=`echo ":$DYLD_LIBRARY_PATH:" | \ 101 DYLD_LIBRARY_PATH=`echo ":$DYLD_LIBRARY_PATH:" | \
102 - sed "s%:$ctatools_lib:%:%g" | sed "s%::*$%%"`  
103 - DYLD_LIBRARY_PATH="$ctatools_lib$DYLD_LIBRARY_PATH" 102 + sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"`
  103 + DYLD_LIBRARY_PATH="$ctools_lib$DYLD_LIBRARY_PATH"
104 fi 104 fi
105 ;; 105 ;;
106 CYGWIN*) 106 CYGWIN*)
107 if [ "x$PATH" = x ]; then 107 if [ "x$PATH" = x ]; then
108 - PATH="$ctatools_lib" 108 + PATH="$ctools_lib"
109 else 109 else
110 - PATH=`echo ":$PATH:" | sed "s%:$ctatools_lib:%:%g" | sed "s%::*$%%"`  
111 - PATH="$ctatools_lib$PATH" 110 + PATH=`echo ":$PATH:" | sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"`
  111 + PATH="$ctools_lib$PATH"
112 fi 112 fi
113 ;; 113 ;;
114 esac 114 esac
@@ -139,11 +139,11 @@ fi @@ -139,11 +139,11 @@ fi
139 # Set PATH 139 # Set PATH
140 # ======== 140 # ========
141 if [ "x$PATH" = x ]; then 141 if [ "x$PATH" = x ]; then
142 - PATH="$ctatools_bin" 142 + PATH="$ctools_bin"
143 else 143 else
144 PATH=`echo ":$PATH:" | \ 144 PATH=`echo ":$PATH:" | \
145 - sed "s%:$ctatools_bin:%:%g" | sed "s%::*$%%"`  
146 - PATH="$ctatools_bin$PATH" 145 + sed "s%:$ctools_bin:%:%g" | sed "s%::*$%%"`
  146 + PATH="$ctools_bin$PATH"
147 fi 147 fi
148 148
149 # 149 #
@@ -167,26 +167,26 @@ varlist=&quot;PATH PYTHONPATH PKG_CONFIG_PATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH MANPA @@ -167,26 +167,26 @@ varlist=&quot;PATH PYTHONPATH PKG_CONFIG_PATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH MANPA
167 # ================================================== 167 # ==================================================
168 # Name of temporary config script 168 # Name of temporary config script
169 HOST_NAME=`hostname` 169 HOST_NAME=`hostname`
170 -ctatools_config="$HOME/ctatools-config-$HOST_NAME" 170 +ctools_config="$HOME/ctools-config-$HOST_NAME"
171 171
172 # Bourne Shell version, write only for sh flavor initialization 172 # Bourne Shell version, write only for sh flavor initialization
173 if [ $flavor = sh ]; then 173 if [ $flavor = sh ]; then
174 - rm -f $ctatools_config$$.sh  
175 - touch $ctatools_config$$.sh 174 + rm -f $ctools_config$$.sh
  175 + touch $ctools_config$$.sh
176 for var in $varlist; do 176 for var in $varlist; do
177 eval "if [ \"x\$$var\" != x ]; then 177 eval "if [ \"x\$$var\" != x ]; then
178 - echo \"\$var=\\\"\$$var\\\"; export \$var\" >> $ctatools_config$$.sh; 178 + echo \"\$var=\\\"\$$var\\\"; export \$var\" >> $ctools_config$$.sh;
179 fi" 179 fi"
180 done 180 done
181 - echo "$ctatools_config$$.sh" 181 + echo "$ctools_config$$.sh"
182 # C Shell version, write only for csh flavor initialization 182 # C Shell version, write only for csh flavor initialization
183 elif [ $flavor = csh ]; then 183 elif [ $flavor = csh ]; then
184 - rm -f $ctatools_config$$.csh  
185 - touch $ctatools_config$$.csh 184 + rm -f $ctools_config$$.csh
  185 + touch $ctools_config$$.csh
186 for var in $varlist; do 186 for var in $varlist; do
187 eval "if [ \"x\$$var\" != x ]; then 187 eval "if [ \"x\$$var\" != x ]; then
188 - echo setenv \$var \\\"\$$var\\\" >> $ctatools_config$$.csh; 188 + echo setenv \$var \\\"\$$var\\\" >> $ctools_config$$.csh;
189 fi" 189 fi"
190 done 190 done
191 - echo "$ctatools_config$$.csh" 191 + echo "$ctools_config$$.csh"
192 fi 192 fi
test/README
1 This folder contains files used for unit testing and files that serve 1 This folder contains files used for unit testing and files that serve
2 -as example scripts for ctatools. 2 +as example scripts for ctools.
3 3
4 test_cscripts.sh 4 test_cscripts.sh
5 Unit test for cscripts. 5 Unit test for cscripts.
@@ -8,7 +8,7 @@ test_ctools.sh @@ -8,7 +8,7 @@ test_ctools.sh
8 Unit test for ctools. 8 Unit test for ctools.
9 9
10 test_python.py 10 test_python.py
11 - Unit test for ctatools Python interface. 11 + Unit test for ctools Python interface.
12 12
13 example_models.py 13 example_models.py
14 Example Python pipeline for unbinned analysis that is executed 14 Example Python pipeline for unbinned analysis that is executed
test/example_models.py
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # 20 #
21 # ========================================================================== 21 # ==========================================================================
22 -from ctatools import * 22 +from ctools import *
23 from gammalib import * 23 from gammalib import *
24 from math import * 24 from math import *
25 import os 25 import os
test/example_survey.py
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # 20 #
21 # ========================================================================== 21 # ==========================================================================
22 -from ctatools import * 22 +from ctools import *
23 from gammalib import * 23 from gammalib import *
24 from math import * 24 from math import *
25 import os 25 import os
test/test_cscripts.sh.in
1 #! /bin/bash 1 #! /bin/bash
2 # ========================================================================== 2 # ==========================================================================
3 -# This script tests all cscripts that are shipped with ctatools 3 +# This script tests all cscripts that are shipped with ctools
4 # 4 #
5 # Copyright (C) 2011 Jurgen Knodlseder 5 # Copyright (C) 2011 Jurgen Knodlseder
6 # 6 #
test/test_python.py
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # ========================================================================== 2 # ==========================================================================
3 # This script illustrates how to build an unbinned analysis pipeline using 3 # This script illustrates how to build an unbinned analysis pipeline using
4 -# the ctatools. 4 +# the ctools.
5 # 5 #
6 # Copyright (C) 2011 Jurgen Knodlseder 6 # Copyright (C) 2011 Jurgen Knodlseder
7 # 7 #
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # 20 #
21 # ========================================================================== 21 # ==========================================================================
22 -from ctatools import * 22 +from ctools import *
23 from gammalib import * 23 from gammalib import *
24 from math import * 24 from math import *
25 import os 25 import os
@@ -175,12 +175,12 @@ def pipeline_v2(): @@ -175,12 +175,12 @@ def pipeline_v2():
175 #==========================# 175 #==========================#
176 if __name__ == '__main__': 176 if __name__ == '__main__':
177 """ 177 """
178 - Test ctatools Python modules. 178 + Test ctools Python modules.
179 """ 179 """
180 # Dump header 180 # Dump header
181 print "" 181 print ""
182 print "*************************************" 182 print "*************************************"
183 - print "* ctatools Python interface testing *" 183 + print "* ctools Python interface testing *"
184 print "************************************" 184 print "************************************"
185 185
186 # Set PFILES environment variable 186 # Set PFILES environment variable