Commit d46a4e5cc3a676eee7df7e7f107fa6b8b612f5e8

Authored by Jürgen Knödlseder
1 parent d4e2e698

Rename ecut to cutoff.

include/GModelSpectralExpPlaw.hpp
... ... @@ -63,8 +63,8 @@ public:
63 63 GModelSpectralExpPlaw(void);
64 64 explicit GModelSpectralExpPlaw(const double& prefactor,
65 65 const double& index,
66   - const GEnergy& ecut,
67   - const GEnergy& pivot);
  66 + const GEnergy& pivot,
  67 + const GEnergy& cutoff);
68 68 explicit GModelSpectralExpPlaw(const GXmlElement& xml);
69 69 GModelSpectralExpPlaw(const GModelSpectralExpPlaw& model);
70 70 virtual ~GModelSpectralExpPlaw(void);
... ... @@ -94,12 +94,12 @@ public:
94 94  
95 95 // Other methods
96 96 double prefactor(void) const;
97   - double index(void) const;
98   - GEnergy ecut(void) const;
99   - GEnergy pivot(void) const;
100 97 void prefactor(const double& prefactor);
  98 + double index(void) const;
101 99 void index(const double& index);
102   - void ecut(const GEnergy& ecut);
  100 + GEnergy cutoff(void) const;
  101 + void cutoff(const GEnergy& cutoff);
  102 + GEnergy pivot(void) const;
103 103 void pivot(const GEnergy& pivot);
104 104  
105 105 protected:
... ... @@ -243,63 +243,63 @@ void GModelSpectralExpPlaw::index(const double& index)
243 243  
244 244  
245 245 /***********************************************************************//**
246   - * @brief Return exponential cut-off energy
  246 + * @brief Return pivot energy
247 247 *
248   - * @return Exponential cut-off energy.
  248 + * @return Pivot energy.
249 249 *
250   - * Returns the exponential cut-off energy.
  250 + * Returns the pivot energy.
251 251 ***************************************************************************/
252 252 inline
253   -GEnergy GModelSpectralExpPlaw::ecut(void) const
  253 +GEnergy GModelSpectralExpPlaw::pivot(void) const
254 254 {
255 255 GEnergy energy;
256   - energy.MeV(m_ecut.value());
  256 + energy.MeV(m_pivot.value());
257 257 return energy;
258 258 }
259 259  
260 260  
261 261 /***********************************************************************//**
262   - * @brief Set exponential cut-off energy
  262 + * @brief Set pivot energy
263 263 *
264   - * @param[in] ecut Exponential cut-off energy.
  264 + * @param[in] pivot Pivot energy.
265 265 *
266   - * Sets the exponential cut-off energy.
  266 + * Sets the pivot energy.
267 267 ***************************************************************************/
268 268 inline
269   -void GModelSpectralExpPlaw::ecut(const GEnergy& ecut)
  269 +void GModelSpectralExpPlaw::pivot(const GEnergy& pivot)
270 270 {
271   - m_ecut.value(ecut.MeV());
  271 + m_pivot.value(pivot.MeV());
272 272 return;
273 273 }
274 274  
275 275  
276 276 /***********************************************************************//**
277   - * @brief Return pivot energy
  277 + * @brief Return exponential cut-off energy
278 278 *
279   - * @return Pivot energy.
  279 + * @return Exponential cut-off energy.
280 280 *
281   - * Returns the pivot energy.
  281 + * Returns the exponential cut-off energy.
282 282 ***************************************************************************/
283 283 inline
284   -GEnergy GModelSpectralExpPlaw::pivot(void) const
  284 +GEnergy GModelSpectralExpPlaw::cutoff(void) const
285 285 {
286 286 GEnergy energy;
287   - energy.MeV(m_pivot.value());
  287 + energy.MeV(m_ecut.value());
288 288 return energy;
289 289 }
290 290  
291 291  
292 292 /***********************************************************************//**
293   - * @brief Set pivot energy
  293 + * @brief Set exponential cut-off energy
294 294 *
295   - * @param[in] pivot Pivot energy.
  295 + * @param[in] cutoff Exponential cut-off energy.
296 296 *
297   - * Sets the pivot energy.
  297 + * Sets the exponential cut-off energy.
298 298 ***************************************************************************/
299 299 inline
300   -void GModelSpectralExpPlaw::pivot(const GEnergy& pivot)
  300 +void GModelSpectralExpPlaw::cutoff(const GEnergy& cutoff)
301 301 {
302   - m_pivot.value(pivot.MeV());
  302 + m_ecut.value(cutoff.MeV());
303 303 return;
304 304 }
305 305  
... ...
pyext/GModelSpectralExpPlaw.i
... ... @@ -41,8 +41,8 @@ public:
41 41 GModelSpectralExpPlaw(void);
42 42 explicit GModelSpectralExpPlaw(const double& prefactor,
43 43 const double& index,
44   - const GEnergy& ecut,
45   - const GEnergy& pivot);
  44 + const GEnergy& pivot,
  45 + const GEnergy& cutoff);
46 46 explicit GModelSpectralExpPlaw(const GXmlElement& xml);
47 47 GModelSpectralExpPlaw(const GModelSpectralExpPlaw& model);
48 48 virtual ~GModelSpectralExpPlaw(void);
... ... @@ -71,10 +71,10 @@ public:
71 71 void prefactor(const double& prefactor);
72 72 double index(void) const;
73 73 void index(const double& index);
74   - GEnergy ecut(void) const;
75   - void ecut(const GEnergy& ecut);
76 74 GEnergy pivot(void) const;
77 75 void pivot(const GEnergy& pivot);
  76 + GEnergy cutoff(void) const;
  77 + void cutoff(const GEnergy& cutoff);
78 78 };
79 79  
80 80  
... ...
src/model/GModelSpectralExpPlaw.cpp
... ... @@ -77,16 +77,19 @@ GModelSpectralExpPlaw::GModelSpectralExpPlaw(void) : GModelSpectral()
77 77 *
78 78 * @param[in] prefactor Pre factor normalization (ph/cm2/s/MeV).
79 79 * @param[in] index Power law index.
80   - * @param[in] ecut Cut off energy.
81 80 * @param[in] pivot Pivot energy.
  81 + * @param[in] cutoff Cut off energy.
82 82 *
83   - * Construct an exponentially cut off power law from a prefactor value,
84   - * a spectral index, a cut off energy and a pivot energy.
  83 + * Construct an exponentially cut off power law from
  84 + * - a prefactor value (in units of ph/cm2/s/MeV)
  85 + * - a spectral index,
  86 + * - a pivot energy, and
  87 + * - a cut off energy.
85 88 ***************************************************************************/
86 89 GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double& prefactor,
87 90 const double& index,
88   - const GEnergy& ecut,
89   - const GEnergy& pivot) :
  91 + const GEnergy& pivot,
  92 + const GEnergy& cutoff) :
90 93 GModelSpectral()
91 94 {
92 95 // Initialise members
... ... @@ -95,8 +98,8 @@ GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double& prefactor,
95 98 // Set parameters
96 99 m_norm.value(prefactor);
97 100 m_index.value(index);
98   - m_ecut.value(ecut.MeV()); // Internally stored in MeV
99 101 m_pivot.value(pivot.MeV()); // Internally stored in MeV
  102 + m_ecut.value(cutoff.MeV()); // Internally stored in MeV
100 103  
101 104 // Autoscale parameters
102 105 autoscale();
... ...