Bug #722
Formulas in the GModelRadialDisk docstrings are incorrect
Status: | Closed | Start date: | 01/30/2013 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assigned To: | Deil Christoph | % Done: | 100% | |
Category: | - | |||
Target version: | 00-08-00 | |||
Duration: |
Description
The doxygen formula for eval of the GModelRadialDisk is incorrect:
http://gammalib.sourceforge.net/doxygen/classGModelRadialDisk.html#a3878d8615b796bac184d6cc9454e759d
The code is OK:
https://github.com/gammalib/gammalib/blob/devel/src/model/GModelRadialDisk.cpp#L244
The doxygen formula and code for the normalization of the disk model match:
http://gammalib.sourceforge.net/doxygen/classGModelRadialDisk.html#aa5add6be40765e26443f03de0a23576a
and seem to be correct: test/example_radial_models.py
Why though, I think the normalization should be 1 / (pi x radius^2) instead?
This is a simple change, I could make a pull request tonight, but I would like to be sure about the correct formula for the normalization first ...
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen almost 12 years ago
Everything is done in spherical coordinates in GammaLib, so that the model applies even to very large disks (e.g. Fermi bubbles). I think the code is correct for spherical coordinates, but please check.
See http://en.wikipedia.org/wiki/Solid_angle section “Solid angles for common objects”.
#2 Updated by Deil Christoph almost 12 years ago
- Status changed from New to Pull request
- Priority changed from Normal to Low
The code is OK, the formula in the doxygen comment for eval() was not.
Please pull this one commit:
https://github.com/cdeil/gammalib/commit/42a87fff635f02447c45f28d8607da97da234e38
https://github.com/cdeil/gammalib/tree/disk_spatial_model_doc_fix
#3 Updated by Knödlseder Jürgen almost 12 years ago
- Status changed from Pull request to Closed
- % Done changed from 0 to 100
Modification has been integrated and merged in the devel
branch.