ctools 2.1.0.dev
Loading...
Searching...
No Matches
ctphase.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * ctphase - Append phase information to CTA events file *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2017-2022 by Joshua Cardenzana *
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 ctphase.hpp
23 * @brief Event phase computation tool interface definition
24 * @author Joshua Cardenzana
25 */
26
27#ifndef CTPHASE_HPP
28#define CTPHASE_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <vector>
32#include <string>
33#include "GammaLib.hpp"
34#include "GCTALib.hpp"
35#include "ctobservation.hpp"
36
37/* __Definitions _________________________________________________________ */
38#define CTPHASE_NAME "ctphase"
39
40
41/***********************************************************************//**
42 * @class ctphase
43 *
44 * @brief Event phase computation tool
45 *
46 * Computes the phase of each event using a temporal phase curve model
47 ***************************************************************************/
48class ctphase : public ctobservation {
49
50public:
51 // Constructors and destructors
52 ctphase(void);
53 explicit ctphase(const GObservations& obs);
54 ctphase(int argc, char *argv[]);
55 ctphase(const ctphase& app);
56 virtual ~ctphase(void);
57
58 // Operators
59 ctphase& operator=(const ctphase& app);
60
61 // Methods
62 void clear(void);
63 void process(void);
64 void save(void);
65 void publish(const std::string& name = "");
66
67protected:
68 // Protected methods
69 void init_members(void);
70 void copy_members(const ctphase& app);
71 void free_members(void);
72 void get_parameters(void);
73 void phase_events(GCTAObservation* obs);
74
75 // Protected members
76 GModelTemporalPhaseCurve m_phase; //!< Phase curve model
77};
78
79
80#endif /* CTPHASE_HPP */
Base class for observation tools.
const GObservations & obs(void) const
Return observation container.
Event phase computation tool.
Definition ctphase.hpp:48
ctphase & operator=(const ctphase &app)
Assignment operator.
Definition ctphase.cpp:144
void phase_events(GCTAObservation *obs)
Compute event phase for an observation.
Definition ctphase.cpp:503
void copy_members(const ctphase &app)
Copy class members.
Definition ctphase.cpp:371
void publish(const std::string &name="")
Publish event lists.
Definition ctphase.cpp:298
void process(void)
Process the ctprob tool.
Definition ctphase.cpp:209
virtual ~ctphase(void)
Destructor.
Definition ctphase.cpp:122
void get_parameters(void)
Get application parameters.
Definition ctphase.cpp:397
ctphase(void)
Void constructor.
Definition ctphase.cpp:53
void init_members(void)
Initialise class members.
Definition ctphase.cpp:356
void save(void)
Save the output event list(s)
Definition ctphase.cpp:273
void free_members(void)
Delete class members.
Definition ctphase.cpp:384
GModelTemporalPhaseCurve m_phase
Phase curve model.
Definition ctphase.hpp:76
void clear(void)
Clear ctphase tool.
Definition ctphase.cpp:179
Observation tool base class interface definition.