GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GWcsAZP.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GWcsAZP.hpp - Zenithal/azimuthal perspective (AZP) projection class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2011-2015 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 GWcsAZP.hpp
23  * @brief Zenithal/azimuthal perspective (AZP) projection class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GWCSAZP_HPP
28 #define GWCSAZP_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GWcs.hpp"
33 
34 
35 /***********************************************************************//**
36  * @class GWcsAZP
37  *
38  * @brief Zenithal/azimuthal perspective (AZP) projection class definition
39  *
40  * This class implements the "zenithal/azimuthal perspective" projection for
41  * the World Coordinate System.
42  ***************************************************************************/
43 class GWcsAZP : public GWcs {
44 
45 public:
46  // Constructors and destructors
47  GWcsAZP(void);
48  GWcsAZP(const std::string& coords,
49  const double& crval1, const double& crval2,
50  const double& crpix1, const double& crpix2,
51  const double& cdelt1, const double& cdelt2);
52  GWcsAZP(const GWcsAZP& wcs);
53  virtual ~GWcsAZP(void);
54 
55  // Operators
56  GWcsAZP& operator=(const GWcsAZP& wcs);
57 
58  // Implemented pure virtual base class methods
59  virtual void clear(void);
60  virtual GWcsAZP* clone(void) const;
61  virtual std::string classname(void) const;
62  virtual std::string code(void) const;
63  virtual std::string name(void) const;
64  virtual std::string print(const GChatter& chatter = NORMAL) const;
65 
66 private:
67  // Private methods
68  void init_members(void);
69  void copy_members(const GWcsAZP& wcs);
70  void free_members(void);
71  void prj_set(void) const;
72  void prj_x2s(int nx, int ny, int sxy, int spt,
73  const double* x, const double* y,
74  double* phi, double* theta, int* stat) const;
75  void prj_s2x(int nphi, int ntheta, int spt, int sxy,
76  const double* phi, const double* theta,
77  double* x, double* y, int* stat) const;
78 };
79 
80 
81 /***********************************************************************//**
82  * @brief Return class name
83  *
84  * @return String containing the class name ("GWcsAZP").
85  ***************************************************************************/
86 inline
87 std::string GWcsAZP::classname(void) const
88 {
89  return ("GWcsAZP");
90 }
91 
92 
93 /***********************************************************************//**
94  * @brief Return projection code
95  *
96  * @return Projection code.
97  *
98  * Returns the projection code "AZP".
99  ***************************************************************************/
100 inline
101 std::string GWcsAZP::code(void) const
102 {
103  return "AZP";
104 }
105 
106 
107 /***********************************************************************//**
108  * @brief Return projection name
109  *
110  * @return Projection name.
111  *
112  * Returns the projection name.
113  ***************************************************************************/
114 inline
115 std::string GWcsAZP::name(void) const
116 {
117  return "zenithal/azimuthal perspective";
118 }
119 
120 #endif /* GWCSAZP_HPP */
virtual ~GWcsAZP(void)
Destructor.
Definition: GWcsAZP.cpp:127
Zenithal/azimuthal perspective (AZP) projection class definition.
Definition: GWcsAZP.hpp:43
GWcsAZP(void)
Void constructor.
Definition: GWcsAZP.cpp:67
void prj_s2x(int nphi, int ntheta, int spt, int sxy, const double *phi, const double *theta, double *x, double *y, int *stat) const
Generic spherical-to-pixel projection.
Definition: GWcsAZP.cpp:495
virtual std::string print(const GChatter &chatter=NORMAL) const
Print WCS information.
Definition: GWcsAZP.cpp:219
GWcsAZP & operator=(const GWcsAZP &wcs)
Assignment operator.
Definition: GWcsAZP.cpp:149
void prj_x2s(int nx, int ny, int sxy, int spt, const double *x, const double *y, double *phi, double *theta, int *stat) const
Pixel-to-spherical deprojection.
Definition: GWcsAZP.cpp:376
GChatter
Definition: GTypemaps.hpp:33
void prj_set(void) const
Setup of projection.
Definition: GWcsAZP.cpp:308
virtual std::string classname(void) const
Return class name.
Definition: GWcsAZP.hpp:87
void free_members(void)
Delete class members.
Definition: GWcsAZP.cpp:271
virtual std::string name(void) const
Return projection name.
Definition: GWcsAZP.hpp:115
Abstract world coordinate system base class.
Definition: GWcs.hpp:51
virtual std::string code(void) const
Return projection code.
Definition: GWcsAZP.hpp:101
virtual void clear(void)
Clear instance.
Definition: GWcsAZP.cpp:184
void init_members(void)
Initialise class members.
Definition: GWcsAZP.cpp:249
virtual GWcsAZP * clone(void) const
Clone instance.
Definition: GWcsAZP.cpp:206
void copy_members(const GWcsAZP &wcs)
Copy class members.
Definition: GWcsAZP.cpp:261
Abstract world coordinate system base class definition.