Commit ab1a673b6904d7f22d9ebb5f00b01874202f38af
1 parent
b5c8db96
rename from test_csripts.sh
Showing
1 changed file
with
65 additions
and
0 deletions
test/test_cscripts.sh.in
0 → 100755
| 1 | +#! /bin/bash | |
| 2 | +# ========================================================================== | |
| 3 | +# This script tests all cscripts that are shipped with ctatools | |
| 4 | +# | |
| 5 | +# Copyright (C) 2011 Jurgen Knodlseder | |
| 6 | +# | |
| 7 | +# This program is free software: you can redistribute it and/or modify | |
| 8 | +# it under the terms of the GNU General Public License as published by | |
| 9 | +# the Free Software Foundation, either version 3 of the License, or | |
| 10 | +# (at your option) any later version. | |
| 11 | +# | |
| 12 | +# This program is distributed in the hope that it will be useful, | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | +# GNU General Public License for more details. | |
| 16 | +# | |
| 17 | +# You should have received a copy of the GNU General Public License | |
| 18 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 19 | +# | |
| 20 | +# ========================================================================== | |
| 21 | + | |
| 22 | +# | |
| 23 | +# Print Header | |
| 24 | +# | |
| 25 | +echo "" | |
| 26 | +echo "*****************" | |
| 27 | +echo "* Test cscripts *" | |
| 28 | +echo "*****************" | |
| 29 | + | |
| 30 | + | |
| 31 | +# | |
| 32 | +# Remove any existing result files | |
| 33 | +# ================================ | |
| 34 | +rm -rf *.fits *.log *.xml *.dat | |
| 35 | + | |
| 36 | + | |
| 37 | +# | |
| 38 | +# Creates pfiles directory | |
| 39 | +# ======================== | |
| 40 | +mkdir -p pfiles | |
| 41 | +export PFILES=pfiles | |
| 42 | + | |
| 43 | + | |
| 44 | +# | |
| 45 | +# Test cssens | |
| 46 | +# =========== | |
| 47 | +echo -n "Test cssens: " | |
| 48 | +chmod +x @abs_srcdir@/scripts/cssens.py | |
| 49 | +@abs_srcdir@/scripts/cssens.py \ | |
| 50 | + duration=3600.0 \ | |
| 51 | + caldb="irf" \ | |
| 52 | + irf="kb_E_50h_v3" \ | |
| 53 | + type="point" \ | |
| 54 | + offset="0.0" \ | |
| 55 | + bkg="data/bkg_kb_E_50h_v3.txt" \ | |
| 56 | + rad=5.0 | |
| 57 | +echo -n "." | |
| 58 | +if [ -s "sensitivity.dat" ] | |
| 59 | +then | |
| 60 | + echo -n "." | |
| 61 | +else | |
| 62 | + echo " sensitivity.dat file is not valid" | |
| 63 | + exit 1 | |
| 64 | +fi | |
| 65 | +echo " ok" | ... | ... |