GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GPulsarEphemeris Class Reference

Pulsar ephemeris class. More...

#include <GPulsarEphemeris.hpp>

Inheritance diagram for GPulsarEphemeris:
GBase

Public Member Functions

 GPulsarEphemeris (void)
 Void constructor. More...
 
 GPulsarEphemeris (const GPulsarEphemeris &ephemeris)
 Copy constructor. More...
 
virtual ~GPulsarEphemeris (void)
 Destructor. More...
 
GPulsarEphemerisoperator= (const GPulsarEphemeris &ephemeris)
 Assignment operator. More...
 
virtual void clear (void)
 Clear Pulsar ephemeris. More...
 
virtual GPulsarEphemerisclone (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 GSkyDirdir (void) const
 Returns pulsar sky direction. More...
 
void dir (const GSkyDir &dir)
 Set pulsar sky direction. More...
 
const GTimetstart (void) const
 Returns validity start time. More...
 
void tstart (const GTime &tstart)
 Set validity start time. More...
 
const GTimetstop (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 &timesys)
 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 &timesys) 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...
 

Detailed Description

Pulsar ephemeris class.

This class implements an ephemeris for a pulsar.

Definition at line 48 of file GPulsarEphemeris.hpp.

Constructor & Destructor Documentation

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.

Parameters
[in]ephemerisPulsar ephemeris.

Definition at line 68 of file GPulsarEphemeris.cpp.

References copy_members(), and init_members().

GPulsarEphemeris::~GPulsarEphemeris ( void  )
virtual

Destructor.

Definition at line 84 of file GPulsarEphemeris.cpp.

References free_members().

Member Function Documentation

std::string GPulsarEphemeris::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GPulsarEphemeris").

Implements GBase.

Definition at line 115 of file GPulsarEphemeris.hpp.

void GPulsarEphemeris::clear ( void  )
virtual

Clear Pulsar ephemeris.

Implements GBase.

Definition at line 136 of file GPulsarEphemeris.cpp.

References free_members(), and init_members().

GPulsarEphemeris * GPulsarEphemeris::clone ( void  ) const
virtual

Clone Pulsar ephemeris.

Returns
Pointer to deep copy of Pulsar ephemeris.

Implements GBase.

Definition at line 154 of file GPulsarEphemeris.cpp.

References GPulsarEphemeris().

void GPulsarEphemeris::copy_members ( const GPulsarEphemeris ephemeris)
protected

Copy class members.

Parameters
[in]ephemerisPulsar 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=().

const GSkyDir & GPulsarEphemeris::dir ( void  ) const
inline

Returns pulsar sky direction.

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().

void GPulsarEphemeris::dir ( const GSkyDir dir)
inline

Set pulsar sky direction.

Parameters
[in]dirPulsar sky direction.

Definition at line 166 of file GPulsarEphemeris.hpp.

References dir(), and m_dir.

double GPulsarEphemeris::f0 ( void  ) const
inline

Returns pulsar frequency (Hz)

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().

void GPulsarEphemeris::f0 ( const double &  f0)
inline

Set pulsar frequency (Hz)

Parameters
[in]f0Pulsar frequency (Hz).

Definition at line 323 of file GPulsarEphemeris.hpp.

References f0(), and m_f0.

double GPulsarEphemeris::f1 ( void  ) const
inline

Returns pulsar frequency derivative (s^-2)

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().

void GPulsarEphemeris::f1 ( const double &  f1)
inline

Set pulsar frequency derivative (s^-2)

Parameters
[in]f1Pulsar frequency derivative (s^-2).

Definition at line 348 of file GPulsarEphemeris.hpp.

References f1(), and m_f1.

double GPulsarEphemeris::f2 ( void  ) const
inline

Returns pulsar second frequency derivative (s^-3)

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().

void GPulsarEphemeris::f2 ( const double &  f2)
inline

Set pulsar second frequency derivative (s^-3)

Parameters
[in]f2Pulsar second frequency derivative (s^-3).

Definition at line 373 of file GPulsarEphemeris.hpp.

References f2(), and m_f2.

void GPulsarEphemeris::free_members ( void  )
protected

Delete class members.

Definition at line 342 of file GPulsarEphemeris.cpp.

Referenced by clear(), operator=(), and ~GPulsarEphemeris().

void GPulsarEphemeris::init_members ( void  )
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=().

const std::string & GPulsarEphemeris::name ( void  ) const
inline

Returns pulsar name.

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().

