Commit d4e2e6982fa8827b053bbb3d8c3dd9ad242dea5e
1 parent
9b589a7b
Rename norm to prefactor.
Showing
3 changed files
with
27 additions
and
23 deletions
include/GModelSpectralExpPlaw.hpp
| ... | ... | @@ -61,8 +61,10 @@ class GModelSpectralExpPlaw : public GModelSpectral { |
| 61 | 61 | public: |
| 62 | 62 | // Constructors and destructors |
| 63 | 63 | GModelSpectralExpPlaw(void); |
| 64 | - explicit GModelSpectralExpPlaw(const double& norm, const double& index, | |
| 65 | - const GEnergy& ecut, const GEnergy& pivot); | |
| 64 | + explicit GModelSpectralExpPlaw(const double& prefactor, | |
| 65 | + const double& index, | |
| 66 | + const GEnergy& ecut, | |
| 67 | + const GEnergy& pivot); | |
| 66 | 68 | explicit GModelSpectralExpPlaw(const GXmlElement& xml); |
| 67 | 69 | GModelSpectralExpPlaw(const GModelSpectralExpPlaw& model); |
| 68 | 70 | virtual ~GModelSpectralExpPlaw(void); |
| ... | ... | @@ -91,11 +93,11 @@ public: |
| 91 | 93 | virtual std::string print(void) const; |
| 92 | 94 | |
| 93 | 95 | // Other methods |
| 94 | - double norm(void) const; | |
| 96 | + double prefactor(void) const; | |
| 95 | 97 | double index(void) const; |
| 96 | 98 | GEnergy ecut(void) const; |
| 97 | 99 | GEnergy pivot(void) const; |
| 98 | - void norm(const double& norm); | |
| 100 | + void prefactor(const double& prefactor); | |
| 99 | 101 | void index(const double& index); |
| 100 | 102 | void ecut(const GEnergy& ecut); |
| 101 | 103 | void pivot(const GEnergy& pivot); |
| ... | ... | @@ -183,30 +185,30 @@ std::string GModelSpectralExpPlaw::type(void) const |
| 183 | 185 | |
| 184 | 186 | |
| 185 | 187 | /***********************************************************************//** |
| 186 | - * @brief Return normalization factor | |
| 188 | + * @brief Return pre factor | |
| 187 | 189 | * |
| 188 | - * @return Normalization factor (ph/cm2/s/MeV). | |
| 190 | + * @return Pre factor (ph/cm2/s/MeV). | |
| 189 | 191 | * |
| 190 | - * Returns the normalization factor. | |
| 192 | + * Returns the pre factor. | |
| 191 | 193 | ***************************************************************************/ |
| 192 | 194 | inline |
| 193 | -double GModelSpectralExpPlaw::norm(void) const | |
| 195 | +double GModelSpectralExpPlaw::prefactor(void) const | |
| 194 | 196 | { |
| 195 | 197 | return (m_norm.value()); |
| 196 | 198 | } |
| 197 | 199 | |
| 198 | 200 | |
| 199 | 201 | /***********************************************************************//** |
| 200 | - * @brief Set normalization factor | |
| 202 | + * @brief Set pre factor | |
| 201 | 203 | * |
| 202 | - * @param[in] norm Normalization factor (ph/cm2/s/MeV). | |
| 204 | + * @param[in] norm Pre factor (ph/cm2/s/MeV). | |
| 203 | 205 | * |
| 204 | - * Sets the normalization factor. | |
| 206 | + * Sets the pre factor. | |
| 205 | 207 | ***************************************************************************/ |
| 206 | 208 | inline |
| 207 | -void GModelSpectralExpPlaw::norm(const double& norm) | |
| 209 | +void GModelSpectralExpPlaw::prefactor(const double& prefactor) | |
| 208 | 210 | { |
| 209 | - m_norm.value(norm); | |
| 211 | + m_norm.value(prefactor); | |
| 210 | 212 | return; |
| 211 | 213 | } |
| 212 | 214 | ... | ... |
pyext/GModelSpectralExpPlaw.i
| ... | ... | @@ -39,8 +39,10 @@ class GModelSpectralExpPlaw : public GModelSpectral { |
| 39 | 39 | public: |
| 40 | 40 | // Constructors and destructors |
| 41 | 41 | GModelSpectralExpPlaw(void); |
| 42 | - explicit GModelSpectralExpPlaw(const double& norm, const double& index, | |
| 43 | - const GEnergy& ecut, const GEnergy& pivot); | |
| 42 | + explicit GModelSpectralExpPlaw(const double& prefactor, | |
| 43 | + const double& index, | |
| 44 | + const GEnergy& ecut, | |
| 45 | + const GEnergy& pivot); | |
| 44 | 46 | explicit GModelSpectralExpPlaw(const GXmlElement& xml); |
| 45 | 47 | GModelSpectralExpPlaw(const GModelSpectralExpPlaw& model); |
| 46 | 48 | virtual ~GModelSpectralExpPlaw(void); |
| ... | ... | @@ -65,13 +67,13 @@ public: |
| 65 | 67 | virtual void write(GXmlElement& xml) const; |
| 66 | 68 | |
| 67 | 69 | // Other methods |
| 68 | - double norm(void) const; | |
| 70 | + double prefactor(void) const; | |
| 71 | + void prefactor(const double& prefactor); | |
| 69 | 72 | double index(void) const; |
| 70 | - GEnergy ecut(void) const; | |
| 71 | - GEnergy pivot(void) const; | |
| 72 | - void norm(const double& norm); | |
| 73 | 73 | void index(const double& index); |
| 74 | + GEnergy ecut(void) const; | |
| 74 | 75 | void ecut(const GEnergy& ecut); |
| 76 | + GEnergy pivot(void) const; | |
| 75 | 77 | void pivot(const GEnergy& pivot); |
| 76 | 78 | }; |
| 77 | 79 | ... | ... |
src/model/GModelSpectralExpPlaw.cpp
| ... | ... | @@ -75,15 +75,15 @@ GModelSpectralExpPlaw::GModelSpectralExpPlaw(void) : GModelSpectral() |
| 75 | 75 | /***********************************************************************//** |
| 76 | 76 | * @brief Constructor |
| 77 | 77 | * |
| 78 | - * @param[in] norm Power law normalization. | |
| 78 | + * @param[in] prefactor Pre factor normalization (ph/cm2/s/MeV). | |
| 79 | 79 | * @param[in] index Power law index. |
| 80 | 80 | * @param[in] ecut Cut off energy. |
| 81 | 81 | * @param[in] pivot Pivot energy. |
| 82 | 82 | * |
| 83 | - * Construct an exponentially cut off power law from a normalization value, | |
| 83 | + * Construct an exponentially cut off power law from a prefactor value, | |
| 84 | 84 | * a spectral index, a cut off energy and a pivot energy. |
| 85 | 85 | ***************************************************************************/ |
| 86 | -GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double& norm, | |
| 86 | +GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double& prefactor, | |
| 87 | 87 | const double& index, |
| 88 | 88 | const GEnergy& ecut, |
| 89 | 89 | const GEnergy& pivot) : |
| ... | ... | @@ -93,7 +93,7 @@ GModelSpectralExpPlaw::GModelSpectralExpPlaw(const double& norm, |
| 93 | 93 | init_members(); |
| 94 | 94 | |
| 95 | 95 | // Set parameters |
| 96 | - m_norm.value(norm); | |
| 96 | + m_norm.value(prefactor); | |
| 97 | 97 | m_index.value(index); |
| 98 | 98 | m_ecut.value(ecut.MeV()); // Internally stored in MeV |
| 99 | 99 | m_pivot.value(pivot.MeV()); // Internally stored in MeV | ... | ... |