Commit 9a7025ac6f0b2bdc9dcd971cf3dade69c908e111
1 parent
d0f10a6a
Add ctskymap Python interface.
Showing
2 changed files
with
68 additions
and
0 deletions
pyext/ctools.i
pyext/ctskymap.i
0 → 100644
| 1 | +/*************************************************************************** | ||
| 2 | + * ctskymap - CTA sky mapping tool * | ||
| 3 | + * ----------------------------------------------------------------------- * | ||
| 4 | + * copyright (C) 2012 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 ctskymap.i | ||
| 23 | + * @brief CTA sky mapping tool definition | ||
| 24 | + * @author Juergen Knoedlseder | ||
| 25 | + */ | ||
| 26 | +%{ | ||
| 27 | +/* Put headers and other declarations here that are needed for compilation */ | ||
| 28 | +#include "ctskymap.hpp" | ||
| 29 | +#include "GTools.hpp" | ||
| 30 | +%} | ||
| 31 | + | ||
| 32 | + | ||
| 33 | +/***********************************************************************//** | ||
| 34 | + * @class ctskymap | ||
| 35 | + * | ||
| 36 | + * @brief CTA sky mapping tool interface defintion | ||
| 37 | + ***************************************************************************/ | ||
| 38 | +class ctskymap : public GApplication { | ||
| 39 | +public: | ||
| 40 | + // Constructors and destructors | ||
| 41 | + ctskymap(void); | ||
| 42 | + explicit ctskymap(GObservations obs); | ||
| 43 | + ctskymap(int argc, char *argv[]); | ||
| 44 | + ctskymap(const ctskymap& app); | ||
| 45 | + virtual ~ctskymap(void); | ||
| 46 | + | ||
| 47 | + // Methods | ||
| 48 | + void clear(void); | ||
| 49 | + void execute(void); | ||
| 50 | + void run(void); | ||
| 51 | + void save(void); | ||
| 52 | + GObservations& obs(void); | ||
| 53 | + GSkymap& skymap(void); | ||
| 54 | + void get_parameters(void); | ||
| 55 | + void init_map(GCTAObservation* obs); | ||
| 56 | + void map_events(GCTAObservation* obs); | ||
| 57 | +}; | ||
| 58 | + | ||
| 59 | + | ||
| 60 | +/***********************************************************************//** | ||
| 61 | + * @brief CTA sky mapping tool Python extension | ||
| 62 | + ***************************************************************************/ | ||
| 63 | +%extend ctskymap { | ||
| 64 | + ctskymap copy() { | ||
| 65 | + return (*self); | ||
| 66 | + } | ||
| 67 | +} |