From 9a7025ac6f0b2bdc9dcd971cf3dade69c908e111 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Fri, 21 Dec 2012 22:38:31 +0100 Subject: [PATCH] Add ctskymap Python interface. --- pyext/ctools.i | 1 + pyext/ctskymap.i | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 pyext/ctskymap.i diff --git a/pyext/ctools.i b/pyext/ctools.i index 4880856..bf3074d 100755 --- a/pyext/ctools.i +++ b/pyext/ctools.i @@ -45,3 +45,4 @@ %include "ctlike.i" %include "ctmodel.i" %include "ctselect.i" +%include "ctskymap.i" diff --git a/pyext/ctskymap.i b/pyext/ctskymap.i new file mode 100644 index 0000000..1b7a77d --- /dev/null +++ b/pyext/ctskymap.i @@ -0,0 +1,67 @@ +/*************************************************************************** + * ctskymap - CTA sky mapping tool * + * ----------------------------------------------------------------------- * + * copyright (C) 2012 by Juergen Knoedlseder * + * ----------------------------------------------------------------------- * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + * * + ***************************************************************************/ +/** + * @file ctskymap.i + * @brief CTA sky mapping tool definition + * @author Juergen Knoedlseder + */ +%{ +/* Put headers and other declarations here that are needed for compilation */ +#include "ctskymap.hpp" +#include "GTools.hpp" +%} + + +/***********************************************************************//** + * @class ctskymap + * + * @brief CTA sky mapping tool interface defintion + ***************************************************************************/ +class ctskymap : public GApplication { +public: + // Constructors and destructors + ctskymap(void); + explicit ctskymap(GObservations obs); + ctskymap(int argc, char *argv[]); + ctskymap(const ctskymap& app); + virtual ~ctskymap(void); + + // Methods + void clear(void); + void execute(void); + void run(void); + void save(void); + GObservations& obs(void); + GSkymap& skymap(void); + void get_parameters(void); + void init_map(GCTAObservation* obs); + void map_events(GCTAObservation* obs); +}; + + +/***********************************************************************//** + * @brief CTA sky mapping tool Python extension + ***************************************************************************/ +%extend ctskymap { + ctskymap copy() { + return (*self); + } +} -- libgit2 0.21.4