void GPulsarEphemeris::name ( const std::string &  name)
inline

Set pulsar name.

Parameters
[in]namePulsar name.

Definition at line 140 of file GPulsarEphemeris.hpp.

References m_name, and name().

GPulsarEphemeris & GPulsarEphemeris::operator= ( const GPulsarEphemeris ephemeris)

Assignment operator.

Parameters
[in]ephemerisPulsar ephemeris.
Returns
Pulsar ephemeris.

Definition at line 106 of file GPulsarEphemeris.cpp.

References copy_members(), free_members(), and init_members().

double GPulsarEphemeris::phase ( void  ) const
inline

Returns pulse phase.

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().

void GPulsarEphemeris::phase ( const double &  phase)
inline

Set pulse phase.

Parameters
[in]phasePulse phase.

Definition at line 298 of file GPulsarEphemeris.hpp.

References m_phase, and phase().

double GPulsarEphemeris::phase ( const GTime time,
const std::string &  timesys 
) const

Returns pulsar phase.

Parameters
[in]timeTime.
[in]timesysTime system of time to be used for evaluation.
Returns
Pulsar phase.

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().

std::string GPulsarEphemeris::print ( const GChatter chatter = NORMAL) const
virtual

Print Pulsar ephemeris.

Parameters
[in]chatterChattiness.
Returns
String containing Pulsar ephemeris information.

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().

GTime GPulsarEphemeris::t0 ( void  ) const
inline

Returns reference epoch of pulsar ephemeris.

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().

void GPulsarEphemeris::t0 ( const GTime t0)
inline

Set reference epoch of pulsar ephemeris.

Parameters
[in]t0Reference epoch of pulsar ephemeris.

Definition at line 273 of file GPulsarEphemeris.hpp.

References m_t0, and t0().

const std::string & GPulsarEphemeris::timesys ( void  ) const
inline

Returns pulsar ephemeris time system.

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().

void GPulsarEphemeris::timesys ( const std::string &  timesys)
inline

Set pulsar ephemeris time system.

Parameters
[in]timesysPulsar ephemeris time system.

The pulsar ephemeris time system is one of "TT", "TAI" or "UTC".

Definition at line 248 of file GPulsarEphemeris.hpp.

References m_timesys, and timesys().

const GTime & GPulsarEphemeris::tstart ( void  ) const
inline

Returns validity start time.

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().

void GPulsarEphemeris::tstart ( const GTime tstart)
inline

Set validity start time.

Parameters
[in]tstartValidity start time.

Definition at line 192 of file GPulsarEphemeris.hpp.

References m_tstart, and tstart().

const GTime & GPulsarEphemeris::tstop ( void  ) const
inline

Returns validity stop time.

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().

void GPulsarEphemeris::tstop ( const GTime tstop)
inline

Set validity stop time.

Parameters
[in]tstopValidity stop time.

Definition at line 218 of file GPulsarEphemeris.hpp.

References m_tstop, and tstop().

Member Data Documentation

GSkyDir GPulsarEphemeris::m_dir
protected

Pulsar sky direction.

Definition at line 99 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), dir(), init_members(), and print().

double GPulsarEphemeris::m_f0
protected

Pulsar frequency (Hz)

Definition at line 103 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), f0(), init_members(), and phase().

double GPulsarEphemeris::m_f1
protected

Pulsar frequency derivative (s^-2)

Definition at line 104 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), f1(), init_members(), and phase().

double GPulsarEphemeris::m_f2
protected

Pulsar second frequency derivative (s^-3)

Definition at line 105 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), f2(), init_members(), and phase().

std::string GPulsarEphemeris::m_name
protected

Pulsar name.

Definition at line 96 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), name(), and print().

double GPulsarEphemeris::m_phase
protected

Pulse phase.

Definition at line 102 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), and phase().

GTime GPulsarEphemeris::m_t0
protected

Reference epoch of pulsar ephemeris.

Definition at line 101 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), phase(), and t0().

std::string GPulsarEphemeris::m_timesys
protected

Time system of pulsar ephemeris.

Definition at line 100 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), phase(), print(), and timesys().

GTime GPulsarEphemeris::m_tstart
protected

Validity start time.

Definition at line 97 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), and tstart().

GTime GPulsarEphemeris::m_tstop
protected

Validity stop time.

Definition at line 98 of file GPulsarEphemeris.hpp.

Referenced by copy_members(), init_members(), and tstop().


The documentation for this class was generated from the following files: