Commit 2874c63fe2902be2ab83dd9b9105a68f81e6a50e

Authored by Jürgen Knödlseder
1 parent 63546438

Add ctmodel tests.

Two tests of ctmodel are performed. One using a count map as input and a second using the task parameters as input.
Showing 1 changed file with 55 additions and 3 deletions
test/test_ctools.sh
@@ -34,11 +34,12 @@ $ECHO "***************" @@ -34,11 +34,12 @@ $ECHO "***************"
34 # 34 #
35 # Define executables 35 # Define executables
36 # ================== 36 # ==================
37 -ctobssim=../src/ctobssim/ctobssim  
38 -ctskymap=../src/ctskymap/ctskymap  
39 ctbin=../src/ctbin/ctbin 37 ctbin=../src/ctbin/ctbin
40 -ctselect=../src/ctselect/ctselect  
41 ctlike=../src/ctlike/ctlike 38 ctlike=../src/ctlike/ctlike
  39 +ctmodel=../src/ctmodel/ctmodel
  40 +ctobssim=../src/ctobssim/ctobssim
  41 +ctselect=../src/ctselect/ctselect
  42 +ctskymap=../src/ctskymap/ctskymap
42 43
43 44
44 # 45 #
@@ -136,6 +137,57 @@ $ECHO " ok" @@ -136,6 +137,57 @@ $ECHO " ok"
136 137
137 138
138 # 139 #
  140 +# Test ctmodel
  141 +# ============
  142 +$ECHO -n "Test ctmodel: "
  143 +#
  144 +# Run 1
  145 +$ctmodel infile="cntmap.fits" \
  146 + outfile="modmap1.fits" \
  147 + caldb="irf" \
  148 + irf="kb_E_50h_v3" \
  149 + srcmdl="data/crab.xml"
  150 +$ECHO -n "."
  151 +if [ -s "modmap1.fits" ]
  152 +then
  153 + $ECHO -n "."
  154 +else
  155 + $ECHO " modmap1.fits file is not valid"
  156 + exit 1
  157 +fi
  158 +#
  159 +# Run 2
  160 +$ctmodel infile="NONE" \
  161 + outfile="modmap2.fits" \
  162 + caldb="irf" \
  163 + irf="kb_E_50h_v3" \
  164 + srcmdl="data/crab.xml" \
  165 + ra=83.63 \
  166 + dec=22.01 \
  167 + tmin=0.0 \
  168 + tmax=1800.0 \
  169 + emin=0.1 \
  170 + emax=100.0 \
  171 + enumbins=20 \
  172 + nxpix=200 \
  173 + nypix=200 \
  174 + binsz=0.02 \
  175 + coordsys="CEL" \
  176 + xref=83.63 \
  177 + yref=22.01 \
  178 + proj="CAR"
  179 +$ECHO -n "."
  180 +if [ -s "modmap2.fits" ]
  181 +then
  182 + $ECHO -n "."
  183 +else
  184 + $ECHO " modmap2.fits file is not valid"
  185 + exit 1
  186 +fi
  187 +$ECHO " ok"
  188 +
  189 +
  190 +#
139 # Test ctselect 191 # Test ctselect
140 # ============= 192 # =============
141 $ECHO -n "Test ctselect: " 193 $ECHO -n "Test ctselect: "