Commit f78e0b8ac73b37278de8d286c7b1f9871986f672
1 parent
6bc297f8
Adapt all test scripts to GammaLib-00-08-00.
Showing
8 changed files
with
61 additions
and
14 deletions
examples/cpp/createfits/Makefile
examples/cpp/createskymap/Makefile
examples/cpp/createxml/Makefile
examples/cpp/readmodel/Makefile
examples/cpp/readmodel/readmodel.cpp
| 1 | +/*************************************************************************** | |
| 2 | + * readmodel.cpp - Illustrates how to read a model * | |
| 3 | + * ----------------------------------------------------------------------- * | |
| 4 | + * copyright (C) 2013 by Juergen Knoedlseder * | |
| 5 | + * ----------------------------------------------------------------------- * | |
| 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 | + * @file readmodel.cpp | |
| 23 | + * @brief Illustrates how to read a model | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | + */ | |
| 26 | + | |
| 27 | +/* __ Includes ___________________________________________________________ */ | |
| 1 | 28 | #include <iostream> |
| 2 | 29 | #include "GammaLib.hpp" |
| 30 | + | |
| 31 | + | |
| 32 | +/***********************************************************************//** | |
| 33 | + * @brief Dummy read model test | |
| 34 | + ***************************************************************************/ | |
| 3 | 35 | int main(void) { |
| 4 | 36 | GModels models("source.xml"); |
| 5 | 37 | std::cout << models << std::endl; | ... | ... |
inst/lat/test/data/p7v6/crab_model.xml
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <spectrum type="ConstantValue"> |
| 12 | 12 | <parameter scale="1.0" name="Value" min="0.0" max="1000.0" value="1.0" free="1"/> |
| 13 | 13 | </spectrum> |
| 14 | - <spatialModel type="MapCubeFunction" file="/project-data/glast/skymaps/galprop/ring_2year_P76_v0.fits"> | |
| 14 | + <spatialModel type="MapCubeFunction" file="../../../test/data/test_cube.fits"> | |
| 15 | 15 | <parameter scale="1" name="Normalization" min="0.001" max="1000.0" value="1" free="0"/> |
| 16 | 16 | </spatialModel> |
| 17 | 17 | </source> | ... | ... |
inst/mwl/test/test_python.py
| ... | ... | @@ -22,8 +22,8 @@ def extract_data(filename): |
| 22 | 22 | # Loop over all table HDUs |
| 23 | 23 | k = 0 |
| 24 | 24 | for extno in range(fits.size()): |
| 25 | - if fits.hdu(extno).exttype() == GFitsHDU.HT_ASCII_TABLE or \ | |
| 26 | - fits.hdu(extno).exttype() == GFitsHDU.HT_BIN_TABLE: | |
| 25 | + if fits.at(extno).exttype() == GFitsHDU.HT_ASCII_TABLE or \ | |
| 26 | + fits.at(extno).exttype() == GFitsHDU.HT_BIN_TABLE: | |
| 27 | 27 | |
| 28 | 28 | # Load spectrum |
| 29 | 29 | spectrum = GMWLSpectrum() | ... | ... |
testall.sh
| ... | ... | @@ -20,11 +20,25 @@ |
| 20 | 20 | base=$PWD |
| 21 | 21 | |
| 22 | 22 | |
| 23 | -# examples | |
| 24 | -# ======== | |
| 23 | +# examples/cpp | |
| 24 | +# =============== | |
| 25 | 25 | echo |
| 26 | -echo "=====> examples" | |
| 26 | +echo "=====> examples/cpp" | |
| 27 | +cd examples/cpp | |
| 28 | +cd createfits; rm -f createfits; make; ./createfits; cd .. | |
| 29 | +cd createskymap; rm -f createskymap; make; ./createskymap; cd .. | |
| 30 | +cd createxml; rm -f createxml; make; ./createxml; cd .. | |
| 31 | +cd numerics; rm -f numerics; make; ./numerics; cd .. | |
| 32 | +cd readmodel; rm -f readmodel; make; ./readmodel; cd .. | |
| 33 | +cd $base | |
| 34 | + | |
| 35 | + | |
| 36 | +# examples/python | |
| 37 | +# =============== | |
| 38 | +echo | |
| 39 | +echo "=====> examples/python" | |
| 27 | 40 | cd examples/python |
| 41 | +./matrix_howto.py | |
| 28 | 42 | ./models_howto.py |
| 29 | 43 | ./xml_howto.py |
| 30 | 44 | ./xml_html_create.py |
| ... | ... | @@ -50,6 +64,7 @@ cd inst/cta/test |
| 50 | 64 | ./test_gauss.py |
| 51 | 65 | ./example_binned_ml_fit.py |
| 52 | 66 | ./example_sim_photons.py |
| 67 | +./example_sim_psf.py | |
| 53 | 68 | cd $base |
| 54 | 69 | |
| 55 | 70 | ... | ... |