35 #define G_READ "GModelSpatialElliptical::read(GXmlElement&)"
36 #define G_WRITE "GModelSpatialElliptical::write(GXmlElement&)"
133 if (
this != &model) {
174 const bool& gradients)
const
178 double theta =
dir().
dist(srcDir);
182 double value =
eval(theta, posang, photon.
energy(), photon.
time(), gradients);
GModelPar m_semimajor
Semi-major axis of ellipse (deg)
virtual void write(GXmlElement &xml) const
Write model into XML element.
void free_members(void)
Delete class members.
double dec_deg(void) const
Returns Declination in degrees.
Abstract elliptical spatial model base class.
const std::string & name(void) const
Return parameter name.
GModelPar m_lon
Right Ascension or Galactic longitude (deg)
double m_last_lat
Last latitude.
double m_last_lon
Last longitude.
double gradient(void) const
Return parameter gradient.
void write(GXmlElement &xml) const
Set or update parameter attributes in XML element.
virtual GModelSpatialElliptical & operator=(const GModelSpatialElliptical &model)
Assignment operator.
const GSkyDir & dir(void) const
Return position of elliptical spatial model.
virtual GModelSpatial & operator=(const GModelSpatial &model)
Assignment operator.
GModelPar m_posangle
Position angle from North, counterclockwise (deg)
double min(void) const
Return parameter minimum boundary.
void init_members(void)
Initialise class members.
Class that handles photons.
const double & scale(void) const
Return parameter scale.
GModelSpatialElliptical(void)
Void constructor.
virtual ~GModelSpatialElliptical(void)
Destructor.
bool has_grad(void) const
Signal if parameter gradient is computed analytically.
bool is_celestial(void) const
Check if model holds celestial coordinates.
void free(void)
Free a parameter.
std::vector< GModelPar * > m_pars
Parameter pointers.
void fix(void)
Fix a parameter.
void copy_members(const GModelSpatialElliptical &model)
Copy class members.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
void clear(void)
Clear parameter.
double ra_deg(void) const
Returns Right Ascension in degrees.
const GTime & time(void) const
Return photon time.
virtual void read(const GXmlElement &xml)
Read model from XML element.
GModelPar m_semiminor
Semi-minor axis of ellipse (deg)
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.
Abstract elliptical spatial model base class interface definition.
double posang(const GSkyDir &dir, const std::string &coordsys="CEL") const
Compute position angle between sky directions in radians.
void clear(void)
Clear sky direction.
void read(const GXmlElement &xml)
Extract parameter attributes from XML element.
double value(void) const
Return parameter value.
GModelPar m_lat
Declination or Galactic latitude (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.
GSkyDir m_dir
Sky direction representing parameters.
Exception handler interface definition.
double dist(const GSkyDir &dir) const
Compute angular distance between sky directions in radians.
Abstract spatial model base class.
double l_deg(void) const
Return galactic longitude in degrees.
double b_deg(void) const
Returns galactic latitude in degrees.
virtual double eval(const double &theta, const double &posangle, const GEnergy &energy, const GTime &time, const bool &gradients=false) const =0
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.