ctools 2.1.0.dev
Loading...
Searching...
No Matches
ctmapcube.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * ctmapcube - Map cube generation tool *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2016-2022 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 ctmapcube.hpp
23 * @brief Map cube generation tool definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef CTMAPCUBE_HPP
28#define CTMAPCUBE_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include "GammaLib.hpp"
32#include "GCTALib.hpp"
33#include "ctool.hpp"
34
35/* __Definitions _________________________________________________________ */
36#define CTMAPCUBE_NAME "ctmapcube"
37
38
39/***********************************************************************//**
40 * @class ctmapcube
41 *
42 * @brief Map cube generation tool
43 ***************************************************************************/
44class ctmapcube : public ctool {
45
46public:
47 // Constructors and destructors
48 ctmapcube(void);
49 ctmapcube(int argc, char *argv[]);
50 ctmapcube(const ctmapcube& app);
51 virtual ~ctmapcube(void);
52
53 // Operators
54 ctmapcube& operator=(const ctmapcube& app);
55
56 // Methods
57 void clear(void);
58 void process(void);
59 void save(void);
60 void publish(const std::string& name = "");
61 const GModelSpatialDiffuseCube& mapcube(void) const;
62 void models(const GModels& models);
63
64protected:
65 // Protected methods
66 void init_members(void);
67 void copy_members(const ctmapcube& app);
68 void free_members(void);
69 void get_parameters(void);
70 void create_cube(void);
71 void add_model(GModelSky* model);
72 void add_ptsrc_model(GModelSky* model);
73 void get_bounding_circle(GModelSky* model,
74 GSkyDir* dir,
75 double* radius) const;
76
77 // User parameters
78 GFilename m_outcube; //!< Output map cube filename
79 double m_ptsrcsig; //!< Point source sigma (arcmin)
80 bool m_publish; //!< Publish map cube?
81 GChatter m_chatter; //!< Chattiness
82
83 // Protected members
84 GModels m_models; //!< Model container
85 GModelSpatialDiffuseCube m_cube; //!< Map cube
86};
87
88
89/***********************************************************************//**
90 * @brief Return map cube
91 *
92 * @return Map cube
93 ***************************************************************************/
94inline
95const GModelSpatialDiffuseCube& ctmapcube::mapcube(void) const
96{
97 return (m_cube);
98}
99
100
101/***********************************************************************//**
102 * @brief Set models
103 *
104 * @param[in] models Model container.
105 *
106 * Set model container to be used for map cube generation.
107 ***************************************************************************/
108inline
109void ctmapcube::models(const GModels& models)
110{
112 return;
113}
114
115#endif /* CTMAPCUBE_HPP */
Map cube generation tool.
Definition ctmapcube.hpp:44
void models(const GModels &models)
Set models.
void save(void)
Save map cube.
const GModelSpatialDiffuseCube & mapcube(void) const
Return map cube.
Definition ctmapcube.hpp:95
void init_members(void)
Initialise class members.
void get_bounding_circle(GModelSky *model, GSkyDir *dir, double *radius) const
Get bounding circle for a sky model.
ctmapcube(void)
Void constructor.
Definition ctmapcube.cpp:53
void create_cube(void)
Generate map cube.
GChatter m_chatter
Chattiness.
Definition ctmapcube.hpp:81
GFilename m_outcube
Output map cube filename.
Definition ctmapcube.hpp:78
void clear(void)
Clear ctmapcube tool.
void add_ptsrc_model(GModelSky *model)
Add one point source model to map cube.
void publish(const std::string &name="")
Publish map cube.
ctmapcube & operator=(const ctmapcube &app)
Assignment operator.
void copy_members(const ctmapcube &app)
Copy class members.
GModels m_models
Model container.
Definition ctmapcube.hpp:84
double m_ptsrcsig
Point source sigma (arcmin)
Definition ctmapcube.hpp:79
GModelSpatialDiffuseCube m_cube
Map cube.
Definition ctmapcube.hpp:85
void add_model(GModelSky *model)
Add one model to map cube.
void process(void)
Generate map cube.
bool m_publish
Publish map cube?
Definition ctmapcube.hpp:80
void get_parameters(void)
Get application parameters.
virtual ~ctmapcube(void)
Destructor.
void free_members(void)
Delete class members.
Base class for ctools.
Definition ctool.hpp:50
ctool base class implementation