GModelSpatialDiffuseConst wrong normalization
|Assigned To:||Knödlseder Jürgen||% Done:|
In the user manual, it is written that for GModelSpatialDiffuseConst, the spectral units are given in cm?2s?1MeV?1sr?1 (http://cta.irap.omp.eu/gammalib/user_manual/modules/model.html).
In fact, it seems that the total flux is calculated over the whole sphere, instead over 1 sr. I.e. GModelSpatialDiffuseConst behaves exactly as for GModelSpatialDiffuseMap, with an unity sphere as input map (e.g., with hp_unitysphere.fits enclosed). In the latter case, the spatial part is normalized to 1 ph cm?2 s-1 on the full sphere. I compared the latter case (by simulating events) with GModelSpatialDiffuseConst, and got exactly the same result. For my understanding, according to the user manual, the results should differ by a factor 4pi.
Enclosed the model file to reproduce issue (one of the two spatial models is commented in the xml file).
Maybe it’s enough just be clearer in the user manual?
#1 Updated by Knödlseder Jürgen over 7 years ago
- Status changed from New to In Progress
- Assigned To changed from Huetten M. to Knödlseder Jürgen
- Target version set to 1.0.0
- % Done changed from 0 to 10
Thanks for pointing this out.
I looked into the issue and confirm your findings. Somehow I have assumed that the
eval() methods of the spatial component are per solid angle, but as the model components (spatial, spectral and temporal) are simply multiplied, the diffuse constant model is indeed given not per steradian but integrated over the entire sphere.
I will update the documentation.
#2 Updated by Knödlseder Jürgen over 7 years ago
- % Done changed from 10 to 50
I take back what I wrote yesterday.
The normalization of the isotropic diffuse model should be in units of cm-2 s-1 MeV-1 sr-1 and there was in fact a mismatch between the Monte Carlo simulations and the model evaluation that amounted to 4 pi. I divide now the model value in the
eval_gradients() methods by 4 pi as these methods are expected to return a value in units of sr-1.
Pull distributions for the isotropic model are in progress to check if this fixes the problem.