Commit fdeee982162400db2349fb76203b02bf8b140997
1 parent
e55879fb
Add xspec module.
Showing
3 changed files
with
55 additions
and
2 deletions
pyext/Makefile.am
| ... | ... | @@ -62,6 +62,7 @@ BUILT_SOURCES = gammalib/app_wrap.cpp gammalib/app.py \ |
| 62 | 62 | gammalib/sky_wrap.cpp gammalib/sky.py \ |
| 63 | 63 | gammalib/support_wrap.cpp gammalib/support.py \ |
| 64 | 64 | gammalib/xml_wrap.cpp gammalib/xml.py \ |
| 65 | + gammalib/xspec_wrap.cpp gammalib/xspec.py \ | |
| 65 | 66 | gammalib/test_wrap.cpp gammalib/test.py \ |
| 66 | 67 | $(INST_SWIG_TARGETS) |
| 67 | 68 | ... | ... |
pyext/gammalib/xspec.i
0 → 100644
| 1 | +/*************************************************************************** | |
| 2 | + * xspec.i - XSPEC module * | |
| 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 | + * Usage: * | |
| 22 | + * swig -c++ -python -Wall xspec.i * | |
| 23 | + ***************************************************************************/ | |
| 24 | +/** | |
| 25 | + * @file xspec.i | |
| 26 | + * @brief XSPEC module | |
| 27 | + * @author Juergen Knoedlseder | |
| 28 | + */ | |
| 29 | +%module xspec | |
| 30 | +%feature("autodoc", "1"); | |
| 31 | + | |
| 32 | +/* __ Headers needed for compilation _____________________________________ */ | |
| 33 | +%{ | |
| 34 | +#include <stddef.h> | |
| 35 | +#include "GException.hpp" | |
| 36 | +#include "GTools.hpp" | |
| 37 | +%} | |
| 38 | + | |
| 39 | +/* __ Include standard typemaps for vectors and strings __________________ */ | |
| 40 | +%include stl.i | |
| 41 | + | |
| 42 | +/* __ Include interface classes __________________________________________ */ | |
| 43 | +%import(module="gammalib.base") "GBase.i"; | |
| 44 | +//%import(module="gammalib.base") "GContainer.i"; | |
| 45 | + | |
| 46 | +/* __ Make sure that exceptions are catched ______________________________ */ | |
| 47 | +%import(module="gammalib.support") "GException.i"; | |
| 48 | + | |
| 49 | +/* __ Application module _________________________________________________ */ | |
| 50 | +%include "GArf.i" | |
| 51 | +%include "GPha.i" | |
| 52 | +%include "GRmf.i" | ... | ... |
pyext/setup.py.in
| 1 | 1 | ############################################################################# |
| 2 | 2 | # Disutils setup file for gammalib Python extension module # |
| 3 | 3 | # ------------------------------------------------------------------------- # |
| 4 | -# Copyright (C) 2011-2012 Juergen Knoedlseder # | |
| 4 | +# Copyright (C) 2011-2013 Juergen Knoedlseder # | |
| 5 | 5 | # ------------------------------------------------------------------------- # |
| 6 | 6 | # # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify # |
| ... | ... | @@ -31,7 +31,7 @@ pkg_name = 'gammalib' |
| 31 | 31 | |
| 32 | 32 | # Define core modules |
| 33 | 33 | core_modules = ['app', 'base', 'fits', 'linalg', 'model', 'numerics', \ |
| 34 | - 'obs', 'opt', 'sky', 'support', 'test', 'xml'] | |
| 34 | + 'obs', 'opt', 'sky', 'support', 'test', 'xml', 'xspec'] | |
| 35 | 35 | |
| 36 | 36 | # Detect execution mode |
| 37 | 37 | is_build = True | ... | ... |