Commit 73d88ce10fdd7864eb8bf073379b2ea6c1b74b97

Authored by Jürgen Knödlseder
1 parent 245240c5

Adapt to new GModelPar interface.

The GModelPar interface has been revisited and the code has been adapted to satisfy the new interface.
Showing 49 changed files with 555 additions and 383 deletions
include/GModelPar.hpp
... ... @@ -89,7 +89,7 @@ class GModelPar : public GBase {
89 89 public:
90 90 // Constructors and destructors
91 91 GModelPar(void);
92   - explicit GModelPar(const std::string& name, const double& value, int i);
  92 + explicit GModelPar(const std::string& name, const double& value);
93 93 explicit GModelPar(const std::string& name, const double& factor, const double& scale);
94 94 GModelPar(const GModelPar& par);
95 95 virtual ~GModelPar(void);
... ... @@ -98,60 +98,60 @@ public:
98 98 GModelPar& operator=(const GModelPar& par);
99 99  
100 100 // Attribute methods
101   - double Value(void) const;
102   - double Error(void) const { return m_factor_error*m_scale; }
103   - double Gradient(void) const { return m_factor_gradient*m_scale; }
104   - double Min(void) const { return m_factor_min*m_scale; }
105   - double Max(void) const { return m_factor_max*m_scale; }
106   - void Value(const double& value);
107   - void Error(const double& error);
108   - void Gradient(const double& gradient);
109   - void Min(const double& min);
110   - void Max(const double& max);
111   - void Range(const double& min, const double& max);
  101 + double value(void) const;
  102 + double error(void) const;
  103 + double gradient(void) const;
  104 + double min(void) const;
  105 + double max(void) const;
  106 + void value(const double& value);
  107 + void error(const double& error);
  108 + void gradient(const double& gradient);
  109 + void min(const double& min);
  110 + void max(const double& max);
  111 + void range(const double& min, const double& max);
112 112  
113 113 // Factorization methods
114   - const double& factor_value(void) const { return m_factor_value; }
115   - const double& factor_error(void) const { return m_factor_error; }
116   - const double& factor_gradient(void) const { return m_factor_gradient; }
117   - const double& factor_min(void) const { return m_factor_min; }
118   - const double& factor_max(void) const { return m_factor_max; }
119   - const double& scale(void) const { return m_scale; }
  114 + const double& factor_value(void) const;
  115 + const double& factor_error(void) const;
  116 + const double& factor_gradient(void) const;
  117 + const double& factor_min(void) const;
  118 + const double& factor_max(void) const;
  119 + const double& scale(void) const;
120 120 void factor_value(const double& value);
121   - void factor_error(const double& error) { m_factor_error=error; }
122   - void factor_gradient(const double& gradient) { m_factor_gradient=gradient; }
  121 + void factor_error(const double& error);
  122 + void factor_gradient(const double& gradient);
123 123 void factor_min(const double& min);
124 124 void factor_max(const double& max);
125 125 void factor_range(const double& min, const double& max);
126   - void Scale(const double& scale);
  126 + void scale(const double& scale);
127 127  
128 128 // Boundary methods
129   - bool hasmin(void) const { return m_hasmin; }
130   - bool hasmax(void) const { return m_hasmax; }
131   - bool hasrange(void) const { return m_hasmin && m_hasmax; }
132   - void remove_min(void) { m_hasmin=false; }
133   - void remove_max(void) { m_hasmax=false; }
134   - void remove_range(void) { m_hasmin=false; m_hasmax=false; }
  129 + bool hasmin(void) const { return m_hasmin; }
  130 + bool hasmax(void) const { return m_hasmax; }
  131 + bool hasrange(void) const { return m_hasmin && m_hasmax; }
  132 + void remove_min(void) { m_hasmin=false; }
  133 + void remove_max(void) { m_hasmax=false; }
  134 + void remove_range(void) { m_hasmin=false; m_hasmax=false; }
135 135  
136 136 // Property methods
137   - bool isfree(void) const { return m_free; }
138   - bool isfixed(void) const { return !m_free; }
139   - bool hasgrad(void) const { return m_hasgrad; }
140   - void free(void) { m_free=true; }
141   - void fix(void) { m_free=false; }
142   - void hasgrad(const bool& grad) { m_hasgrad=grad; }
  137 + bool isfree(void) const { return m_free; }
  138 + bool isfixed(void) const { return !m_free; }
  139 + bool hasgrad(void) const { return m_hasgrad; }
  140 + void free(void) { m_free=true; }
  141 + void fix(void) { m_free=false; }
  142 + void hasgrad(const bool& grad) { m_hasgrad=grad; }
143 143  
144 144 // Other methods
145   - void clear(void);
146   - GModelPar* clone(void) const;
147   - std::string name(void) const { return m_name; }
148   - std::string unit(void) const { return m_unit; }
149   - void name(const std::string& name) { m_name=name; }
150   - void unit(const std::string& unit) { m_unit=unit; }
151   - void autoscale(void);
152   - void read(const GXmlElement& xml);
153   - void write(GXmlElement& xml) const;
154   - std::string print(void) const;
  145 + void clear(void);
  146 + GModelPar* clone(void) const;
  147 + const std::string& name(void) const { return m_name; }
  148 + const std::string& unit(void) const { return m_unit; }
  149 + void name(const std::string& name) { m_name=name; }
  150 + void unit(const std::string& unit) { m_unit=unit; }
  151 + void autoscale(void);
  152 + void read(const GXmlElement& xml);
  153 + void write(GXmlElement& xml) const;
  154 + std::string print(void) const;
155 155  
156 156 protected:
157 157 // Protected methods
... ... @@ -178,14 +178,189 @@ protected:
178 178 /***********************************************************************//**
179 179 * @brief Return parameter value
180 180 *
181   - * @return True parameter value.
  181 + * @return Parameter value.
182 182 *
183   - * Returns the true parameter value
  183 + * Returns the parameter value. The parameter value is computed by
  184 + * multiplying the value factor by the scale factor.
184 185 ***************************************************************************/
185 186 inline
186   -double GModelPar::Value(void) const
  187 +double GModelPar::value(void) const
187 188 {
188   - return (m_factor_value*m_scale);
  189 + return (m_factor_value * m_scale);
  190 +}
  191 +
  192 +
  193 +/***********************************************************************//**
  194 + * @brief Return parameter error
  195 + *
  196 + * @return Parameter error.
  197 + *
  198 + * Returns the parameter error. The parameter error is computed by
  199 + * multiplying the error factor by the scale factor.
  200 + ***************************************************************************/
  201 +inline
  202 +double GModelPar::error(void) const
  203 +{
  204 + return (m_factor_error * m_scale);
  205 +}
  206 +
  207 +
  208 +/***********************************************************************//**
  209 + * @brief Return parameter gradient
  210 + *
  211 + * @return Parameter gradient.
  212 + *
  213 + * Returns the parameter gradient. The parameter gradient is computed by
  214 + * multiplying the gradient factor by the scale factor.
  215 + ***************************************************************************/
  216 +inline
  217 +double GModelPar::gradient(void) const
  218 +{
  219 + return (m_factor_gradient * m_scale);
  220 +}
  221 +
  222 +
  223 +/***********************************************************************//**
  224 + * @brief Return parameter minimum boundary
  225 + *
  226 + * @return Parameter minimum boundary.
  227 + *
  228 + * Returns the parameter minimum boundary. The parameter minimum boundary is
  229 + * computed by multiplying the minimum boundary factor by the scale factor.
  230 + ***************************************************************************/
  231 +inline
  232 +double GModelPar::min(void) const
  233 +{
  234 + return (m_factor_min * m_scale);
  235 +}
  236 +
  237 +
  238 +/***********************************************************************//**
  239 + * @brief Return parameter maximum boundary
  240 + *
  241 + * @return Parameter maximum boundary.
  242 + *
  243 + * Returns the parameter maximum boundary. The parameter maximum boundary is
  244 + * computed by multiplying the maximum boundary factor by the scale factor.
  245 + ***************************************************************************/
  246 +inline
  247 +double GModelPar::max(void) const
  248 +{
  249 + return (m_factor_max * m_scale);
  250 +}
  251 +
  252 +
  253 +/***********************************************************************//**
  254 + * @brief Return parameter value factor
  255 + *
  256 + * @return Parameter value factor.
  257 + *
  258 + * Returns the parameter value factor.
  259 + ***************************************************************************/
  260 +inline
  261 +const double& GModelPar::factor_value(void) const
  262 +{
  263 + return (m_factor_value);
  264 +}
  265 +
  266 +
  267 +/***********************************************************************//**
  268 + * @brief Return parameter error factor
  269 + *
  270 + * @return Parameter error factor.
  271 + *
  272 + * Returns the parameter error factor.
  273 + ***************************************************************************/
  274 +inline
  275 +const double& GModelPar::factor_error(void) const
  276 +{
  277 + return (m_factor_error);
  278 +}
  279 +
  280 +
  281 +/***********************************************************************//**
  282 + * @brief Return parameter gradient factor
  283 + *
  284 + * @return Parameter gradient factor.
  285 + *
  286 + * Returns the parameter gradient factor.
  287 + ***************************************************************************/
  288 +inline
  289 +const double& GModelPar::factor_gradient(void) const
  290 +{
  291 + return (m_factor_gradient);
  292 +}
  293 +
  294 +
  295 +/***********************************************************************//**
  296 + * @brief Return parameter minimum boundary factor
  297 + *
  298 + * @return Parameter minimum boundary factor.
  299 + *
  300 + * Returns the parameter minimum boundary factor.
  301 + ***************************************************************************/
  302 +inline
  303 +const double& GModelPar::factor_min(void) const
  304 +{
  305 + return (m_factor_min);
  306 +}
  307 +
  308 +
  309 +/***********************************************************************//**
  310 + * @brief Return parameter maximum boundary factor
  311 + *
  312 + * @return Parameter maximum boundary factor.
  313 + *
  314 + * Returns the parameter maximum boundary factor.
  315 + ***************************************************************************/
  316 +inline
  317 +const double& GModelPar::factor_max(void) const
  318 +{
  319 + return (m_factor_max);
  320 +}
  321 +
  322 +
  323 +/***********************************************************************//**
  324 + * @brief Return parameter scale
  325 + *
  326 + * @return Parameter scale factor.
  327 + *
  328 + * Returns the parameter scale factor.
  329 + ***************************************************************************/
  330 +inline
  331 +const double& GModelPar::scale(void) const
  332 +{
  333 + return (m_scale);
  334 +}
  335 +
  336 +
  337 +/***********************************************************************//**
  338 + * @brief Set parameter error factor
  339 + *
  340 + * @param[in] Parameter error factor.
  341 + *
  342 + * Sets the parameter error factor.
  343 + ***************************************************************************/
  344 +inline
  345 +void GModelPar::factor_error(const double& error)
  346 +{
  347 + m_factor_error = error;
  348 + return;
  349 +}
  350 +
  351 +
  352 +/***********************************************************************//**
  353 + * @brief Set parameter gradient factor
  354 + *
  355 + * @param[in] Parameter gradient factor.
  356 + *
  357 + * Sets the parameter gradient factor.
  358 + ***************************************************************************/
  359 +inline
  360 +void GModelPar::factor_gradient(const double& gradient)
  361 +{
  362 + m_factor_gradient = gradient;
  363 + return;
189 364 }
190 365  
191 366 #endif /* GMODELPAR_HPP */
... ...
include/GModelSpatialElliptical.hpp
... ... @@ -77,12 +77,12 @@ public:
77 77 virtual void write(GXmlElement& xml) const;
78 78  
79 79 // Other methods
80   - double ra(void) const { return m_ra.Value(); }
81   - double dec(void) const { return m_dec.Value(); }
82   - double posangle(void) const { return m_posangle.Value(); }
  80 + double ra(void) const { return m_ra.value(); }
  81 + double dec(void) const { return m_dec.value(); }
  82 + double posangle(void) const { return m_posangle.value(); }
83 83 GSkyDir dir(void) const;
84 84 void dir(const GSkyDir& dir);
85   - void posangle(const double& posangle) { m_posangle.Value(posangle); }
  85 + void posangle(const double& posangle) { m_posangle.value(posangle); }
86 86  
87 87 protected:
88 88 // Protected methods
... ...
include/GModelSpatialEllipticalDisk.hpp
... ... @@ -75,10 +75,10 @@ public:
75 75 virtual std::string print(void) const;
76 76  
77 77 // Other methods
78   - double semiminor(void) const { return m_semiminor.Value(); }
79   - double semimajor(void) const { return m_semimajor.Value(); }
80   - void semiminor(const double& semiminor) { m_semiminor.Value(semiminor); }
81   - void semimajor(const double& semimajor) { m_semimajor.Value(semimajor); }
  78 + double semiminor(void) const { return m_semiminor.value(); }
  79 + double semimajor(void) const { return m_semimajor.value(); }
  80 + void semiminor(const double& semiminor) { m_semiminor.value(semiminor); }
  81 + void semimajor(const double& semimajor) { m_semimajor.value(semimajor); }
82 82  
83 83 protected:
84 84 // Protected methods
... ...
include/GModelSpatialPointSource.hpp
... ... @@ -71,8 +71,8 @@ public:
71 71 virtual std::string print(void) const;
72 72  
73 73 // Other methods
74   - double ra(void) const { return m_ra.Value(); }
75   - double dec(void) const { return m_dec.Value(); }
  74 + double ra(void) const { return m_ra.value(); }
  75 + double dec(void) const { return m_dec.value(); }
76 76 GSkyDir dir(void) const;
77 77 void dir(const GSkyDir& dir);
78 78  
... ...
include/GModelSpatialRadial.hpp
... ... @@ -75,8 +75,8 @@ public:
75 75 virtual void write(GXmlElement& xml) const;
76 76  
77 77 // Other methods
78   - double ra(void) const { return m_ra.Value(); }
79   - double dec(void) const { return m_dec.Value(); }
  78 + double ra(void) const { return m_ra.value(); }
  79 + double dec(void) const { return m_dec.value(); }
80 80 GSkyDir dir(void) const;
81 81 void dir(const GSkyDir& dir);
82 82  
... ...
include/GModelSpatialRadialDisk.hpp
... ... @@ -70,8 +70,8 @@ public:
70 70 virtual std::string print(void) const;
71 71  
72 72 // Other methods
73   - double radius(void) const { return m_radius.Value(); }
74   - void radius(const double& radius) { m_radius.Value(radius); }
  73 + double radius(void) const { return m_radius.value(); }
  74 + void radius(const double& radius) { m_radius.value(radius); }
75 75  
76 76 protected:
77 77 // Protected methods
... ...
include/GModelSpatialRadialGauss.hpp
... ... @@ -69,8 +69,8 @@ public:
69 69 virtual std::string print(void) const;
70 70  
71 71 // Other methods
72   - double sigma(void) const { return m_sigma.Value(); }
73   - void sigma(const double& sigma) { m_sigma.Value(sigma); }
  72 + double sigma(void) const { return m_sigma.value(); }
  73 + void sigma(const double& sigma) { m_sigma.value(sigma); }
74 74  
75 75 protected:
76 76 // Protected methods
... ...
include/GModelSpatialRadialShell.hpp
... ... @@ -82,11 +82,11 @@ public:
82 82 virtual std::string print(void) const;
83 83  
84 84 // Other methods
85   - double radius(void) const { return m_radius.Value(); }
86   - double width(void) const { return m_width.Value(); }
  85 + double radius(void) const { return m_radius.value(); }
  86 + double width(void) const { return m_width.value(); }
87 87 bool small_angle(void) const { return m_small_angle; }
88   - void radius(const double& radius) { m_radius.Value(radius); }
89   - void width(const double& width) { m_width.Value(width); }
  88 + void radius(const double& radius) { m_radius.value(radius); }
  89 + void width(const double& width) { m_width.value(width); }
90 90 void small_angle(const bool& small_angle) { m_small_angle = small_angle; }
91 91  
92 92 protected:
... ...
include/GModelSpectralConst.hpp
... ... @@ -72,7 +72,7 @@ public:
72 72 virtual std::string print(void) const;
73 73  
74 74 // Other methods
75   - double norm(void) const { return m_norm.Value(); }
  75 + double norm(void) const { return m_norm.value(); }
76 76  
77 77 protected:
78 78 // Protected methods
... ...
include/GModelSpectralExpPlaw.hpp
... ... @@ -77,10 +77,10 @@ public:
77 77 virtual std::string print(void) const;
78 78  
79 79 // Other methods
80   - double norm(void) const { return m_norm.Value(); }
81   - double index(void) const { return m_index.Value(); }
82   - double ecut(void) const { return m_ecut.Value(); }
83   - double pivot(void) const { return m_pivot.Value(); }
  80 + double norm(void) const { return m_norm.value(); }
  81 + double index(void) const { return m_index.value(); }
  82 + double ecut(void) const { return m_ecut.value(); }
  83 + double pivot(void) const { return m_pivot.value(); }
84 84  
85 85 protected:
86 86 // Protected methods
... ...
include/GModelSpectralFunc.hpp
... ... @@ -75,7 +75,7 @@ public:
75 75 virtual std::string print(void) const;
76 76  
77 77 // Other methods
78   - double norm(void) const { return m_norm.Value(); }
  78 + double norm(void) const { return m_norm.value(); }
79 79  
80 80 protected:
81 81 // Protected methods
... ...
include/GModelSpectralLogParabola.hpp
... ... @@ -85,10 +85,10 @@ public:
85 85 virtual std::string print(void) const;
86 86  
87 87 // Other methods
88   - double norm(void) const { return m_norm.Value(); }
89   - double index(void) const { return m_index.Value(); }
90   - double curvature(void) const { return m_curvature.Value(); }
91   - double pivot(void) const { return m_pivot.Value(); }
  88 + double norm(void) const { return m_norm.value(); }
  89 + double index(void) const { return m_index.value(); }
  90 + double curvature(void) const { return m_curvature.value(); }
  91 + double pivot(void) const { return m_pivot.value(); }
92 92  
93 93 protected:
94 94 // Protected methods
... ...
include/GModelSpectralPlaw.hpp
... ... @@ -76,9 +76,9 @@ public:
76 76 virtual std::string print(void) const;
77 77  
78 78 // Other methods
79   - double norm(void) const { return m_norm.Value(); }
80   - double index(void) const { return m_index.Value(); }
81   - double pivot(void) const { return m_pivot.Value(); }
  79 + double norm(void) const { return m_norm.value(); }
  80 + double index(void) const { return m_index.value(); }
  81 + double pivot(void) const { return m_pivot.value(); }
82 82  
83 83 protected:
84 84 // Protected methods
... ...
include/GModelSpectralPlaw2.hpp
... ... @@ -79,10 +79,10 @@ public:
79 79 virtual std::string print(void) const;
80 80  
81 81 // Other methods
82   - double integral(void) const { return m_integral.Value(); }
83   - double index(void) const { return m_index.Value(); }
84   - double emin(void) const { return m_emin.Value(); }
85   - double emax(void) const { return m_emax.Value(); }
  82 + double integral(void) const { return m_integral.value(); }
  83 + double index(void) const { return m_index.value(); }
  84 + double emin(void) const { return m_emin.value(); }
  85 + double emax(void) const { return m_emax.value(); }
86 86  
87 87 protected:
88 88 // Protected methods
... ...
include/GModelTemporalConst.hpp
... ... @@ -70,7 +70,7 @@ public:
70 70 virtual std::string print(void) const;
71 71  
72 72 // Other methods
73   - double norm(void) const { return m_norm.Value(); }
  73 + double norm(void) const { return m_norm.value(); }
74 74  
75 75 protected:
76 76 // Protected methods
... ...
inst/com/src/GCOMModelDRBFitting.cpp
... ... @@ -273,7 +273,7 @@ double GCOMModelDRBFitting::eval(const GEvent& event,
273 273  
274 274 // If model is a scaling factor then use the single parameter as such
275 275 if (m_scale) {
276   - scale = m_values[0].Value();
  276 + scale = m_values[0].value();
277 277 }
278 278  
279 279 // ... otherwise perform a linear interpolation
... ... @@ -289,8 +289,8 @@ double GCOMModelDRBFitting::eval(const GEvent& event,
289 289 m_nodes.set_value(phibar);
290 290  
291 291 // Get scale factor
292   - scale = m_values[m_nodes.inx_left()].Value() * m_nodes.wgt_left() +
293   - m_values[m_nodes.inx_right()].Value() * m_nodes.wgt_right();
  292 + scale = m_values[m_nodes.inx_left()].value() * m_nodes.wgt_left() +
  293 + m_values[m_nodes.inx_right()].value() * m_nodes.wgt_right();
294 294  
295 295 } // endelse: performed linear interpolation
296 296  
... ... @@ -372,7 +372,7 @@ double GCOMModelDRBFitting::eval_gradients(const GEvent& event,
372 372 if (m_scale) {
373 373  
374 374 // Get scale factor
375   - scale = m_values[0].Value();
  375 + scale = m_values[0].value();
376 376  
377 377 // Compute partial derivative
378 378 double grad = (m_values[0].isfree()) ? value * m_values[0].scale() : 0.0;
... ... @@ -401,8 +401,8 @@ double GCOMModelDRBFitting::eval_gradients(const GEvent& event,
401 401 double wgt_right = m_nodes.wgt_right();
402 402  
403 403 // Get scale factor
404   - scale = m_values[inx_left].Value() * wgt_left +
405   - m_values[inx_right].Value() * wgt_right;
  404 + scale = m_values[inx_left].value() * wgt_left +
  405 + m_values[inx_right].value() * wgt_right;
406 406  
407 407 // Gradient for left node
408 408 if (m_values[inx_left].isfree()) {
... ... @@ -893,7 +893,7 @@ void GCOMModelDRBFitting::set_cache(void) const
893 893  
894 894 // Set Phibar node array. Signal if one of the Phibar values is free
895 895 for (int i = 0; i < num; ++i) {
896   - double phibar = m_phibars[i].Value();
  896 + double phibar = m_phibars[i].value();
897 897 m_nodes.append(phibar);
898 898 m_old_phibars.push_back(phibar);
899 899 if (m_phibars[i].isfree()) {
... ... @@ -924,7 +924,7 @@ void GCOMModelDRBFitting::update_cache(void) const
924 924  
925 925 // Update Phibar values
926 926 for (int i = 0; i < num; ++i) {
927   - double phibar = m_phibars[i].Value();
  927 + double phibar = m_phibars[i].value();
928 928 if (phibar != m_old_phibars[i]) {
929 929 m_nodes[i] = phibar;
930 930 m_old_phibars[i] = phibar;
... ...
inst/com/test/test_COM.cpp
... ... @@ -611,8 +611,8 @@ void TestGCOMOptimize::test_binned_optimizer(void)
611 611 for (int k = 0; k < model->size(); ++k) {
612 612 GModelPar par = (*model)[k];
613 613 std::string msg = "Verify optimization result for " + par.print();
614   - test_value(par.Value(), fit_results[j++], 5.0e-5, msg);
615   - test_value(par.Error(), fit_results[j++], 5.0e-5, msg);
  614 + test_value(par.value(), fit_results[j++], 5.0e-5, msg);
  615 + test_value(par.error(), fit_results[j++], 5.0e-5, msg);
616 616 }
617 617 }
618 618 }
... ...
inst/cta/include/GCTAModelRadialGauss.hpp
... ... @@ -77,8 +77,8 @@ public:
77 77 virtual std::string print(void) const;
78 78  
79 79 // Other methods
80   - double sigma(void) const { return m_sigma.Value(); }
81   - void sigma(const double& sigma) { m_sigma.Value(sigma); }
  80 + double sigma(void) const { return m_sigma.value(); }
  81 + void sigma(const double& sigma) { m_sigma.value(sigma); }
82 82  
83 83 protected:
84 84 // Protected methods
... ...
inst/cta/include/GCTAModelRadialProfile.hpp
... ... @@ -79,12 +79,12 @@ public:
79 79 virtual std::string print(void) const;
80 80  
81 81 // Other methods
82   - double width(void) const { return m_width.Value(); }
83   - double core(void) const { return m_core.Value(); }
84   - double tail(void) const { return m_tail.Value(); }
85   - void width(const double& width) { m_width.Value(width); }
86   - void core(const double& core) { m_core.Value(core); }
87   - void tail(const double& tail) { m_tail.Value(tail); }
  82 + double width(void) const { return m_width.value(); }
  83 + double core(void) const { return m_core.value(); }
  84 + double tail(void) const { return m_tail.value(); }
  85 + void width(const double& width) { m_width.value(width); }
  86 + void core(const double& core) { m_core.value(core); }
  87 + void tail(const double& tail) { m_tail.value(tail); }
88 88  
89 89 protected:
90 90 // Protected methods
... ...
inst/cta/src/GCTAModelRadialGauss.cpp
... ... @@ -433,11 +433,11 @@ void GCTAModelRadialGauss::read(const GXmlElement&amp; xml)
433 433 m_sigma.read(*par);
434 434  
435 435 // Check parameter
436   - if (m_sigma.Value() <= 0.0) {
  436 + if (m_sigma.value() <= 0.0) {
437 437 throw GException::model_invalid_parvalue(G_READ, xml,
438 438 "\"Sigma\" parameter is required to be positive.");
439 439 }
440   - if (!m_sigma.hasmin() || m_sigma.Min() <= 0.0) {
  440 + if (!m_sigma.hasmin() || m_sigma.min() <= 0.0) {
441 441 throw GException::model_invalid_parlimit(G_READ, xml,
442 442 "\"Sigma\" parameter requires positive minimum boundary.");
443 443 }
... ... @@ -558,11 +558,11 @@ void GCTAModelRadialGauss::init_members(void)
558 558 m_sigma.clear();
559 559 m_sigma.name("Sigma");
560 560 m_sigma.unit("deg2");
561   - m_sigma.Value(7.71728e-8); // (1 arcsec)^2
562   - m_sigma.Min(7.71728e-8); // (1 arcsec)^2
  561 + m_sigma.value(7.71728e-8); // (1 arcsec)^2
  562 + m_sigma.min(7.71728e-8); // (1 arcsec)^2
563 563 m_sigma.free();
564   - m_sigma.Scale(1.0);
565   - m_sigma.Gradient(0.0);
  564 + m_sigma.scale(1.0);
  565 + m_sigma.gradient(0.0);
566 566 m_sigma.hasgrad(true);
567 567  
568 568 // Set parameter pointer(s)
... ...
inst/cta/src/GCTAModelRadialPolynom.cpp
... ... @@ -91,15 +91,15 @@ GCTAModelRadialPolynom::GCTAModelRadialPolynom(const std::vector&lt;double&gt;&amp; coeffs
91 91 GModelPar par;
92 92  
93 93 // Set value
94   - par.Value(coeffs[i]);
  94 + par.value(coeffs[i]);
95 95  
96 96 // Set other attributes
97 97 std::string name = "coeff"+str(i);
98 98 par.name(name);
99 99 par.unit("");
100 100 par.free();
101   - par.Scale(1.0);
102   - par.Gradient(0.0);
  101 + par.scale(1.0);
  102 + par.gradient(0.0);
103 103 par.hasgrad(true);
104 104  
105 105 // Push coefficient on list
... ... @@ -262,9 +262,9 @@ double GCTAModelRadialPolynom::eval(const double&amp; offset) const
262 262 if (ncoeffs > 0) {
263 263  
264 264 // Compute value
265   - value = m_coeffs[ncoeffs-1].Value();
  265 + value = m_coeffs[ncoeffs-1].value();
266 266 for (int i = ncoeffs-2; i >= 0; i--) {
267   - value = value * offset + m_coeffs[i].Value();
  267 + value = value * offset + m_coeffs[i].value();
268 268 }
269 269  
270 270 } // endif: there were coefficients
... ... @@ -276,7 +276,7 @@ double GCTAModelRadialPolynom::eval(const double&amp; offset) const
276 276 std::cout << "(offset=" << offset << "): NaN/Inf encountered";
277 277 std::cout << " (value=" << value;
278 278 for (int i = 0; i < ncoeffs; ++i) {
279   - std::cout << ", c" << i << "=" << m_coeffs[i].Value();
  279 + std::cout << ", c" << i << "=" << m_coeffs[i].value();
280 280 }
281 281 std::cout << ")" << std::endl;
282 282 }
... ... @@ -323,9 +323,9 @@ double GCTAModelRadialPolynom::eval_gradients(const double&amp; offset) const
323 323 if (ncoeffs > 0) {
324 324  
325 325 // Compute value
326   - value = m_coeffs[ncoeffs-1].Value();
  326 + value = m_coeffs[ncoeffs-1].value();
327 327 for (int i = ncoeffs-2; i >= 0; i--) {
328   - value = value * offset + m_coeffs[i].Value();
  328 + value = value * offset + m_coeffs[i].value();
329 329 }
330 330  
331 331 // Initialise theta^i for the first coefficient
... ... @@ -354,7 +354,7 @@ double GCTAModelRadialPolynom::eval_gradients(const double&amp; offset) const
354 354 std::cout << "(offset=" << offset << "): NaN/Inf encountered";
355 355 std::cout << " (value=" << value;
356 356 for (int i = 0; i < ncoeffs; ++i) {
357   - std::cout << ", c_" << i << "=" << m_coeffs[i].Value();
  357 + std::cout << ", c_" << i << "=" << m_coeffs[i].value();
358 358 }
359 359 std::cout << ")" << std::endl;
360 360 }
... ...
inst/cta/src/GCTAModelRadialProfile.cpp
... ... @@ -418,11 +418,11 @@ void GCTAModelRadialProfile::read(const GXmlElement&amp; xml)
418 418 // Handle Width
419 419 if (par->attribute("name") == "Width") {
420 420 m_width.read(*par);
421   - if (m_width.Value() <= 0.0) {
  421 + if (m_width.value() <= 0.0) {
422 422 throw GException::model_invalid_parvalue(G_READ, xml,
423 423 "\"Width\" parameter is required to be positive.");
424 424 }
425   - if (!m_width.hasmin() || m_width.Min() <= 0.0) {
  425 + if (!m_width.hasmin() || m_width.min() <= 0.0) {
426 426 throw GException::model_invalid_parlimit(G_READ, xml,
427 427 "\"Width\" parameter requires positive minimum boundary.");
428 428 }
... ... @@ -432,11 +432,11 @@ void GCTAModelRadialProfile::read(const GXmlElement&amp; xml)
432 432 // Handle Core
433 433 if (par->attribute("name") == "Core") {
434 434 m_core.read(*par);
435   - if (m_core.Value() <= 0.0) {
  435 + if (m_core.value() <= 0.0) {
436 436 throw GException::model_invalid_parvalue(G_READ, xml,
437 437 "\"Core\" parameter is required to be positive.");
438 438 }
439   - if (!m_core.hasmin() || m_core.Min() <= 0.0) {
  439 + if (!m_core.hasmin() || m_core.min() <= 0.0) {
440 440 throw GException::model_invalid_parlimit(G_READ, xml,
441 441 "\"Core\" parameter requires positive minimum boundary.");
442 442 }
... ... @@ -446,11 +446,11 @@ void GCTAModelRadialProfile::read(const GXmlElement&amp; xml)
446 446 // Handle Tail
447 447 if (par->attribute("name") == "Tail") {
448 448 m_tail.read(*par);
449   - if (m_tail.Value() <= 0.0) {
  449 + if (m_tail.value() <= 0.0) {
450 450 throw GException::model_invalid_parvalue(G_READ, xml,
451 451 "\"Core\" parameter is required to be positive.");
452 452 }
453   - if (!m_tail.hasmin() || m_tail.Min() <= 0.0) {
  453 + if (!m_tail.hasmin() || m_tail.min() <= 0.0) {
454 454 throw GException::model_invalid_parlimit(G_READ, xml,
455 455 "\"Core\" parameter requires positive minimum boundary.");
456 456 }
... ... @@ -584,31 +584,31 @@ void GCTAModelRadialProfile::init_members(void)
584 584 m_width.clear();
585 585 m_width.name("Width");
586 586 m_width.unit("deg");
587   - m_width.Scale(1.0);
588   - m_width.Value(1.5); // default: 1.5 deg
589   - m_width.Min(0.1); // min: 0.1 deg
  587 + m_width.scale(1.0);
  588 + m_width.value(1.5); // default: 1.5 deg
  589 + m_width.min(0.1); // min: 0.1 deg
590 590 m_width.free();
591   - m_width.Gradient(0.0);
  591 + m_width.gradient(0.0);
592 592 m_width.hasgrad(false);
593 593  
594 594 // Initialise core parameter
595 595 m_core.clear();
596 596 m_core.name("Core");
597   - m_core.Scale(1.0);
598   - m_core.Value(3.0); // default: 3.0
599   - m_core.Min(1.0); // min: 1.0 (could even be larger)
  597 + m_core.scale(1.0);
  598 + m_core.value(3.0); // default: 3.0
  599 + m_core.min(1.0); // min: 1.0 (could even be larger)
600 600 m_core.free();
601   - m_core.Gradient(0.0);
  601 + m_core.gradient(0.0);
602 602 m_core.hasgrad(false);
603 603  
604 604 // Initialise tail parameter
605 605 m_tail.clear();
606 606 m_tail.name("Tail");
607   - m_tail.Scale(1.0);
608   - m_tail.Value(5.0); // default: 5.0
609   - m_tail.Min(1.0); // min: 1.0
  607 + m_tail.scale(1.0);
  608 + m_tail.value(5.0); // default: 5.0
  609 + m_tail.min(1.0); // min: 1.0
610 610 m_tail.fix();
611   - m_tail.Gradient(0.0);
  611 + m_tail.gradient(0.0);
612 612 m_tail.hasgrad(false);
613 613  
614 614 // Set parameter pointer(s)
... ...
inst/cta/test/test_CTA.cpp
... ... @@ -529,8 +529,8 @@ void TestGCTAOptimize::test_unbinned_optimizer(void)
529 529 for (int k = 0; k < model->size(); ++k) {
530 530 GModelPar par = (*model)[k];
531 531 std::string msg = "Verify optimization result for " + par.print();
532   - test_value(par.Value(), fit_results[j++], 5.0e-5, msg);
533   - test_value(par.Error(), fit_results[j++], 5.0e-5, msg);
  532 + test_value(par.value(), fit_results[j++], 5.0e-5, msg);
  533 + test_value(par.error(), fit_results[j++], 5.0e-5, msg);
534 534 }
535 535 }
536 536 }
... ... @@ -591,8 +591,8 @@ void TestGCTAOptimize::test_binned_optimizer(void)
591 591 for (int k = 0; k < model->size(); ++k) {
592 592 GModelPar par = (*model)[k];
593 593 std::string msg = "Verify optimization result for " + par.print();
594   - test_value(par.Value(), fit_results[j++], 5.0e-5, msg);
595   - test_value(par.Error(), fit_results[j++], 5.0e-5, msg);
  594 + test_value(par.value(), fit_results[j++], 5.0e-5, msg);
  595 + test_value(par.error(), fit_results[j++], 5.0e-5, msg);
596 596 }
597 597 }
598 598 }
... ...
inst/lat/test/test_LAT.cpp
... ... @@ -667,8 +667,8 @@ void TestGLATOptimize::test_one_binned_optimizer(const std::string&amp; datadir,
667 667 for (int k = 0; k < model->size(); ++k) {
668 668 GModelPar par = (*model)[k];
669 669 std::string msg = "Verify optimization result for " + par.print();
670   - test_value(par.Value(), fit_results[j++], 5.0e-5, msg);
671   - test_value(par.Error(), fit_results[j++], 5.0e-5, msg);
  670 + test_value(par.value(), fit_results[j++], 5.0e-5, msg);
  671 + test_value(par.error(), fit_results[j++], 5.0e-5, msg);
672 672 }
673 673 }
674 674 }
... ...
inst/mwl/test/test_MWL.cpp
... ... @@ -225,8 +225,8 @@ void TestGMWL::test_optimizer(void)
225 225 for (int k = 0; k < model->size(); ++k) {
226 226 GModelPar par = (*model)[k];
227 227 std::string msg = "Verify optimization result for " + par.print();
228   - test_value(par.Value(), fit_results[j++], 1.0e-4, msg);
229   - test_value(par.Error(), fit_results[j++], 1.0e-3, msg);
  228 + test_value(par.value(), fit_results[j++], 1.0e-4, msg);
  229 + test_value(par.error(), fit_results[j++], 1.0e-3, msg);
230 230 }
231 231 }
232 232 }
... ...
pyext/GModelPar.i
... ... @@ -40,64 +40,64 @@ class GModelPar : public GBase {
40 40 public:
41 41 // Constructors and destructors
42 42 GModelPar(void);
43   - explicit GModelPar(const std::string& name, const double& value, int i);
  43 + explicit GModelPar(const std::string& name, const double& value);
44 44 explicit GModelPar(const std::string& name, const double& factor, const double& scale);
45 45 virtual ~GModelPar(void);
46 46  
47 47 // Attribute methods
48   - double Value(void) const;
49   - double Error(void) const { return m_factor_error*m_scale; }
50   - double Gradient(void) const { return m_factor_gradient*m_scale; }
51   - double Min(void) const { return m_factor_min*m_scale; }
52   - double Max(void) const { return m_factor_max*m_scale; }
53   - void Value(const double& value);
54   - void Error(const double& error);
55   - void Gradient(const double& min);
56   - void Min(const double& min);
57   - void Max(const double& max);
58   - void Range(const double& min, const double& max);
  48 + double value(void) const;
  49 + double error(void) const;
  50 + double gradient(void) const;
  51 + double min(void) const;
  52 + double max(void) const;
  53 + void value(const double& value);
  54 + void error(const double& error);
  55 + void gradient(const double& gradient);
  56 + void min(const double& min);
  57 + void max(const double& max);
  58 + void range(const double& min, const double& max);
59 59  
60 60 // Factorization methods
61   - const double& factor_value(void) const { return m_factor_value; }
62   - const double& factor_error(void) const { return m_factor_error; }
63   - const double& factor_gradient(void) const { return m_factor_gradient; }
64   - const double& factor_min(void) const { return m_factor_min; }
65   - const double& factor_max(void) const { return m_factor_max; }
66   - const double& scale(void) const { return m_scale; }
  61 + const double& factor_value(void) const;
  62 + const double& factor_error(void) const;
  63 + const double& factor_gradient(void) const;
  64 + const double& factor_min(void) const;
  65 + const double& factor_max(void) const;
  66 + const double& scale(void) const;
67 67 void factor_value(const double& value);
68   - void factor_error(const double& error) { m_factor_error=error; }
69   - void factor_gradient(const double& gradient) { m_factor_gradient=gradient; }
  68 + void factor_error(const double& error);
  69 + void factor_gradient(const double& gradient);
70 70 void factor_min(const double& min);
71 71 void factor_max(const double& max);
72 72 void factor_range(const double& min, const double& max);
73   - void Scale(const double& scale);
  73 + void scale(const double& scale);
74 74  
75 75 // Boundary methods
76   - bool hasmin(void) const { return m_hasmin; }
77   - bool hasmax(void) const { return m_hasmax; }
78   - bool hasrange(void) const { return m_hasmin && m_hasmax; }
79   - void remove_min(void) { m_hasmin=false; }
80   - void remove_max(void) { m_hasmax=false; }
81   - void remove_range(void) { m_hasmin=false; m_hasmax=false; }
  76 + bool hasmin(void) const;
  77 + bool hasmax(void) const;
  78 + bool hasrange(void) const;
  79 + void remove_min(void);
  80 + void remove_max(void);
  81 + void remove_range(void);
82 82  
83 83 // Property methods
84   - bool isfree(void) const { return m_free; }
85   - bool isfixed(void) const { return !m_free; }
86   - bool hasgrad(void) const { return m_hasgrad; }
87   - void free(void) { m_free=true; }
88   - void fix(void) { m_free=false; }
89   - void hasgrad(const bool& grad) { m_hasgrad=grad; }
  84 + bool isfree(void) const;
  85 + bool isfixed(void) const;
  86 + bool hasgrad(void) const;
  87 + void free(void);
  88 + void fix(void);
  89 + void hasgrad(const bool& grad);
90 90  
91 91 // Other methods
92   - void clear(void);
93   - GModelPar* clone(void) const;
94   - std::string name(void) const { return m_name; }
95   - std::string unit(void) const { return m_unit; }
96   - void name(const std::string& name) { m_name=name; }
97   - void unit(const std::string& unit) { m_unit=unit; }
98   - void autoscale(void);
99   - void read(const GXmlElement& xml);
100   - void write(GXmlElement& xml) const;
  92 + void clear(void);
  93 + GModelPar* clone(void) const;
  94 + const std::string& name(void) const;
  95 + const std::string& unit(void) const;
  96 + void name(const std::string& name);
  97 + void unit(const std::string& unit);
  98 + void autoscale(void);
  99 + void read(const GXmlElement& xml);
  100 + void write(GXmlElement& xml) const;
101 101 };
102 102  
103 103  
... ...
src/model/GModel.cpp
... ... @@ -330,7 +330,7 @@ GModelPar GModel::scale(const std::string&amp; instrument) const
330 330  
331 331 // Initialise unit scale factor
332 332 GModelPar scale;
333   - scale.Value(1.0);
  333 + scale.value(1.0);
334 334 scale.name(uinstrument);
335 335 scale.fix();
336 336  
... ... @@ -708,7 +708,7 @@ std::string GModel::print_attributes(void) const
708 708 }
709 709 result.append(m_scales[i].name());
710 710 result.append("=");
711   - result.append(str(m_scales[i].Value()));
  711 + result.append(str(m_scales[i].value()));
712 712 }
713 713 result.append(", others unity");
714 714 }
... ...
src/model/GModelPar.cpp
... ... @@ -33,13 +33,10 @@
33 33 #include "GTools.hpp"
34 34  
35 35 /* __ Method name definitions ____________________________________________ */
36   -#define G_VALUE "GModelPar::Value(double&)"
37   -#define G_ERROR "GModelPar::Error(double&)"
38 36 #define G_FACTOR_VALUE "GModelPar::factor_value(double&)"
39 37 #define G_FACTOR_MIN "GModelPar::factor_min(double&)"
40 38 #define G_FACTOR_MAX "GModelPar::factor_max(double&)"
41   -#define G_FACTOR_RANGE "GModelPar::factor_range(double&, double&)"
42   -#define G_SCALE "GModelPar::Scale(double&)"
  39 +#define G_SCALE "GModelPar::scale(double&)"
43 40 #define G_READ "GModelPar::read(GXmlElement&)"
44 41  
45 42 /* __ Macros _____________________________________________________________ */
... ... @@ -82,7 +79,7 @@ GModelPar::GModelPar(void)
82 79 * @p value of zero, the scale factor will be set to unity and the
83 80 * @p factor_value will be set to @p value.
84 81 ***************************************************************************/
85   -GModelPar::GModelPar(const std::string& name, const double& value, int i)
  82 +GModelPar::GModelPar(const std::string& name, const double& value)
86 83 {
87 84 // Initialise members
88 85 init_members();
... ... @@ -109,11 +106,11 @@ GModelPar::GModelPar(const std::string&amp; name, const double&amp; value, int i)
109 106 * @brief Parameter constructor
110 107 *
111 108 * @param[in] name Parameter name.
112   - * @param[in] factor Parameter factor.
  109 + * @param[in] factor Parameter value factor.
113 110 * @param[in] scale Parameter scaling.
114 111 *
115   - * Constructs a model parameter from a parameter @p name, @p factor and
116   - * @p scale factor.
  112 + * Constructs a model parameter from a parameter @p name, value @p factor
  113 + * and @p scale factor.
117 114 ***************************************************************************/
118 115 GModelPar::GModelPar(const std::string& name,
119 116 const double& factor,
... ... @@ -241,7 +238,7 @@ GModelPar* GModelPar::clone(void) const
241 238 * The method calls factor_value() for assigning the value factor, and this
242 239 * method will verify that the value lies within the specified boundaries.
243 240 ***************************************************************************/
244   -void GModelPar::Value(const double& value)
  241 +void GModelPar::value(const double& value)
245 242 {
246 243 // Set value factor. The GModelPar class makes sure that m_scale is
247 244 // never 0, so no test is needed here
... ... @@ -260,7 +257,7 @@ void GModelPar::Value(const double&amp; value)
260 257 * Sets the parameter error. The method stores the error factor which is
261 258 * obtained by dividing the @p error by the scale factor.
262 259 ***************************************************************************/
263   -void GModelPar::Error(const double& error)
  260 +void GModelPar::error(const double& error)
264 261 {
265 262 // Set error factor. The GModelPar class makes sure that m_scale is
266 263 // never 0, so no test is needed here
... ... @@ -279,7 +276,7 @@ void GModelPar::Error(const double&amp; error)
279 276 * Sets the parameter gradient. The method stores the gradient factor which
280 277 * is obtained by dividing @p gradient by the scale factor.
281 278 ***************************************************************************/
282   -void GModelPar::Gradient(const double& gradient)
  279 +void GModelPar::gradient(const double& gradient)
283 280 {
284 281 // Set gradient factor. The GModelPar class makes sure that m_scale is
285 282 // never 0, so no test is needed here
... ... @@ -298,7 +295,7 @@ void GModelPar::Gradient(const double&amp; gradient)
298 295 * Sets the minimum parameter boundary. The method stores the minimum
299 296 * boundary factor which is obtained by dividing @p min by the scale factor.
300 297 ***************************************************************************/
301   -void GModelPar::Min(const double& min)
  298 +void GModelPar::min(const double& min)
302 299 {
303 300 // Set minimum boundary factor. The GModelPar class makes sure that
304 301 // m_scale is never 0, so no test is needed here
... ... @@ -317,7 +314,7 @@ void GModelPar::Min(const double&amp; min)
317 314 * Sets the maximum parameter boundary. The method stores the maximum
318 315 * boundary factor which is obtained by dividing @p max by the scale factor.
319 316 ***************************************************************************/
320   -void GModelPar::Max(const double& max)
  317 +void GModelPar::max(const double& max)
321 318 {
322 319 // Set maximum boundary factor. The GModelPar class makes sure that
323 320 // m_scale is never 0, so no test is needed here
... ... @@ -337,11 +334,11 @@ void GModelPar::Max(const double&amp; max)
337 334 * Sets the minimum and maximum parameter boundaries. The method calls the
338 335 * min() and max() methods to set the boundaries.
339 336 ***************************************************************************/
340   -void GModelPar::Range(const double& min, const double& max)
  337 +void GModelPar::range(const double& min, const double& max)
341 338 {
342 339 // Set minimum and maximum
343   - this->Min(min);
344   - this->Max(max);
  340 + this->min(min);
  341 + this->max(max);
345 342  
346 343 // Return
347 344 return;
... ... @@ -493,7 +490,7 @@ void GModelPar::factor_range(const double&amp; min, const double&amp; max)
493 490 *
494 491 * An exception is thrown if a scale factor of 0 is specified.
495 492 ***************************************************************************/
496   -void GModelPar::Scale(const double& scale)
  493 +void GModelPar::scale(const double& scale)
497 494 {
498 495 // Make sure that scale is not zero
499 496 if (scale == 0.0) {
... ... @@ -795,22 +792,22 @@ std::string GModelPar::print(void) const
795 792 result.append(parformat(" "+name()));
796 793  
797 794 // Append value
798   - result.append(str(Value()));
  795 + result.append(str(value()));
799 796  
800 797 // For free parameters, append statistical uncertainty
801 798 if (m_free) {
802   - result.append(" +/- "+str(std::abs(Error())));
  799 + result.append(" +/- "+str(std::abs(error())));
803 800 }
804 801  
805 802 // Append parameter limites if they exist
806 803 if (m_hasmin && m_hasmax) {
807   - result.append(" ["+str(Min()) + ","+str(Max())+"]");
  804 + result.append(" ["+str(min()) + ","+str(max())+"]");
808 805 }
809 806 else if (m_hasmin) {
810   - result.append(" ["+str(Min()) + ",infty[");
  807 + result.append(" ["+str(min()) + ",infty[");
811 808 }
812 809 else if (m_hasmax) {
813   - result.append(" ]-infty,"+str(Max())+"]");
  810 + result.append(" ]-infty,"+str(max())+"]");
814 811 }
815 812  
816 813 // Append parameter unit
... ...
src/model/GModelSky.cpp
... ... @@ -547,7 +547,7 @@ double GModelSky::npred(const GEnergy&amp; obsEng, const GTime&amp; obsTime,
547 547  
548 548 // If required, apply instrument specific model scaling
549 549 if (!m_scales.empty()) {
550   - npred *= scale(obs.instrument()).Value();
  550 + npred *= scale(obs.instrument()).value();
551 551 }
552 552  
553 553 // Compile option: Check for NaN/Inf
... ... @@ -1085,7 +1085,7 @@ double GModelSky::spatial(const GEvent&amp; event,
1085 1085  
1086 1086 // If required, apply instrument specific model scaling
1087 1087 if (!m_scales.empty()) {
1088   - irf *= scale(obs.instrument()).Value();
  1088 + irf *= scale(obs.instrument()).value();
1089 1089 }
1090 1090  
1091 1091 // Case A: evaluate gradients
... ...
src/model/GModelSpatialDiffuseConst.cpp
... ... @@ -390,10 +390,10 @@ void GModelSpatialDiffuseConst::init_members(void)
390 390 m_value.clear();
391 391 m_value.name("Value");
392 392 m_value.fix();
393   - m_value.Value(1.0);
394   - m_value.Scale(1.0);
395   - m_value.Range(0.0, 10.0);
396   - m_value.Gradient(0.0);
  393 + m_value.value(1.0);
  394 + m_value.scale(1.0);
  395 + m_value.range(0.0, 10.0);
  396 + m_value.gradient(0.0);
397 397 m_value.hasgrad(true);
398 398  
399 399 // Set parameter pointer(s)
... ...
src/model/GModelSpatialDiffuseCube.cpp
... ... @@ -409,10 +409,10 @@ void GModelSpatialDiffuseCube::init_members(void)
409 409 // Initialise Value
410 410 m_value.clear();
411 411 m_value.name("Normalization");
412   - m_value.Value(1.0);
413   - m_value.Scale(1.0);
414   - m_value.Range(0.001, 1000.0);
415   - m_value.Gradient(0.0);
  412 + m_value.value(1.0);
  413 + m_value.scale(1.0);
  414 + m_value.range(0.001, 1000.0);
  415 + m_value.gradient(0.0);
416 416 m_value.fix();
417 417 m_value.hasgrad(true);
418 418  
... ...
src/model/GModelSpatialDiffuseMap.cpp
... ... @@ -237,7 +237,7 @@ double GModelSpatialDiffuseMap::eval(const GSkyDir&amp; srcDir) const
237 237 double intensity = m_map(srcDir);
238 238  
239 239 // Return intensity times normalization factor
240   - return (intensity * m_value.Value());
  240 + return (intensity * m_value.value());
241 241 }
242 242  
243 243  
... ... @@ -264,7 +264,7 @@ double GModelSpatialDiffuseMap::eval_gradients(const GSkyDir&amp; srcDir) const
264 264 const_cast<GModelSpatialDiffuseMap*>(this)->m_value.factor_gradient(g_value);
265 265  
266 266 // Return intensity times normalization factor
267   - return (intensity * m_value.Value());
  267 + return (intensity * m_value.value());
268 268 }
269 269  
270 270  
... ... @@ -479,10 +479,10 @@ void GModelSpatialDiffuseMap::init_members(void)
479 479 // Initialise Value
480 480 m_value.clear();
481 481 m_value.name("Prefactor");
482   - m_value.Value(1.0);
483   - m_value.Scale(1.0);
484   - m_value.Range(0.001, 1000.0);
485   - m_value.Gradient(0.0);
  482 + m_value.value(1.0);
  483 + m_value.scale(1.0);
  484 + m_value.range(0.001, 1000.0);
  485 + m_value.gradient(0.0);
486 486 m_value.fix();
487 487 m_value.hasgrad(true);
488 488  
... ...
src/model/GModelSpatialElliptical.cpp
... ... @@ -285,8 +285,8 @@ void GModelSpatialElliptical::read(const GXmlElement&amp; xml)
285 285 if (has_glon && has_glat) {
286 286 GSkyDir dir;
287 287 dir.lb_deg(ra(), dec()),
288   - m_ra.Value(dir.ra_deg());
289   - m_dec.Value(dir.dec_deg());
  288 + m_ra.value(dir.ra_deg());
  289 + m_dec.value(dir.dec_deg());
290 290 }
291 291 else if (has_glon || has_glat) {
292 292 throw GException::model_invalid_parnames(G_READ, xml,
... ... @@ -418,8 +418,8 @@ GSkyDir GModelSpatialElliptical::dir(void) const
418 418 void GModelSpatialElliptical::dir(const GSkyDir& dir)
419 419 {
420 420 // Assign Right Ascension and Declination
421   - m_ra.Value(dir.ra_deg());
422   - m_dec.Value(dir.dec_deg());
  421 + m_ra.value(dir.ra_deg());
  422 + m_dec.value(dir.dec_deg());
423 423  
424 424 // Return
425 425 return;
... ... @@ -442,8 +442,8 @@ void GModelSpatialElliptical::init_members(void)
442 442 m_ra.name("RA");
443 443 m_ra.unit("deg");
444 444 m_ra.fix();
445   - m_ra.Scale(1.0);
446   - m_ra.Gradient(0.0);
  445 + m_ra.scale(1.0);
  446 + m_ra.gradient(0.0);
447 447 m_ra.hasgrad(false);
448 448  
449 449 // Initialise Declination
... ... @@ -451,8 +451,8 @@ void GModelSpatialElliptical::init_members(void)
451 451 m_dec.name("DEC");
452 452 m_dec.unit("deg");
453 453 m_dec.fix();
454   - m_dec.Scale(1.0);
455   - m_dec.Gradient(0.0);
  454 + m_dec.scale(1.0);
  455 + m_dec.gradient(0.0);
456 456 m_dec.hasgrad(false);
457 457  
458 458 // Initialise Position Angle
... ... @@ -460,8 +460,8 @@ void GModelSpatialElliptical::init_members(void)
460 460 m_posangle.name("PA");
461 461 m_posangle.unit("deg");
462 462 m_posangle.fix();
463   - m_posangle.Scale(1.0);
464   - m_posangle.Gradient(0.0);
  463 + m_posangle.scale(1.0);
  464 + m_posangle.gradient(0.0);
465 465 m_posangle.hasgrad(false);
466 466  
467 467 // Set parameter pointer(s)
... ...
src/model/GModelSpatialEllipticalDisk.cpp
... ... @@ -286,7 +286,7 @@ double GModelSpatialEllipticalDisk::eval(const double&amp; theta,
286 286 update();
287 287  
288 288 // Perform computations
289   - double diff_angle = posangle - m_posangle.Value()*deg2rad;
  289 + double diff_angle = posangle - m_posangle.value()*deg2rad;
290 290 double cosinus = std::cos(diff_angle);
291 291 double sinus = std::sin(diff_angle);
292 292 double arg1 = m_semiminor_rad * cosinus;
... ... @@ -577,22 +577,22 @@ void GModelSpatialEllipticalDisk::init_members(void)
577 577 m_semiminor.clear();
578 578 m_semiminor.name("MinorRadius");
579 579 m_semiminor.unit("deg");
580   - m_semiminor.Value(2.778e-4); // 1 arcsec
581   - m_semiminor.Min(2.778e-4); // 1 arcsec
  580 + m_semiminor.value(2.778e-4); // 1 arcsec
  581 + m_semiminor.min(2.778e-4); // 1 arcsec
582 582 m_semiminor.free();
583   - m_semiminor.Scale(1.0);
584   - m_semiminor.Gradient(0.0);
  583 + m_semiminor.scale(1.0);
  584 + m_semiminor.gradient(0.0);
585 585 m_semiminor.hasgrad(false); // Elliptical components never have gradients
586 586  
587 587 // Initialise semi-major axis
588 588 m_semimajor.clear();
589 589 m_semimajor.name("MajorRadius");
590 590 m_semimajor.unit("deg");
591   - m_semimajor.Value(2.778e-4); // 1 arcsec
592   - m_semimajor.Min(2.778e-4); // 1 arcsec
  591 + m_semimajor.value(2.778e-4); // 1 arcsec
  592 + m_semimajor.min(2.778e-4); // 1 arcsec
593 593 m_semimajor.free();
594   - m_semimajor.Scale(1.0);
595   - m_semimajor.Gradient(0.0);
  594 + m_semimajor.scale(1.0);
  595 + m_semimajor.gradient(0.0);
596 596 m_semimajor.hasgrad(false); // Elliptical components never have gradients
597 597  
598 598 // Set parameter pointer(s)
... ...
src/model/GModelSpatialPointSource.cpp
... ... @@ -348,8 +348,8 @@ void GModelSpatialPointSource::read(const GXmlElement&amp; xml)
348 348 if (has_glon && has_glat) {
349 349 GSkyDir dir;
350 350 dir.lb_deg(ra(), dec()),
351   - m_ra.Value(dir.ra_deg());
352   - m_dec.Value(dir.dec_deg());
  351 + m_ra.value(dir.ra_deg());
  352 + m_dec.value(dir.dec_deg());
353 353 }
354 354 else if (has_glon || has_glat) {
355 355 throw GException::model_invalid_parnames(G_READ, xml,
... ... @@ -480,8 +480,8 @@ GSkyDir GModelSpatialPointSource::dir(void) const
480 480 void GModelSpatialPointSource::dir(const GSkyDir& dir)
481 481 {
482 482 // Assign Right Ascension and Declination
483   - m_ra.Value(dir.ra_deg());
484   - m_dec.Value(dir.dec_deg());
  483 + m_ra.value(dir.ra_deg());
  484 + m_dec.value(dir.dec_deg());
485 485  
486 486 // Return
487 487 return;
... ... @@ -504,8 +504,8 @@ void GModelSpatialPointSource::init_members(void)
504 504 m_ra.name("RA");
505 505 m_ra.unit("deg");
506 506 m_ra.fix();
507   - m_ra.Scale(1.0);
508   - m_ra.Gradient(0.0);
  507 + m_ra.scale(1.0);
  508 + m_ra.gradient(0.0);
509 509 m_ra.hasgrad(false);
510 510  
511 511 // Initialise Declination
... ... @@ -513,8 +513,8 @@ void GModelSpatialPointSource::init_members(void)
513 513 m_dec.name("DEC");
514 514 m_dec.unit("deg");
515 515 m_dec.fix();
516   - m_dec.Scale(1.0);
517   - m_dec.Gradient(0.0);
  516 + m_dec.scale(1.0);
  517 + m_dec.gradient(0.0);
518 518 m_dec.hasgrad(false);
519 519  
520 520 // Set parameter pointer(s)
... ...
src/model/GModelSpatialRadial.cpp
... ... @@ -260,8 +260,8 @@ void GModelSpatialRadial::read(const GXmlElement&amp; xml)
260 260 if (has_glon && has_glat) {
261 261 GSkyDir dir;
262 262 dir.lb_deg(ra(), dec()),
263   - m_ra.Value(dir.ra_deg());
264   - m_dec.Value(dir.dec_deg());
  263 + m_ra.value(dir.ra_deg());
  264 + m_dec.value(dir.dec_deg());
265 265 }
266 266 else if (has_glon || has_glat) {
267 267 throw GException::model_invalid_parnames(G_READ, xml,
... ... @@ -379,8 +379,8 @@ GSkyDir GModelSpatialRadial::dir(void) const
379 379 void GModelSpatialRadial::dir(const GSkyDir& dir)
380 380 {
381 381 // Assign Right Ascension and Declination
382   - m_ra.Value(dir.ra_deg());
383   - m_dec.Value(dir.dec_deg());
  382 + m_ra.value(dir.ra_deg());
  383 + m_dec.value(dir.dec_deg());
384 384  
385 385 // Return
386 386 return;
... ... @@ -403,8 +403,8 @@ void GModelSpatialRadial::init_members(void)
403 403 m_ra.name("RA");
404 404 m_ra.unit("deg");
405 405 m_ra.fix();
406   - m_ra.Scale(1.0);
407   - m_ra.Gradient(0.0);
  406 + m_ra.scale(1.0);
  407 + m_ra.gradient(0.0);
408 408 m_ra.hasgrad(false);
409 409  
410 410 // Initialise Declination
... ... @@ -412,8 +412,8 @@ void GModelSpatialRadial::init_members(void)
412 412 m_dec.name("DEC");
413 413 m_dec.unit("deg");
414 414 m_dec.fix();
415   - m_dec.Scale(1.0);
416   - m_dec.Gradient(0.0);
  415 + m_dec.scale(1.0);
  416 + m_dec.gradient(0.0);
417 417 m_dec.hasgrad(false);
418 418  
419 419 // Set parameter pointer(s)
... ...
src/model/GModelSpatialRadialDisk.cpp
... ... @@ -482,11 +482,11 @@ void GModelSpatialRadialDisk::init_members(void)
482 482 m_radius.clear();
483 483 m_radius.name("Radius");
484 484 m_radius.unit("deg");
485   - m_radius.Value(2.778e-4); // 1 arcsec
486   - m_radius.Min(2.778e-4); // 1 arcsec
  485 + m_radius.value(2.778e-4); // 1 arcsec
  486 + m_radius.min(2.778e-4); // 1 arcsec
487 487 m_radius.free();
488   - m_radius.Scale(1.0);
489   - m_radius.Gradient(0.0);
  488 + m_radius.scale(1.0);
  489 + m_radius.gradient(0.0);
490 490 m_radius.hasgrad(false); // Radial components never have gradients
491 491  
492 492 // Set parameter pointer(s)
... ...
src/model/GModelSpatialRadialGauss.cpp
... ... @@ -486,11 +486,11 @@ void GModelSpatialRadialGauss::init_members(void)
486 486 m_sigma.clear();
487 487 m_sigma.name("Sigma");
488 488 m_sigma.unit("deg");
489   - m_sigma.Value(2.778e-4); // 1 arcsec
490   - m_sigma.Min(2.778e-4); // 1 arcsec
  489 + m_sigma.value(2.778e-4); // 1 arcsec
  490 + m_sigma.min(2.778e-4); // 1 arcsec
491 491 m_sigma.free();
492   - m_sigma.Scale(1.0);
493   - m_sigma.Gradient(0.0);
  492 + m_sigma.scale(1.0);
  493 + m_sigma.gradient(0.0);
494 494 m_sigma.hasgrad(false); // Radial components never have gradients
495 495  
496 496 // Set parameter pointer(s)
... ...
src/model/GModelSpatialRadialShell.cpp
... ... @@ -590,22 +590,22 @@ void GModelSpatialRadialShell::init_members(void)
590 590 m_radius.clear();
591 591 m_radius.name("Radius");
592 592 m_radius.unit("deg");
593   - m_radius.Value(0.0);
594   - m_radius.Min(0.0);
  593 + m_radius.value(0.0);
  594 + m_radius.min(0.0);
595 595 m_radius.free();
596   - m_radius.Scale(1.0);
597   - m_radius.Gradient(0.0);
  596 + m_radius.scale(1.0);
  597 + m_radius.gradient(0.0);
598 598 m_radius.hasgrad(false); // Radial components never have gradients
599 599  
600 600 // Initialise Width
601 601 m_width.clear();
602 602 m_width.name("Width");
603 603 m_width.unit("deg");
604   - m_width.Value(2.778e-4);
605   - m_width.Min(2.778e-4); // 1 arcsec
  604 + m_width.value(2.778e-4);
  605 + m_width.min(2.778e-4); // 1 arcsec
606 606 m_width.free();
607   - m_width.Scale(1.0);
608   - m_width.Gradient(0.0);
  607 + m_width.scale(1.0);
  608 + m_width.gradient(0.0);
609 609 m_width.hasgrad(false); // Radial components never have gradients
610 610  
611 611 // Set parameter pointer(s)
... ...
src/model/GModelSpectralConst.cpp
... ... @@ -504,11 +504,11 @@ void GModelSpectralConst::init_members(void)
504 504 // Initialise constant normalisation
505 505 m_norm.clear();
506 506 m_norm.name("Value");
507   - m_norm.Scale(1.0);
508   - m_norm.Value(1.0); // default: 1.0
509   - m_norm.Range(0.0, 1000.0); // range: [0, 1000]
  507 + m_norm.scale(1.0);
  508 + m_norm.value(1.0); // default: 1.0
  509 + m_norm.range(0.0, 1000.0); // range: [0, 1000]
510 510 m_norm.free();
511   - m_norm.Gradient(0.0);
  511 + m_norm.gradient(0.0);
512 512 m_norm.hasgrad(true);
513 513  
514 514 // Set parameter pointer(s)
... ...
src/model/GModelSpectralExpPlaw.cpp
... ... @@ -93,9 +93,9 @@ GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double&amp; norm,
93 93 init_members();
94 94  
95 95 // Set parameters
96   - m_norm.Value(norm);
97   - m_index.Value(index);
98   - m_ecut.Value(ecut);
  96 + m_norm.value(norm);
  97 + m_index.value(index);
  98 + m_ecut.value(ecut);
99 99  
100 100 // Autoscale parameters
101 101 autoscale();
... ... @@ -737,42 +737,42 @@ void GModelSpectralExpPlaw::init_members(void)
737 737 m_norm.clear();
738 738 m_norm.name("Prefactor");
739 739 m_norm.unit("ph/cm2/s/MeV");
740   - m_norm.Scale(1.0);
741   - m_norm.Value(1.0); // default: 1.0
742   - m_norm.Min(0.0); // min: 0.0
  740 + m_norm.scale(1.0);
  741 + m_norm.value(1.0); // default: 1.0
  742 + m_norm.min(0.0); // min: 0.0
743 743 m_norm.free();
744   - m_norm.Gradient(0.0);
  744 + m_norm.gradient(0.0);
745 745 m_norm.hasgrad(true);
746 746  
747 747 // Initialise powerlaw index
748 748 m_index.clear();
749 749 m_index.name("Index");
750   - m_index.Scale(1.0);
751   - m_index.Value(-2.0); // default: -2.0
752   - m_index.Range(-10.0,+10.0); // range: [-10,+10]
  750 + m_index.scale(1.0);
  751 + m_index.value(-2.0); // default: -2.0
  752 + m_index.range(-10.0,+10.0); // range: [-10,+10]
753 753 m_index.free();
754   - m_index.Gradient(0.0);
  754 + m_index.gradient(0.0);
755 755 m_index.hasgrad(true);
756 756  
757 757 // Initialise cut off energy
758 758 m_ecut.clear();
759 759 m_ecut.name("Cutoff");
760 760 m_ecut.unit("MeV");
761   - m_ecut.Scale(1.0);
762   - m_ecut.Value(1000.0); // default: 1000.0
763   - m_ecut.Min(0.1); // min: 0.1
  761 + m_ecut.scale(1.0);
  762 + m_ecut.value(1000.0); // default: 1000.0
  763 + m_ecut.min(0.1); // min: 0.1
764 764 m_ecut.free();
765   - m_ecut.Gradient(0.0);
  765 + m_ecut.gradient(0.0);
766 766 m_ecut.hasgrad(true);
767 767  
768 768 // Initialise pivot energy
769 769 m_pivot.clear();
770 770 m_pivot.name("PivotEnergy");
771 771 m_pivot.unit("MeV");
772   - m_pivot.Scale(1.0);
773   - m_pivot.Value(100.0);
  772 + m_pivot.scale(1.0);
  773 + m_pivot.value(100.0);
774 774 m_pivot.fix();
775   - m_pivot.Gradient(0.0);
  775 + m_pivot.gradient(0.0);
776 776 m_pivot.hasgrad(true);
777 777  
778 778 // Set parameter pointer(s)
... ...
src/model/GModelSpectralFunc.cpp
... ... @@ -718,11 +718,11 @@ void GModelSpectralFunc::init_members(void)
718 718 // Initialise powerlaw normalisation
719 719 m_norm.clear();
720 720 m_norm.name("Normalization");
721   - m_norm.Scale(1.0);
722   - m_norm.Value(1.0);
723   - m_norm.Range(0.0,1000.0);
  721 + m_norm.scale(1.0);
  722 + m_norm.value(1.0);
  723 + m_norm.range(0.0,1000.0);
724 724 m_norm.free();
725   - m_norm.Gradient(0.0);
  725 + m_norm.gradient(0.0);
726 726 m_norm.hasgrad(true);
727 727  
728 728 // Set parameter pointer(s)
... ...
src/model/GModelSpectralLogParabola.cpp
... ... @@ -93,9 +93,9 @@ GModelSpectralLogParabola::GModelSpectralLogParabola(const double&amp; norm,
93 93 init_members();
94 94  
95 95 // Set parameters
96   - m_norm.Value(norm);
97   - m_index.Value(index);
98   - m_curvature.Value(curvature);
  96 + m_norm.value(norm);
  97 + m_index.value(index);
  98 + m_curvature.value(curvature);
99 99  
100 100 // Autoscale parameters
101 101 autoscale();
... ... @@ -571,7 +571,7 @@ void GModelSpectralLogParabola::read(const GXmlElement&amp; xml)
571 571 // Change sign if index is defined Fermi-like
572 572 else if(par->attribute("name") == "alpha") {
573 573 m_index.read(*par);
574   - m_index.Value(-m_index.Value());
  574 + m_index.value(-m_index.value());
575 575 npar[1]++;
576 576 }
577 577  
... ... @@ -584,7 +584,7 @@ void GModelSpectralLogParabola::read(const GXmlElement&amp; xml)
584 584 // Change sign if curvature is defined Fermi-like
585 585 else if(par->attribute("name") == "beta") {
586 586 m_curvature.read(*par);
587   - m_curvature.Value(-m_curvature.Value());
  587 + m_curvature.value(-m_curvature.value());
588 588 npar[2]++;
589 589 }
590 590  
... ... @@ -741,41 +741,41 @@ void GModelSpectralLogParabola::init_members(void)
741 741 m_norm.clear();
742 742 m_norm.name("Prefactor");
743 743 m_norm.unit("ph/cm2/s/MeV");
744   - m_norm.Scale(1.0);
745   - m_norm.Value(1.0); // default: 1.0
746   - m_norm.Min(0.1); // min: 0.0
  744 + m_norm.scale(1.0);
  745 + m_norm.value(1.0); // default: 1.0
  746 + m_norm.min(0.1); // min: 0.0
747 747 m_norm.free();
748   - m_norm.Gradient(0.0);
  748 + m_norm.gradient(0.0);
749 749 m_norm.hasgrad(true);
750 750  
751 751 // Initialise powerlaw index
752 752 m_index.clear();
753 753 m_index.name("Index");
754   - m_index.Scale(1.0);
755   - m_index.Value(-2.0); // default: -2.0
756   - m_index.Range(-10.0,+10.0); // range: [-10,+10]
  754 + m_index.scale(1.0);
  755 + m_index.value(-2.0); // default: -2.0
  756 + m_index.range(-10.0,+10.0); // range: [-10,+10]
757 757 m_index.free();
758   - m_index.Gradient(0.0);
  758 + m_index.gradient(0.0);
759 759 m_index.hasgrad(true);
760 760  
761 761 // Initialise curvature
762 762 m_curvature.clear();
763 763 m_curvature.name("Curvature");
764   - m_curvature.Scale(1.0);
765   - m_curvature.Value(-0.1); // default: -2.0
766   - m_curvature.Range(-10.0,+10.0); // range: [-10,+10]
  764 + m_curvature.scale(1.0);
  765 + m_curvature.value(-0.1); // default: -2.0
  766 + m_curvature.range(-10.0,+10.0); // range: [-10,+10]
767 767 m_curvature.free();
768   - m_curvature.Gradient(0.0);
  768 + m_curvature.gradient(0.0);
769 769 m_curvature.hasgrad(true);
770 770  
771 771 // Initialise pivot energy
772 772 m_pivot.clear();
773 773 m_pivot.name("PivotEnergy");
774 774 m_pivot.unit("MeV");
775   - m_pivot.Scale(1.0);
776   - m_pivot.Value(100.0); // default: 100
  775 + m_pivot.scale(1.0);
  776 + m_pivot.value(100.0); // default: 100
777 777 m_pivot.fix();
778   - m_pivot.Gradient(0.0);
  778 + m_pivot.gradient(0.0);
779 779 m_pivot.hasgrad(true);
780 780  
781 781 // Set parameter pointer(s)
... ...
src/model/GModelSpectralNodes.cpp
... ... @@ -993,12 +993,12 @@ void GModelSpectralNodes::set_eval_cache(void) const
993 993 for (int i = 0; i < m_energies.size(); ++i) {
994 994  
995 995 // Set log10(energy)
996   - double log10energy = std::log10(m_energies[i].Value());
  996 + double log10energy = std::log10(m_energies[i].value());
997 997 m_old_energies.push_back(log10energy);
998 998 m_log_energies.append(log10energy);
999 999  
1000 1000 // Set log10(intensity)
1001   - double log10value = std::log10(m_values[i].Value());
  1001 + double log10value = std::log10(m_values[i].value());
1002 1002 m_old_values.push_back(log10value);
1003 1003 m_log_values.push_back(log10value);
1004 1004  
... ... @@ -1029,8 +1029,8 @@ void GModelSpectralNodes::set_flux_cache(void) const
1029 1029  
1030 1030 // Store linear energies and values
1031 1031 for (int i = 0; i < m_energies.size(); ++i) {
1032   - m_lin_energies.append(m_energies[i].Value());
1033   - m_lin_values.push_back(m_values[i].Value());
  1032 + m_lin_energies.append(m_energies[i].value());
  1033 + m_lin_values.push_back(m_values[i].value());
1034 1034 }
1035 1035  
1036 1036 // Loop over all nodes-1
... ... @@ -1039,8 +1039,8 @@ void GModelSpectralNodes::set_flux_cache(void) const
1039 1039 // Get energies and function values
1040 1040 double emin = m_lin_energies[i];
1041 1041 double emax = m_lin_energies[i+1];
1042   - double fmin = m_values[i].Value();
1043   - double fmax = m_values[i+1].Value();
  1042 + double fmin = m_values[i].value();
  1043 + double fmax = m_values[i+1].value();
1044 1044  
1045 1045 // Compute pivot energy (MeV). We use here the geometric mean of
1046 1046 // the node boundaries.
... ... @@ -1087,7 +1087,7 @@ void GModelSpectralNodes::update_eval_cache(void) const
1087 1087 {
1088 1088 // Update energies
1089 1089 for (int i = 0; i < m_energies.size(); ++i) {
1090   - double energy = m_energies[i].Value();
  1090 + double energy = m_energies[i].value();
1091 1091 if (energy != m_old_energies[i]) {
1092 1092 m_log_energies[i] = std::log10(energy);
1093 1093 m_old_energies[i] = energy;
... ... @@ -1096,7 +1096,7 @@ void GModelSpectralNodes::update_eval_cache(void) const
1096 1096  
1097 1097 // Update intensities
1098 1098 for (int i = 0; i < m_values.size(); ++i) {
1099   - double value = m_values[i].Value();
  1099 + double value = m_values[i].value();
1100 1100 if (value != m_old_values[i]) {
1101 1101 m_log_values[i] = std::log10(value);
1102 1102 m_old_values[i] = value;
... ... @@ -1124,14 +1124,14 @@ void GModelSpectralNodes::update_flux_cache(void) const
1124 1124 // Get energies and function values
1125 1125 double emin = m_lin_energies[i];
1126 1126 double emax = m_lin_energies[i+1];
1127   - double fmin = m_values[i].Value();
1128   - double fmax = m_values[i+1].Value();
  1127 + double fmin = m_values[i].value();
  1128 + double fmax = m_values[i+1].value();
1129 1129  
1130 1130 // Update values only if energies or function values have changed
1131   - if (emin != m_energies[i].Value() ||
1132   - emax != m_energies[i+1].Value() ||
1133   - fmin != m_values[i].Value() ||
1134   - fmax != m_values[i+1].Value()) {
  1131 + if (emin != m_energies[i].value() ||
  1132 + emax != m_energies[i+1].value() ||
  1133 + fmin != m_values[i].value() ||
  1134 + fmax != m_values[i+1].value()) {
1135 1135  
1136 1136 // Compute pivot energy (MeV). We use here the geometric mean
1137 1137 // of the node boundaries.
... ...
src/model/GModelSpectralPlaw.cpp
... ... @@ -93,9 +93,9 @@ GModelSpectralPlaw::GModelSpectralPlaw(const double&amp; norm,
93 93 init_members();
94 94  
95 95 // Set parameters
96   - m_norm.Value(norm);
97   - m_index.Value(index);
98   - m_pivot.Value(pivot);
  96 + m_norm.value(norm);
  97 + m_index.value(index);
  98 + m_pivot.value(pivot);
99 99  
100 100 // Perform autoscaling of parameter
101 101 autoscale();
... ... @@ -640,31 +640,31 @@ void GModelSpectralPlaw::init_members(void)
640 640 m_norm.clear();
641 641 m_norm.name("Prefactor");
642 642 m_norm.unit("ph/cm2/s/MeV");
643   - m_norm.Scale(1.0);
644   - m_norm.Value(1.0); // default: 1.0
645   - m_norm.Min(0.0); // min: 0.0
  643 + m_norm.scale(1.0);
  644 + m_norm.value(1.0); // default: 1.0
  645 + m_norm.min(0.0); // min: 0.0
646 646 m_norm.free();
647   - m_norm.Gradient(0.0);
  647 + m_norm.gradient(0.0);
648 648 m_norm.hasgrad(true);
649 649  
650 650 // Initialise powerlaw index
651 651 m_index.clear();
652 652 m_index.name("Index");
653   - m_index.Scale(1.0);
654   - m_index.Value(-2.0); // default: -2.0
655   - m_index.Range(-10.0,+10.0); // range: [-10,+10]
  653 + m_index.scale(1.0);
  654 + m_index.value(-2.0); // default: -2.0
  655 + m_index.range(-10.0,+10.0); // range: [-10,+10]
656 656 m_index.free();
657   - m_index.Gradient(0.0);
  657 + m_index.gradient(0.0);
658 658 m_index.hasgrad(true);
659 659  
660 660 // Initialise pivot energy
661 661 m_pivot.clear();
662 662 m_pivot.name("PivotEnergy");
663 663 m_pivot.unit("MeV");
664   - m_pivot.Scale(1.0);
665   - m_pivot.Value(100.0); // default: 100
  664 + m_pivot.scale(1.0);
  665 + m_pivot.value(100.0); // default: 100
666 666 m_pivot.fix();
667   - m_pivot.Gradient(0.0);
  667 + m_pivot.gradient(0.0);
668 668 m_pivot.hasgrad(true);
669 669  
670 670 // Set parameter pointer(s)
... ...
src/model/GModelSpectralPlaw2.cpp
... ... @@ -89,8 +89,8 @@ GModelSpectralPlaw2::GModelSpectralPlaw2(const double&amp; integral,
89 89 init_members();
90 90  
91 91 // Set parameters
92   - m_integral.Value(integral);
93   - m_index.Value(index);
  92 + m_integral.value(integral);
  93 + m_index.value(index);
94 94  
95 95 // Return
96 96 return;
... ... @@ -708,43 +708,43 @@ void GModelSpectralPlaw2::init_members(void)
708 708 m_integral.clear();
709 709 m_integral.name("Integral");
710 710 m_integral.unit("ph/cm2/s");
711   - m_integral.Scale(1.0);
712   - m_integral.Value(1.0); // default: 1.0
713   - m_integral.Range(0.0, 10.0); // range: [0,10]
  711 + m_integral.scale(1.0);
  712 + m_integral.value(1.0); // default: 1.0
  713 + m_integral.range(0.0, 10.0); // range: [0,10]
714 714 m_integral.free();
715   - m_integral.Gradient(0.0);
  715 + m_integral.gradient(0.0);
716 716 m_integral.hasgrad(true);
717 717  
718 718 // Initialise powerlaw index
719 719 m_index.clear();
720 720 m_index.name("Index");
721   - m_index.Scale(1.0);
722   - m_index.Value(-2.0); // default: -2.0
723   - m_index.Range(-10.0,+10.0); // range: [-10,+10]
  721 + m_index.scale(1.0);
  722 + m_index.value(-2.0); // default: -2.0
  723 + m_index.range(-10.0,+10.0); // range: [-10,+10]
724 724 m_index.free();
725   - m_index.Gradient(0.0);
  725 + m_index.gradient(0.0);
726 726 m_index.hasgrad(true);
727 727  
728 728 // Initialise lower limit
729 729 m_emin.clear();
730 730 m_emin.name("LowerLimit");
731 731 m_emin.unit("MeV");
732   - m_emin.Scale(1.0);
733   - m_emin.Value(100.0); // default: 100
734   - m_emin.Range(0.001, 1.0e15); // range: [0.001, 1e15]
  732 + m_emin.scale(1.0);
  733 + m_emin.value(100.0); // default: 100
  734 + m_emin.range(0.001, 1.0e15); // range: [0.001, 1e15]
735 735 m_emin.fix();
736   - m_emin.Gradient(0.0);
  736 + m_emin.gradient(0.0);
737 737 m_emin.hasgrad(false);
738 738  
739 739 // Initialise upper limit
740 740 m_emax.clear();
741 741 m_emax.name("UpperLimit");
742 742 m_emax.unit("MeV");
743   - m_emax.Scale(1.0);
744   - m_emax.Value(500000.0); // default: 500000
745   - m_emin.Range(0.001, 1.0e15); // range: [0.001, 1e15]
  743 + m_emax.scale(1.0);
  744 + m_emax.value(500000.0); // default: 500000
  745 + m_emin.range(0.001, 1.0e15); // range: [0.001, 1e15]
746 746 m_emax.fix();
747   - m_emax.Gradient(0.0);
  747 + m_emax.gradient(0.0);
748 748 m_emax.hasgrad(false);
749 749  
750 750 // Set parameter pointer(s)
... ...
src/model/GModelTemporalConst.cpp
... ... @@ -324,9 +324,9 @@ void GModelTemporalConst::init_members(void)
324 324 m_norm.clear();
325 325 m_norm.name("Constant");
326 326 m_norm.unit("(relative value)");
327   - m_norm.Value(1.0);
  327 + m_norm.value(1.0);
328 328 m_norm.fix();
329   - m_norm.Gradient(0.0);
  329 + m_norm.gradient(0.0);
330 330 m_norm.hasgrad(true);
331 331  
332 332 // Set parameter pointer(s)
... ...
test/test_GModel.cpp
... ... @@ -83,9 +83,9 @@ void TestGModel::test_model_par(void)
83 83 par.remove_max();
84 84  
85 85 // Check parameter access
86   - test_value(par.Value(), 94.02);
  86 + test_value(par.value(), 94.02);
87 87 test_value(par.factor_value(), 47.01);
88   - test_value(par.Error(), 4.006);
  88 + test_value(par.error(), 4.006);
89 89 test_value(par.factor_error(), 2.003);
90 90 test_value(par.scale(), 2.0);
91 91 test_assert(par.name() == "Test parameter", "Parameter name");
... ... @@ -97,7 +97,7 @@ void TestGModel::test_model_par(void)
97 97  
98 98 // Set model parameter
99 99 GModelPar par2("Another test parameter", 3.14, 3.0);
100   - test_value(par2.Value(), 9.42);
  100 + test_value(par2.value(), 9.42);
101 101 test_value(par2.factor_value(), 3.14);
102 102 test_value(par2.scale(), 3.0);
103 103 test_assert(par2.name() == "Another test parameter", "Parameter name");
... ... @@ -175,25 +175,25 @@ void TestGModel::test_model(void)
175 175 }
176 176  
177 177 // Set model scaling
178   - GModelPar lat("LAT", 1.0, 0); // @todo Remove last argument
179   - GModelPar cta("CTA", 0.5, 0); // @todo Remove last argument
  178 + GModelPar lat("LAT", 1.0);
  179 + GModelPar cta("CTA", 0.5);
180 180 crab.scale(lat);
181 181 crab.scale(lat); // In purpose to check if parameter is appended only once
182 182 crab.scale(cta);
183 183  
184 184 // Test model scaling
185   - test_value(crab.scale("LAT").Value(), 1.0);
186   - test_value(crab.scale("CTA").Value(), 0.5);
187   - test_value(crab.scale("COM").Value(), 1.0);
  185 + test_value(crab.scale("LAT").value(), 1.0);
  186 + test_value(crab.scale("CTA").value(), 0.5);
  187 + test_value(crab.scale("COM").value(), 1.0);
188 188  
189 189 // Test saving and loading
190 190 GModels models2;
191 191 models2.append(crab);
192 192 models2.save("test_instrument.xml");
193 193 models2.load("test_instrument.xml");
194   - test_value(models2[0]->scale("LAT").Value(), 1.0);
195   - test_value(models2[0]->scale("CTA").Value(), 0.5);
196   - test_value(models2[0]->scale("COM").Value(), 1.0);
  194 + test_value(models2[0]->scale("LAT").value(), 1.0);
  195 + test_value(models2[0]->scale("CTA").value(), 0.5);
  196 + test_value(models2[0]->scale("COM").value(), 1.0);
197 197  
198 198 // Exit test
199 199 return;
... ...
test/testinst/GTestModelData.hpp
... ... @@ -101,7 +101,7 @@ public:
101 101 }
102 102 virtual double npred(const GEnergy& obsEng, const GTime& obsTime,
103 103 const GObservation& obs) const {
104   - double result = m_pars[0]->Value();
  104 + double result = m_pars[0]->value();
105 105 return result;
106 106 }
107 107  
... ...