Commit 6d02c0353535a3614675fc17eaef62a22348c426

Authored by Michael Mayer
2 parents 47fc1d82 1cae6d5c

Merge branch '1706-composite-models' of https://cta-gitlab.irap.omp.eu/mmayer/ga…

…mmalib into 1706-composite-models
src/model/GModelSpatialComposite.cpp
... ... @@ -64,7 +64,7 @@ const GModelSpatialRegistry g_spatial_comp_registry(&g_spatial_comp_seed);
64 64 /***********************************************************************//**
65 65 * @brief Void constructor
66 66 *
67   - * Constructs empty point source model.
  67 + * Constructs empty spatial composite model.
68 68 ***************************************************************************/
69 69 GModelSpatialComposite::GModelSpatialComposite(void) : GModelSpatial()
70 70 {
... ... @@ -82,7 +82,7 @@ GModelSpatialComposite::GModelSpatialComposite(void) : GModelSpatial()
82 82 * @param[in] dummy Dummy flag.
83 83 * @param[in] type Model type.
84 84 *
85   - * Constructs empty point source model by specifying a model @p type.
  85 + * Constructs empty spatial composite model by specifying a model @p type.
86 86 ***************************************************************************/
87 87 GModelSpatialComposite::GModelSpatialComposite(const bool& dummy,
88 88 const std::string& type) :
... ... @@ -103,7 +103,7 @@ GModelSpatialComposite::GModelSpatialComposite(const bool& dummy,
103 103 *
104 104 * @param[in] xml XML element.
105 105 *
106   - * Construct a point source spatial model by extracting information from an
  106 + * Construct a spatial composite model by extracting information from an
107 107 * XML element. See the read() method for more information about the expected
108 108 * structure of the XML element.
109 109 ***************************************************************************/
... ... @@ -162,8 +162,8 @@ GModelSpatialComposite::~GModelSpatialComposite(void)
162 162 /***********************************************************************//**
163 163 * @brief Assignment operator
164 164 *
165   - * @param[in] model Point source spatial model.
166   - * @return Point source spatial model.
  165 + * @param[in] model Spatial composite model.
  166 + * @return Spatial composite model.
167 167 ***************************************************************************/
168 168 GModelSpatialComposite& GModelSpatialComposite::operator=(const GModelSpatialComposite& model)
169 169 {
... ... @@ -196,7 +196,7 @@ GModelSpatialComposite& GModelSpatialComposite::operator=(const GModelSpatialCom
196 196 ==========================================================================*/
197 197  
198 198 /***********************************************************************//**
199   - * @brief Clear point source model
  199 + * @brief Clear spatial composite model
200 200 ***************************************************************************/
201 201 void GModelSpatialComposite::clear(void)
202 202 {
... ... @@ -214,9 +214,9 @@ void GModelSpatialComposite::clear(void)
214 214  
215 215  
216 216 /***********************************************************************//**
217   - * @brief Clone point source model
  217 + * @brief Clone spatial composite model
218 218 *
219   - * @return Pointer to deep copy of point source model.
  219 + * @return Pointer to deep copy of spatial composite model.
220 220 ***************************************************************************/
221 221 GModelSpatialComposite* GModelSpatialComposite::clone(void) const
222 222 {
... ... @@ -232,14 +232,9 @@ GModelSpatialComposite* GModelSpatialComposite::clone(void) const
232 232 * @param[in] gradients Compute gradients?
233 233 * @return Model value.
234 234 *
235   - * Evaluates the spatial part for a point source model. It implements a delta
236   - * function with respect to the coordinates of the source. For numerical
237   - * reasons, a certain tolerance is accepted (typically 0.1 arcsec, i.e. well
238   - * below the angular resolution of gamma-ray telescopes).
  235 + * Evaluates the spatial part for all model components and returns
  236 + * the normalised sum.
239 237 *
240   - * The method will not compute analytical parameter gradients, even if the
241   - * @p gradients argument is set to true. Point source parameter gradients
242   - * need to be computed numerically.
243 238 ***************************************************************************/
244 239 double GModelSpatialComposite::eval(const GPhoton& photon,
245 240 const bool& gradients) const
... ... @@ -269,9 +264,8 @@ double GModelSpatialComposite::eval(const GPhoton& photon,
269 264 * @param[in,out] ran Random number generator.
270 265 * @return Sky direction.
271 266 *
272   - * Draws an arbitrary sky direction for the point source model. As the point
273   - * source is a point in the sky, the methods always returns the directon of
274   - * the point source.
  267 + * Draws an arbitrary model component and an arbitrary direction from that
  268 + * component.
275 269 ***************************************************************************/
276 270 GSkyDir GModelSpatialComposite::mc(const GEnergy& energy,
277 271 const GTime& time,
... ... @@ -305,8 +299,8 @@ GSkyDir GModelSpatialComposite::mc(const GEnergy& energy,
305 299 * @param[in] margin Margin to be added to sky direction (degrees)
306 300 * @return True if the model contains the sky direction.
307 301 *
308   - * Signals whether a sky direction is contained in the point source
309   - * model.
  302 + * Signals whether a sky direction is contained in one of the
  303 + * model components.
310 304 ***************************************************************************/
311 305 bool GModelSpatialComposite::contains(const GSkyDir& dir,
312 306 const double& margin) const
... ... @@ -573,7 +567,7 @@ std::string GModelSpatialComposite::print(const GChatter& chatter) const
573 567  
574 568  
575 569 /***********************************************************************//**
576   - * @brief Returns spatial component element
  570 + * @brief Returns pointer to spatial component element
577 571 *
578 572 * @param[in] index Index of spatial component.
579 573 * @return Spatial model.
... ...