GammaLib
2.1.0.dev
|
Pulsar ephemeris class. More...
#include <GPulsarEphemeris.hpp>
Public Member Functions | |
GPulsarEphemeris (void) | |
Void constructor. More... | |
GPulsarEphemeris (const GPulsarEphemeris &ephemeris) | |
Copy constructor. More... | |
virtual | ~GPulsarEphemeris (void) |
Destructor. More... | |
GPulsarEphemeris & | operator= (const GPulsarEphemeris &ephemeris) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear Pulsar ephemeris. More... | |
virtual GPulsarEphemeris * | clone (void) const |
Clone Pulsar ephemeris. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const |
Print Pulsar ephemeris. More... | |
const std::string & | name (void) const |
Returns pulsar name. More... | |
void | name (const std::string &name) |
Set pulsar name. More... | |
const GSkyDir & | dir (void) const |
Returns pulsar sky direction. More... | |
void | dir (const GSkyDir &dir) |
Set pulsar sky direction. More... | |
const GTime & | tstart (void) const |
Returns validity start time. More... | |
void | tstart (const GTime &tstart) |
Set validity start time. More... | |
const GTime & | tstop (void) const |
Returns validity stop time. More... | |
void | tstop (const GTime &tstop) |
Set validity stop time. More... | |
const std::string & | timesys (void) const |
Returns pulsar ephemeris time system. More... | |
void | timesys (const std::string ×ys) |
Set pulsar ephemeris time system. More... | |
GTime | t0 (void) const |
Returns reference epoch of pulsar ephemeris. More... | |
void | t0 (const GTime &t0) |
Set reference epoch of pulsar ephemeris. More... | |
double | phase (void) const |
Returns pulse phase. More... | |
void | phase (const double &phase) |
Set pulse phase. More... | |
double | f0 (void) const |
Returns pulsar frequency (Hz) More... | |
void | f0 (const double &f0) |
Set pulsar frequency (Hz) More... | |
double | f1 (void) const |
Returns pulsar frequency derivative (s^-2) More... | |
void | f1 (const double &f1) |
Set pulsar frequency derivative (s^-2) More... | |
double | f2 (void) const |
Returns pulsar second frequency derivative (s^-3) More... | |
void | f2 (const double &f2) |
Set pulsar second frequency derivative (s^-3) More... | |
double | phase (const GTime &time, const std::string ×ys) const |
Returns pulsar phase. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GPulsarEphemeris &ephemeris) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Attributes | |
std::string | m_name |
Pulsar name. More... | |
GTime | m_tstart |
Validity start time. More... | |
GTime | m_tstop |
Validity stop time. More... | |
GSkyDir | m_dir |
Pulsar sky direction. More... | |
std::string | m_timesys |
Time system of pulsar ephemeris. More... | |
GTime | m_t0 |
Reference epoch of pulsar ephemeris. More... | |
double | m_phase |
Pulse phase. More... | |
double | m_f0 |
Pulsar frequency (Hz) More... | |
double | m_f1 |
Pulsar frequency derivative (s^-2) More... | |
double | m_f2 |
Pulsar second frequency derivative (s^-3) More... | |
Pulsar ephemeris class.
This class implements an ephemeris for a pulsar.
Definition at line 48 of file GPulsarEphemeris.hpp.
GPulsarEphemeris::GPulsarEphemeris | ( | void | ) |
Void constructor.
Definition at line 53 of file GPulsarEphemeris.cpp.
References init_members().
Referenced by clone().
GPulsarEphemeris::GPulsarEphemeris | ( | const GPulsarEphemeris & | ephemeris | ) |
Copy constructor.
[in] | ephemeris | Pulsar ephemeris. |
Definition at line 68 of file GPulsarEphemeris.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 115 of file GPulsarEphemeris.hpp.
|
virtual |
Clear Pulsar ephemeris.
Implements GBase.
Definition at line 136 of file GPulsarEphemeris.cpp.
References free_members(), and init_members().
|
virtual |
Clone Pulsar ephemeris.
Implements GBase.
Definition at line 154 of file GPulsarEphemeris.cpp.
References GPulsarEphemeris().
|
protected |
Copy class members.
[in] | ephemeris | Pulsar ephemeris. |
Definition at line 320 of file GPulsarEphemeris.cpp.
References m_dir, m_f0, m_f1, m_f2, m_name, m_phase, m_t0, m_timesys, m_tstart, and m_tstop.
Referenced by GPulsarEphemeris(), and operator=().
|
inline |
Returns pulsar sky direction.
Definition at line 153 of file GPulsarEphemeris.hpp.
References m_dir.
Referenced by GCOMDri::compute_dre(), dir(), GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), and GPulsar::load_psrtime().
|
inline |
Set pulsar sky direction.
[in] | dir | Pulsar sky direction. |
Definition at line 166 of file GPulsarEphemeris.hpp.
|
inline |
Returns pulsar frequency (Hz)
Definition at line 311 of file GPulsarEphemeris.hpp.
References m_f0.
Referenced by f0(), GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), and print().
|
inline |
Set pulsar frequency (Hz)
[in] | f0 | Pulsar frequency (Hz). |
Definition at line 323 of file GPulsarEphemeris.hpp.
|
inline |
Returns pulsar frequency derivative (s^-2)
Definition at line 336 of file GPulsarEphemeris.hpp.
References m_f1.
Referenced by f1(), GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), and print().
|
inline |
Set pulsar frequency derivative (s^-2)
[in] | f1 | Pulsar frequency derivative (s^-2). |
Definition at line 348 of file GPulsarEphemeris.hpp.
|
inline |
Returns pulsar second frequency derivative (s^-3)
Definition at line 361 of file GPulsarEphemeris.hpp.
References m_f2.
Referenced by f2(), GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), and print().
|
inline |
Set pulsar second frequency derivative (s^-3)
[in] | f2 | Pulsar second frequency derivative (s^-3). |
Definition at line 373 of file GPulsarEphemeris.hpp.
|
protected |
Delete class members.
Definition at line 342 of file GPulsarEphemeris.cpp.
Referenced by clear(), operator=(), and ~GPulsarEphemeris().
|
protected |
Initialise class members.
Definition at line 296 of file GPulsarEphemeris.cpp.
References GSkyDir::clear(), GTime::clear(), m_dir, m_f0, m_f1, m_f2, m_name, m_phase, m_t0, m_timesys, m_tstart, and m_tstop.
Referenced by clear(), GPulsarEphemeris(), and operator=().
|
inline |
Returns pulsar name.
Definition at line 127 of file GPulsarEphemeris.hpp.
References m_name.
Referenced by GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), and name().
|
inline |
Set pulsar name.
[in] | name | Pulsar name. |
Definition at line 140 of file GPulsarEphemeris.hpp.
GPulsarEphemeris & GPulsarEphemeris::operator= | ( | const GPulsarEphemeris & | ephemeris | ) |
Assignment operator.
[in] | ephemeris | Pulsar ephemeris. |
Definition at line 106 of file GPulsarEphemeris.cpp.
References copy_members(), free_members(), and init_members().
|
inline |
Returns pulse phase.
Definition at line 286 of file GPulsarEphemeris.hpp.
References m_phase.
Referenced by GCOMDri::compute_dre(), GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_psrtime(), phase(), and print().
|
inline |
Set pulse phase.
[in] | phase | Pulse phase. |
Definition at line 298 of file GPulsarEphemeris.hpp.
double GPulsarEphemeris::phase | ( | const GTime & | time, |
const std::string & | timesys | ||
) | const |
Returns pulsar phase.
[in] | time | Time. |
[in] | timesys | Time system of time to be used for evaluation. |
Computes
\[ \Phi(t) = \Phi_0 + f(t-t_0) + \frac{1}{2}\dot{f} (t-t_0)^2 + \frac{1}{6}\ddot{f} (t-t_0)^3 \]
where \(t\) is the specified time
in seconds, \(t_0\) is a reference time in seconds, \(\Phi_0\) is the phase at the reference time, \(f\) is the variation frequency at the reference time, \(\dot{f}\) is the first derivative of the variation frequency at the reference time, and \(\dot{f}\) is the second derivative of the variation frequency at the reference time.
The phase \(\Phi(t)\) is in the interval [0,1].
Definition at line 186 of file GPulsarEphemeris.cpp.
References m_f0, m_f1, m_f2, m_phase, m_t0, m_timesys, phase(), and GTime::secs().
Print Pulsar ephemeris.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 213 of file GPulsarEphemeris.cpp.
References GSkyDir::dec_deg(), f0(), f1(), f2(), m_dir, m_name, m_timesys, gammalib::parformat(), phase(), GSkyDir::ra_deg(), SILENT, gammalib::str(), t0(), tstart(), and tstop().
|
inline |
Returns reference epoch of pulsar ephemeris.
Definition at line 261 of file GPulsarEphemeris.hpp.
References m_t0.
Referenced by GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), print(), and t0().
|
inline |
Set reference epoch of pulsar ephemeris.
[in] | t0 | Reference epoch of pulsar ephemeris. |
Definition at line 273 of file GPulsarEphemeris.hpp.
|
inline |
Returns pulsar ephemeris time system.
The pulsar ephemeris time system is one of "TT", "TAI" or "UTC".
Definition at line 233 of file GPulsarEphemeris.hpp.
References m_timesys.
Referenced by GPulsar::load_psrtime(), and timesys().
|
inline |
Set pulsar ephemeris time system.
[in] | timesys | Pulsar ephemeris time system. |
The pulsar ephemeris time system is one of "TT", "TAI" or "UTC".
Definition at line 248 of file GPulsarEphemeris.hpp.
|
inline |
Returns validity start time.
Definition at line 179 of file GPulsarEphemeris.hpp.
References m_tstart.
Referenced by GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), print(), and tstart().
|
inline |
Set validity start time.
[in] | tstart | Validity start time. |
Definition at line 192 of file GPulsarEphemeris.hpp.
|
inline |
Returns validity stop time.
Definition at line 205 of file GPulsarEphemeris.hpp.
References m_tstop.
Referenced by GPulsar::load_fermi(), GPulsar::load_integral(), GPulsar::load_parfile(), GPulsar::load_psrtime(), print(), and tstop().
|
inline |
Set validity stop time.
[in] | tstop | Validity stop time. |
Definition at line 218 of file GPulsarEphemeris.hpp.
|
protected |
Pulsar sky direction.
Definition at line 99 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), dir(), init_members(), and print().
|
protected |
Pulsar frequency (Hz)
Definition at line 103 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), f0(), init_members(), and phase().
|
protected |
Pulsar frequency derivative (s^-2)
Definition at line 104 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), f1(), init_members(), and phase().
|
protected |
Pulsar second frequency derivative (s^-3)
Definition at line 105 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), f2(), init_members(), and phase().
|
protected |
Pulsar name.
Definition at line 96 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), name(), and print().
|
protected |
Pulse phase.
Definition at line 102 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), and phase().
|
protected |
Reference epoch of pulsar ephemeris.
Definition at line 101 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), phase(), and t0().
|
protected |
Time system of pulsar ephemeris.
Definition at line 100 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), phase(), print(), and timesys().
|
protected |
Validity start time.
Definition at line 97 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), and tstart().
|
protected |
Validity stop time.
Definition at line 98 of file GPulsarEphemeris.hpp.
Referenced by copy_members(), init_members(), and tstop().