Bug #2133

1DC IRF issue

Added by Knödlseder Jürgen over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:06/26/2017
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.3.1
Duration:

Description

Dear Jurgen,

we have tried to do some basic analysis with recently released 1dc GPS data, but encountered certain issues during the fitting step.

Namely, executing

ctlike inobs=p.evt inmodel=psrb1.xml outmodel=tst_1dc.xml chatter=4 debug=yes | tee -a log_min.log

in the attached Example folder (close-to-minimal working example) we get a lot of errors, similar to one below

*** ERROR: cta_nroi_diffuse_kern_phi::eval(phi=4.4915): NaN/Inf encountered (nroi=-nan, intensity=3.4392e-14, cos_phi=-0.219101, sin_phi=-0.975702)
*** ERROR: GCTAResponseIrf::npsf: NaN/Inf encountered (value=-nan, roi_radius=0.0872665, roi_psf_distance=0.0859906, r=[0,inf])
*** ERROR: GCTAResponseIrf::nroi: NaN/Inf encountered (nroi=-nan, theta=0.0859906, phi=0)

We’ve noticed, that changing the IRFs from 1dc to prod3b in p.evt file (=p_good.evt) makes ctlike to work fine.

Exclusion of the IEM background from psrb1.xml region model also makes ctlike to work even with 1dc IRFs.

We’ve tried also replace cube_iem.fits.gz file with our own “Map Cube” file based on galprop code, but this did not work and ctlike still failed with 1dc IRFs.

With the other diffuse/extended sources, e.g. Fermi Bublbes (=SpatialMap source type), or HESSJ1303 (=EllipticalGauss source type) ctlike works fine with 1dc IRFs (if no IEM is in the model)

Probably ctlike fails to work with new 1dc IRFs if a source with MapCubeFunction spatial model is present in ROI model.

May you take a look into this issue and let us know?

Cheers,
Denis and Masha

gamma-king-function.png (17.9 KB) Knödlseder Jürgen, 06/26/2017 11:54 AM

Gamma-king-function

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 7 years ago

The issue arises due to an edge effect in the IRF. For the data you got the King function PSF was used, and the gamma parameter is dropping to zero for low energies and/or large offset angles (see attached plot). For areas where the gamma parameter is zero the code correctly handles the PSF, but in intermediate zones were the gamma parameter is interpolated to values close but larger than 1 the problems come in. I will fix this issue.

Note that we decided to finally use the Gaussian PSF for the 1DC, hence this issue should not occur in the data release.

#2 Updated by Knödlseder Jürgen over 7 years ago

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.3.1
  • % Done changed from 0 to 100

I corrected the problem and merged the code into the bugfix-1.3.1 branch.

#3 Updated by Knödlseder Jürgen over 7 years ago

  • Project changed from ctools to GammaLib
  • Target version deleted (1.3.1)

Bug concerned GammaLib.

#4 Updated by Knödlseder Jürgen over 7 years ago

  • Target version set to 1.3.1

Also available in: Atom PDF