35 #define G_READ "GModelSpatialRadial::read(GXmlElement&)"
36 #define G_WRITE "GModelSpatialRadial::write(GXmlElement&)"
134 if (
this != &model) {
175 const bool& gradients)
const
181 double value =
eval(theta, photon.
energy(), photon.
time(), gradients);
double dec_deg(void) const
Returns Declination in degrees.
double m_last_lon
Last longitude.
const std::string & name(void) const
Return parameter name.
double gradient(void) const
Return parameter gradient.
void write(GXmlElement &xml) const
Set or update parameter attributes in XML element.
Abstract radial spatial model base class interface definition.
void copy_members(const GModelSpatialRadial &model)
Copy class members.
virtual GModelSpatial & operator=(const GModelSpatial &model)
Assignment operator.
GModelSpatialRadial(void)
Void constructor.
void init_members(void)
Initialise class members.
Class that handles photons.
const double & scale(void) const
Return parameter scale.
virtual ~GModelSpatialRadial(void)
Destructor.
virtual double eval(const double &theta, const GEnergy &energy, const GTime &time, const bool &gradients=false) const =0
bool has_grad(void) const
Signal if parameter gradient is computed analytically.
GSkyDir m_dir
Sky direction representing parameters.
const GSkyDir & dir(void) const
Return position of radial spatial model.
void free_members(void)
Delete class members.
std::vector< GModelPar * > m_pars
Parameter pointers.
void fix(void)
Fix a parameter.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
virtual void read(const GXmlElement &xml)
Read model from XML element.
void clear(void)
Clear parameter.
double m_last_lat
Last latitude.
double ra_deg(void) const
Returns Right Ascension in degrees.
const GTime & time(void) const
Return photon time.
bool is_celestial(void) const
Check if model holds celestial coordinates.
std::string type(void) const
Return model type.
void radec_deg(const double &ra, const double &dec)
Set equatorial sky direction (degrees)
bool xml_has_par(const GXmlElement &xml, const std::string &name)
Checks if parameter with given name in XML element exists.
virtual void write(GXmlElement &xml) const
Write model into XML element.
virtual GModelSpatialRadial & operator=(const GModelSpatialRadial &model)
Assignment operator.
void clear(void)
Clear sky direction.
GModelPar m_lat
Declination or Galactic latitude (deg)
void read(const GXmlElement &xml)
Extract parameter attributes from XML element.
double value(void) const
Return parameter value.
GModelPar m_lon
Right Ascension or Galactic longitude (deg)
const std::string & unit(void) const
Return parameter unit.
void lb_deg(const double &l, const double &b)
Set galactic sky direction (degrees)
const GEnergy & energy(void) const
Return photon energy.
Exception handler interface definition.
double dist(const GSkyDir &dir) const
Compute angular distance between sky directions in radians.
Abstract spatial model base class.
Abstract radial spatial model base class.
double l_deg(void) const
Return galactic longitude in degrees.
double b_deg(void) const
Returns galactic latitude in degrees.
const GSkyDir & dir(void) const
Return photon sky direction.
const GXmlElement * xml_get_par(const std::string &origin, const GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
void xml_check_type(const std::string &origin, GXmlElement &xml, const std::string &type)
Checks the model type.