Commit c81174455b5d9023425a36e10a57a4b8eecebfe4
1 parent
36c07b02
Add etdispcube tool Python module.
Showing
2 changed files
with
64 additions
and
2 deletions
pyext/ctedispcube.i
0 → 100644
| 1 | +/*************************************************************************** | ||
| 2 | + * ctedispcube - Energy dispersion cube generation tool * | ||
| 3 | + * ----------------------------------------------------------------------- * | ||
| 4 | + * copyright (C) 2016 by Maria Haupt * | ||
| 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 ctedispcube.i | ||
| 23 | + * @brief Energy dispersion cube generation tool definition | ||
| 24 | + * @author Chia-Chun Lu | ||
| 25 | + */ | ||
| 26 | + | ||
| 27 | +%{ | ||
| 28 | +/* Put headers and other declarations here that are needed for compilation */ | ||
| 29 | +#include "ctedispcube.hpp" | ||
| 30 | +%} | ||
| 31 | + | ||
| 32 | +/***********************************************************************//** | ||
| 33 | + * @class ctedispcube | ||
| 34 | + * | ||
| 35 | + * @brief Energy dispersion cube generation tool | ||
| 36 | + ***************************************************************************/ | ||
| 37 | +class ctedispcube : public ctool { | ||
| 38 | + | ||
| 39 | +public: | ||
| 40 | + // Constructors and destructors | ||
| 41 | + ctedispcube(void); | ||
| 42 | + explicit ctedispcube(const GObservations& obs); | ||
| 43 | + ctedispcube(int argc, char *argv[]); | ||
| 44 | + ctedispcube(const ctedispcube& app); | ||
| 45 | + virtual ~ctedispcube(void); | ||
| 46 | + | ||
| 47 | + // Methods | ||
| 48 | + void clear(void); | ||
| 49 | + void run(void); | ||
| 50 | + void save(void); | ||
| 51 | + const GCTACubeEdisp& edispcube(void) const; | ||
| 52 | +}; | ||
| 53 | + | ||
| 54 | +/***********************************************************************//** | ||
| 55 | + * @brief Energy dispersion cube generation tool Python extensions | ||
| 56 | + ***************************************************************************/ | ||
| 57 | +%extend ctedispcube { | ||
| 58 | + ctedispcube copy() { | ||
| 59 | + return (*self); | ||
| 60 | + } | ||
| 61 | +} |
pyext/ctools/tools.i
| 1 | /*************************************************************************** | 1 | /*************************************************************************** |
| 2 | * ctools - SWIG file * | 2 | * ctools - SWIG file * |
| 3 | * ----------------------------------------------------------------------- * | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2014 by Juergen Knoedlseder * | 4 | + * copyright (C) 2010-2016 by Juergen Knoedlseder * |
| 5 | * ----------------------------------------------------------------------- * | 5 | * ----------------------------------------------------------------------- * |
| 6 | * * | 6 | * * |
| 7 | * This program is free software: you can redistribute it and/or modify * | 7 | * This program is free software: you can redistribute it and/or modify * |
| @@ -54,6 +54,7 @@ | @@ -54,6 +54,7 @@ | ||
| 54 | %include "ctskymap.i" | 54 | %include "ctskymap.i" |
| 55 | %include "ctexpcube.i" | 55 | %include "ctexpcube.i" |
| 56 | %include "ctpsfcube.i" | 56 | %include "ctpsfcube.i" |
| 57 | +%include "ctedispcube.i" | ||
| 57 | %include "ctbkgcube.i" | 58 | %include "ctbkgcube.i" |
| 58 | %include "ctcubemask.i" | 59 | %include "ctcubemask.i" |
| 59 | %include "cttsmap.i" | 60 | %include "cttsmap.i" |
| @@ -66,4 +67,4 @@ | @@ -66,4 +67,4 @@ | ||
| 66 | def test(): | 67 | def test(): |
| 67 | from ctools.tests import test_python_ctools | 68 | from ctools.tests import test_python_ctools |
| 68 | test_python_ctools.test(installed=True) | 69 | test_python_ctools.test(installed=True) |
| 69 | -%} | ||
| 70 | \ No newline at end of file | 70 | \ No newline at end of file |
| 71 | +%} |