Commit 42a87fff635f02447c45f28d8607da97da234e38
1 parent
bc3c5e5e
Fix formula in GModelRadialDisk::eval() doxygen documentation
Also added a clarifying comment to GModelRadialDisk::update(). No code change.
Showing
1 changed file
with
12 additions
and
5 deletions
src/model/GModelRadialDisk.cpp
| ... | ... | @@ -217,16 +217,16 @@ GModelRadialDisk* GModelRadialDisk::clone(void) const |
| 217 | 217 | /***********************************************************************//** |
| 218 | 218 | * @brief Evaluate function (in units of sr^-1) |
| 219 | 219 | * |
| 220 | - * @param[in] theta Angular distance from shell centre (radians). | |
| 220 | + * @param[in] theta Angular distance from disk centre (radians). | |
| 221 | 221 | * |
| 222 | 222 | * Evaluates the spatial part for a disk source model. The disk source |
| 223 | 223 | * model is a radial function \f$f(\theta)\f$, where \f$\theta\f$ is the |
| 224 | - * angular separation between shell centre and the actual location: | |
| 224 | + * angular separation between disk centre and the actual location: | |
| 225 | 225 | * \f[ |
| 226 | 226 | * f(\theta) = \left \{ |
| 227 | 227 | * \begin{array}{l l} |
| 228 | 228 | * \displaystyle |
| 229 | - * 2 \pi ( 1 - \cos(\theta)) | |
| 229 | + * {\tt m\_norm} | |
| 230 | 230 | * & \mbox{if $\theta \le $ radius} \\ |
| 231 | 231 | * \\ |
| 232 | 232 | * \displaystyle |
| ... | ... | @@ -234,6 +234,8 @@ GModelRadialDisk* GModelRadialDisk::clone(void) const |
| 234 | 234 | * \end{array} |
| 235 | 235 | * \right . |
| 236 | 236 | * \f] |
| 237 | + * \f${\tt m\_norm}\f$ is a normalization constant | |
| 238 | + * (see the update() method). | |
| 237 | 239 | ***************************************************************************/ |
| 238 | 240 | double GModelRadialDisk::eval(const double& theta) const |
| 239 | 241 | { |
| ... | ... | @@ -263,7 +265,7 @@ double GModelRadialDisk::eval(const double& theta) const |
| 263 | 265 | /***********************************************************************//** |
| 264 | 266 | * @brief Evaluate function and gradients (in units of sr^-1) |
| 265 | 267 | * |
| 266 | - * @param[in] theta Angular distance from shell centre (radians). | |
| 268 | + * @param[in] theta Angular distance from disk centre (radians). | |
| 267 | 269 | * |
| 268 | 270 | * Evaluates the function value. No gradient computation is implemented as |
| 269 | 271 | * radial models will be convolved with the instrument response and thus |
| ... | ... | @@ -478,7 +480,7 @@ void GModelRadialDisk::init_members(void) |
| 478 | 480 | m_pars.push_back(&m_radius); |
| 479 | 481 | |
| 480 | 482 | // Initialise precomputation cache. Note that zero values flag |
| 481 | - // uninitialised as a zero radius and width shell is not meaningful | |
| 483 | + // uninitialised as a zero radius is not meaningful | |
| 482 | 484 | m_last_radius = 0.0; |
| 483 | 485 | m_radius_rad = 0.0; |
| 484 | 486 | m_norm = 0.0; |
| ... | ... | @@ -527,6 +529,11 @@ void GModelRadialDisk::free_members(void) |
| 527 | 529 | * |
| 528 | 530 | * Computes the normalization |
| 529 | 531 | * \f[{\tt m\_norm} = \frac{1}{2 \pi (1 - \cos r)}\f] |
| 532 | + * | |
| 533 | + * Note that this is the correct normalization on the sphere for any | |
| 534 | + * disk radius r. For small r it is very similar to the cartesian | |
| 535 | + * approximation you might have expected: | |
| 536 | + * \f[{\tt m\_norm} = \frac{1}{\pi r ^ 2}\f] | |
| 530 | 537 | ***************************************************************************/ |
| 531 | 538 | void GModelRadialDisk::update() const |
| 532 | 539 | { | ... | ... |