Commit b5029daa98ef475fe0c3c1085ff10f5ba5fe8239
1 parent
9fe29ea5
slight tweak
Showing
1 changed file
with
6 additions
and
8 deletions
inst/cta/src/GCTAPsf2D.cpp
| ... | ... | @@ -675,7 +675,7 @@ void GCTAPsf2D::update(const double& logE, const double& theta) const |
| 675 | 675 | /***********************************************************************//** |
| 676 | 676 | * @brief Return the radius that contains a fraction of the events (radians) |
| 677 | 677 | * |
| 678 | - * @param[in] fraction of events (0.0-1.0) | |
| 678 | + * @param[in] fraction of events (0.0<fraction<1.0) | |
| 679 | 679 | * @param[in] logE Log10 of the true photon energy (TeV). |
| 680 | 680 | * @param[in] theta Offset angle in camera system (rad). Not used. |
| 681 | 681 | * @param[in] phi Azimuth angle in camera system (rad). Not used. |
| ... | ... | @@ -683,19 +683,17 @@ void GCTAPsf2D::update(const double& logE, const double& theta) const |
| 683 | 683 | * @param[in] azimuth Azimuth angle in Earth system (rad). Not used. |
| 684 | 684 | * @param[in] etrue Use true energy (true/false). Not used. |
| 685 | 685 | * |
| 686 | - * Solve | |
| 686 | + * Uses the Newton-Raphson method to find which 'a' solves the equation: | |
| 687 | 687 | * |
| 688 | 688 | * \f[ |
| 689 | 689 | * |
| 690 | 690 | * fraction = \pi * m\_norm * \left( |
| 691 | - * \left( \frac{m\_norm }{m\_width1} e^{m\_width1 * a^2} \right) + | |
| 692 | - * \left( \frac{m\_norm2}{m\_width2} e^{m\_width2 * a^2} \right) + | |
| 693 | - * \left( \frac{m\_norm3}{m\_width3} e^{m\_width3 * a^2} \right) \right) | |
| 691 | + * \frac{ 1 }{m\_width1} e^{m\_width1 * a^2} + | |
| 692 | + * \frac{m\_norm2}{m\_width2} e^{m\_width2 * a^2} + | |
| 693 | + * \frac{m\_norm3}{m\_width3} e^{m\_width3 * a^2} \right) | |
| 694 | 694 | * |
| 695 | 695 | * \f] |
| 696 | 696 | * |
| 697 | - * for a. | |
| 698 | - * | |
| 699 | 697 | * Calculate the radius from the center that contains 'fraction' percent |
| 700 | 698 | * of the events. fraction * 100. = Containment % . Fraction must be |
| 701 | 699 | * 0.0 < fraction < 1.0 . |
| ... | ... | @@ -713,7 +711,7 @@ double GCTAPsf2D::containment_radius(const double& fraction, |
| 713 | 711 | std::string origin = "GCTAPsf2D::containment_radius" ; |
| 714 | 712 | std::string message = " First argument (fraction=" + |
| 715 | 713 | gammalib::str(fraction) + ") must be between " + |
| 716 | - "0.0 and 1.0 ." ; | |
| 714 | + "0.0 and 1.0, not inclusive." ; | |
| 717 | 715 | throw GException::invalid_argument( origin, message ) ; |
| 718 | 716 | } |
| 719 | 717 | ... | ... |