GammaLib 2.0.0
Loading...
Searching...
No Matches
GModelSpatialRadialProfileGauss.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GModelSpatialRadialProfileGauss.hpp - Gaussian radial profile class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2016-2020 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 GModelSpatialRadialProfileGauss.hpp
23 * @brief Radial Gaussian profile model class interface definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GMODELSPATIALRADIALPROFILEGAUSS_HPP
28#define GMODELSPATIALRADIALPROFILEGAUSS_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
33#include "GModelPar.hpp"
34
35/* __ Forward declaration ________________________________________________ */
36class GXmlElement;
37
38
39/**************************************************************************
40 * @class GModelSpatialRadialProfileGauss
41 *
42 * @brief Radial Gaussian profile source model class
43 *
44 * This class implements the spatial component of the factorised source
45 * model for a Gaussian radial profile.
46 ***************************************************************************/
48
49public:
50 // Constructors and destructors
53 GModelSpatialRadialProfileGauss(const GSkyDir& dir, const double& sigma);
56
57 // Operators
59
60 // Implemented pure virtual base class methods
61 virtual void clear(void);
62 virtual GModelSpatialRadialProfileGauss* clone(void) const;
63 virtual std::string classname(void) const;
64 virtual double theta_min(void) const;
65 virtual double theta_max(void) const;
66 virtual void read(const GXmlElement& xml);
67 virtual void write(GXmlElement& xml) const;
68 virtual std::string print(const GChatter& chatter = NORMAL) const;
69
70 // Other methods
71 double sigma(void) const;
72 void sigma(const double& sigma);
73
74protected:
75 // Protected methods
76 void init_members(void);
78 void free_members(void);
79 virtual double profile_value(const double& theta) const;
80
81 // Protected members
82 GModelPar m_sigma; //!< Gaussian width (deg)
83};
84
85
86/***********************************************************************//**
87 * @brief Return class name
88 *
89 * @return String containing the class name ("GModelSpatialRadialProfileGauss").
90 ***************************************************************************/
91inline
93{
94 return ("GModelSpatialRadialProfileGauss");
95}
96
97
98/***********************************************************************//**
99 * @brief Return Gaussian sigma
100 *
101 * @return Gaussian sigma (degrees).
102 *
103 * Returns the Gaussian sigma in degrees.
104 ***************************************************************************/
105inline
107{
108 return (m_sigma.value());
109}
110
111
112/***********************************************************************//**
113 * @brief Set Gaussian sigma
114 *
115 * @param[in] sigma Gaussian sigma (degrees).
116 *
117 * Sets the Gaussian sigma in degrees.
118 ***************************************************************************/
119inline
121{
123 return;
124}
125
126
127#endif /* GMODELSPATIALRADIALPROFILEGAUSS_HPP */
Model parameter class interface definition.
Radial profile model class interface definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Model parameter class.
Definition GModelPar.hpp:87
void copy_members(const GModelSpatialRadialProfileGauss &model)
Copy class members.
virtual double theta_max(void) const
Return maximum model radius (in radians)
virtual void write(GXmlElement &xml) const
Write model into XML element.
virtual GModelSpatialRadialProfileGauss & operator=(const GModelSpatialRadialProfileGauss &model)
Assignment operator.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
virtual std::string classname(void) const
Return class name.
virtual void read(const GXmlElement &xml)
Read model from XML element.
virtual void clear(void)
Clear radial Gaussian profile model.
void init_members(void)
Initialise class members.
double sigma(void) const
Return Gaussian sigma.
virtual GModelSpatialRadialProfileGauss * clone(void) const
Clone radial Gaussian profile model.
virtual double profile_value(const double &theta) const
Radial profile.
virtual double theta_min(void) const
Return maximum model radius (in radians)
const GSkyDir & dir(void) const
Return position of radial spatial model.
double value(void) const
Return parameter value.
Sky direction class.
Definition GSkyDir.hpp:62
XML element node class.