Bug #1557

GModelSpatialDiffuseConst wrong normalization

Added by Huetten M. about 9 years ago. Updated over 8 years ago.

Status:ClosedStart date:10/19/2015
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.0.0
Duration:

Description

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?

gammalib_DGRB_model.xml Magnifier (854 Bytes) Huetten M., 10/19/2015 05:52 PM

hp_unitysphere.fits (56.3 KB) Huetten M., 10/19/2015 05:52 PM

const_prefactor.png (38.4 KB) Knödlseder Jürgen, 10/27/2015 09:57 PM

const_index.png (37.3 KB) Knödlseder Jürgen, 10/27/2015 09:57 PM

const_bkg_prefactor.png (40.4 KB) Knödlseder Jürgen, 10/27/2015 09:57 PM

const_bkg_index.png (39.6 KB) Knödlseder Jürgen, 10/27/2015 09:57 PM

Const_prefactor Const_index Const_bkg_prefactor Const_bkg_index

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 9 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 about 9 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() and 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.

#3 Updated by Knödlseder Jürgen about 9 years ago

This looks okay now (as shown by the pull distributions below):

#4 Updated by Knödlseder Jürgen about 9 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Bug is fixed, close now.

#5 Updated by Knödlseder Jürgen over 8 years ago

I updated the user documentation to correct an invalid information on the spectral units for the diffuse constant model. The units of the spectral component for this model are not per steradian as quoted.

Also available in: Atom PDF