Commit b15072d40736495cd47f5fde78033eb020ff108b
1 parent
f40f8814
add isptsource() and remove dep...() methods
Showing
2 changed files
with
7 additions
and
11 deletions
include/GModelSpatial.hpp
| ... | ... | @@ -29,10 +29,10 @@ |
| 29 | 29 | * |
| 30 | 30 | * @brief Abstract interface definition for the spatial model class. |
| 31 | 31 | * |
| 32 | - * This class implements the spatial component of the factorized source | |
| 33 | - * model. | |
| 34 | - * The depdir(), depeng(), and deptime() methods specify whether the spatial | |
| 35 | - * models depends on the srcDir, srcEng, and srcTime parameters. | |
| 32 | + * This class implements the spatial component of the factorized gamma-ray | |
| 33 | + * source model. Typical examples of spatial components are a point source | |
| 34 | + * or an intensity map. The method isptsource() signals of the spatial | |
| 35 | + * model is indeed a point source. | |
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | class GModelSpatial { |
| 38 | 38 | |
| ... | ... | @@ -41,7 +41,7 @@ class GModelSpatial { |
| 41 | 41 | |
| 42 | 42 | public: |
| 43 | 43 | // Constructors and destructors |
| 44 | - GModelSpatial(void); | |
| 44 | + explicit GModelSpatial(void); | |
| 45 | 45 | GModelSpatial(const GModelSpatial& model); |
| 46 | 46 | virtual ~GModelSpatial(); |
| 47 | 47 | |
| ... | ... | @@ -53,9 +53,7 @@ public: |
| 53 | 53 | virtual GModelPar* par(int index) const = 0; |
| 54 | 54 | virtual double eval(const GSkyDir& srcDir) = 0; |
| 55 | 55 | virtual double eval_gradients(const GSkyDir& srcDir) = 0; |
| 56 | - virtual bool depdir(void) const = 0; | |
| 57 | - virtual bool depeng(void) const = 0; | |
| 58 | - virtual bool deptime(void) const = 0; | |
| 56 | + virtual bool isptsource(void) const { return false; } | |
| 59 | 57 | |
| 60 | 58 | protected: |
| 61 | 59 | // Protected methods | ... | ... |
include/GModelSpatialPtsrc.hpp
| ... | ... | @@ -54,9 +54,7 @@ public: |
| 54 | 54 | GModelPar* par(int index) const; |
| 55 | 55 | double eval(const GSkyDir& srcDir); |
| 56 | 56 | double eval_gradients(const GSkyDir& srcDir); |
| 57 | - bool depdir(void) const { return false; } | |
| 58 | - bool depeng(void) const { return true; } | |
| 59 | - bool deptime(void) const { return true; } | |
| 57 | + bool isptsource(void) const { return true; } | |
| 60 | 58 | double ra(void) const { return m_ra.real_value(); } |
| 61 | 59 | double dec(void) const { return m_dec.real_value(); } |
| 62 | 60 | ... | ... |