27#ifndef GMODELTEMPORALPHASECURVE_HPP
28#define GMODELTEMPORALPHASECURVE_HPP
88 const double&
norm = 1.0,
97 virtual void clear(
void);
99 virtual std::string
classname(
void)
const;
100 virtual std::string
type(
void)
const;
101 virtual double eval(
const GTime& srcTime,
102 const bool& gradients =
false)
const;
112 double norm(
void)
const;
116 double phase(
void)
const;
120 double f0(
void)
const;
121 void f0(
const double&
f0);
122 double f1(
void)
const;
123 void f1(
const double&
f1);
124 double f2(
void)
const;
125 void f2(
const double&
f2);
162 return (
"GModelTemporalPhaseCurve");
176 return (
"PhaseCurve");
Filename class interface definition.
Model parameter class interface definition.
Abstract temporal model base class interface definition.
Node array class interface definition.
Time class interface definition.
double norm(const GVector &vector)
Computes vector norm.
Temporal phase curve model class.
virtual std::string classname(void) const
Return class name.
virtual double eval(const GTime &srcTime, const bool &gradients=false) const
Evaluate function.
virtual GModelTemporalPhaseCurve & operator=(const GModelTemporalPhaseCurve &model)
Assignment operator.
virtual GModelTemporalPhaseCurve * clone(void) const
Clone phase curve.
GModelPar m_mjd
Reference MJD.
void normalize_nodes(void)
Normalise nodes.
bool normalize(void) const
Return normalization flag.
double f1(void) const
Return first frequency derivative at reference Modified Julian Day.
GModelPar m_norm
Normalization factor.
bool m_normalize
Normalize phase curve (default: true)
virtual void read(const GXmlElement &xml)
Read model from XML element.
void copy_members(const GModelTemporalPhaseCurve &model)
Copy class members.
GFilename m_filename
Name of phase file function.
double norm(void) const
Return normalization factor.
double f0(void) const
Return frequency at reference Modified Julian Day.
GModelPar m_phase
Phase at reference MJD.
virtual std::string type(void) const
Return model type.
double f2(void) const
Return second frequency derivative at reference Modified Julian Day.
virtual ~GModelTemporalPhaseCurve(void)
Destructor.
GModelPar m_f2
Second freq. derivative at reference MJD.
double m_scale
Scale factor due to normalization.
std::vector< double > m_values
Function values at nodes.
virtual GTimes mc(const double &rate, const GTime &tmin, const GTime &tmax, GRan &ran) const
Return vector of random event times.
GNodeArray m_nodes
Phase values of nodes.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print phase curve information.
void free_members(void)
Delete class members.
GModelPar m_f1
First freq. derivative at reference MJD.
GModelTemporalPhaseCurve(void)
Void constructor.
double value(const double &phase) const
Evaluate phase curve value for a given phase.
void load_nodes(const GFilename &filename)
Load nodes from file.
virtual void write(GXmlElement &xml) const
Write model into XML element.
GModelPar m_f0
Frequency at reference MJD.
bool m_has_normalize
XML has normalize attribute.
virtual void clear(void)
Clear phase curve.
void init_members(void)
Initialise class members.
double phase(void) const
Return phase at reference Modified Julian Day.
GTime mjd(void) const
Return reference Modified Julian Day.
const GFilename & filename(void) const
Return file name.
Abstract temporal model base class.
double value(void) const
Return parameter value.
Random number generator class.
double mjd(void) const
Return time in Modified Julian Days (TT)