Commit 79d37721d00f1dc0766cdf3348f48a8f71489983

Authored by knodlseder
1 parent 4931166c

explicitly set relative paths to executables (avoid specific PATH environment)

Showing 1 changed file with 64 additions and 55 deletions
test/test_ctools.sh
... ... @@ -26,6 +26,15 @@ echo "***************"
26 26 echo "* Test ctools *"
27 27 echo "***************"
28 28  
  29 +#
  30 +# Define executables
  31 +# ==================
  32 +ctobssim=../src/ctobssim/ctobssim
  33 +ctskymap=../src/ctskymap/ctskymap
  34 +ctbin=../src/ctbin/ctbin
  35 +ctselect=../src/ctselect/ctselect
  36 +ctlike=../src/ctlike/ctlike
  37 +
29 38  
30 39 #
31 40 # Remove any existing result files
... ... @@ -46,17 +55,17 @@ export PFILES=pfiles
46 55 # Test ctobssim
47 56 # =============
48 57 echo -n "Test ctobssim: "
49   -ctobssim infile="data/crab.xml" \
50   - outfile="events.fits" \
51   - caldb="irf" \
52   - irf="kb_E_50h_v3" \
53   - ra=83.63 \
54   - dec=22.01 \
55   - rad=10.0 \
56   - tmin=0.0 \
57   - tmax=1800.0 \
58   - emin=0.1 \
59   - emax=100.0
  58 +$ctobssim infile="data/crab.xml" \
  59 + outfile="events.fits" \
  60 + caldb="irf" \
  61 + irf="kb_E_50h_v3" \
  62 + ra=83.63 \
  63 + dec=22.01 \
  64 + rad=10.0 \
  65 + tmin=0.0 \
  66 + tmax=1800.0 \
  67 + emin=0.1 \
  68 + emax=100.0
60 69 echo -n "."
61 70 if [ -s "events.fits" ]
62 71 then
... ... @@ -72,17 +81,17 @@ echo " ok"
72 81 # Test ctskymap
73 82 # =============
74 83 echo -n "Test ctskymap: "
75   -ctskymap evfile="events.fits" \
76   - outfile="skymap.fits" \
77   - emin=0.1 \
78   - emax=100.0 \
79   - nxpix=200 \
80   - nypix=200 \
81   - binsz=0.02 \
82   - coordsys="CEL" \
83   - xref=83.63 \
84   - yref=22.01 \
85   - proj="CAR"
  84 +$ctskymap evfile="events.fits" \
  85 + outfile="skymap.fits" \
  86 + emin=0.1 \
  87 + emax=100.0 \
  88 + nxpix=200 \
  89 + nypix=200 \
  90 + binsz=0.02 \
  91 + coordsys="CEL" \
  92 + xref=83.63 \
  93 + yref=22.01 \
  94 + proj="CAR"
86 95 echo -n "."
87 96 if [ -s "skymap.fits" ]
88 97 then
... ... @@ -98,18 +107,18 @@ echo " ok"
98 107 # Test ctbin
99 108 # ==========
100 109 echo -n "Test ctbin: "
101   -ctbin evfile="events.fits" \
102   - outfile="cntmap.fits" \
103   - emin=0.1 \
104   - emax=100.0 \
105   - enumbins=20 \
106   - nxpix=200 \
107   - nypix=200 \
108   - binsz=0.02 \
109   - coordsys="CEL" \
110   - xref=83.63 \
111   - yref=22.01 \
112   - proj="CAR"
  110 +$ctbin evfile="events.fits" \
  111 + outfile="cntmap.fits" \
  112 + emin=0.1 \
  113 + emax=100.0 \
  114 + enumbins=20 \
  115 + nxpix=200 \
  116 + nypix=200 \
  117 + binsz=0.02 \
  118 + coordsys="CEL" \
  119 + xref=83.63 \
  120 + yref=22.01 \
  121 + proj="CAR"
113 122 echo -n "."
114 123 if [ -s "cntmap.fits" ]
115 124 then
... ... @@ -125,15 +134,15 @@ echo " ok"
125 134 # Test ctselect
126 135 # =============
127 136 echo -n "Test ctselect: "
128   -ctselect infile="events.fits" \
129   - outfile="selected_events.fits" \
130   - ra=83.63 \
131   - dec=22.01 \
132   - rad=10.0 \
133   - tmin=0.0 \
134   - tmax=1800.0 \
135   - emin=0.1 \
136   - emax=100.0
  137 +$ctselect infile="events.fits" \
  138 + outfile="selected_events.fits" \
  139 + ra=83.63 \
  140 + dec=22.01 \
  141 + rad=10.0 \
  142 + tmin=0.0 \
  143 + tmax=1800.0 \
  144 + emin=0.1 \
  145 + emax=100.0
137 146 echo -n "."
138 147 if [ -s "selected_events.fits" ]
139 148 then
... ... @@ -149,12 +158,12 @@ echo " ok"
149 158 # Test ctlike
150 159 # ===========
151 160 echo -n "Test ctlike: "
152   -ctlike cntmap="cntmap.fits" \
153   - srcmdl="data/crab.xml" \
154   - outmdl="results_binned.xml" \
155   - method="BINNED" \
156   - caldb="irf" \
157   - irf="kb_E_50h_v3"
  161 +$ctlike cntmap="cntmap.fits" \
  162 + srcmdl="data/crab.xml" \
  163 + outmdl="results_binned.xml" \
  164 + method="BINNED" \
  165 + caldb="irf" \
  166 + irf="kb_E_50h_v3"
158 167 echo -n "."
159 168 if [ -s "results_binned.xml" ]
160 169 then
... ... @@ -163,12 +172,12 @@ else
163 172 echo " results_binned.xml file is not valid"
164 173 exit 1
165 174 fi
166   -ctlike evfile="selected_events.fits" \
167   - srcmdl="data/crab.xml" \
168   - outmdl="results_unbinned.xml" \
169   - method="UNBINNED" \
170   - caldb="irf" \
171   - irf="kb_E_50h_v3"
  175 +$ctlike evfile="selected_events.fits" \
  176 + srcmdl="data/crab.xml" \
  177 + outmdl="results_unbinned.xml" \
  178 + method="UNBINNED" \
  179 + caldb="irf" \
  180 + irf="kb_E_50h_v3"
172 181 echo -n "."
173 182 if [ -s "results_unbinned.xml" ]
174 183 then
... ...