Bug #3472

Investigate why high-latitudes have positive residuals

Added by Knödlseder Jürgen almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:12/01/2020
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.7.3
Duration:

Description

As shown in the Gaussian correlated residuals plut below, there are negative residuals in the Galactic plane and positive residuals at high galactic latitudes. The origin of this bias should be investigated.

residuals_none_20201109_gauss05.png (1.97 MB) Knödlseder Jürgen, 12/01/2020 12:23 PM

gps_anticentre_ebins20.png (49 KB) Knödlseder Jürgen, 12/01/2020 12:24 PM

gps_anticentre_ebins30.png (47.2 KB) Knödlseder Jürgen, 12/01/2020 12:24 PM

gps_anticentre_ebins40.png (52.3 KB) Knödlseder Jürgen, 12/01/2020 12:25 PM

gps_anticentre_ebins60.png (54.3 KB) Knödlseder Jürgen, 12/01/2020 12:25 PM

residual_irf100.png (442 KB) Knödlseder Jürgen, 12/01/2020 11:01 PM

residual_irf.png (549 KB) Knödlseder Jürgen, 12/01/2020 11:01 PM

residual.png (545 KB) Knödlseder Jürgen, 12/01/2020 11:01 PM

residual_irf_new.png (552 KB) Knödlseder Jürgen, 12/01/2020 11:07 PM

residual_new.png (552 KB) Knödlseder Jürgen, 12/01/2020 11:22 PM

gps_anticentre_before.png (774 KB) Knödlseder Jürgen, 12/02/2020 12:21 AM

gps_anticentre_after.png (781 KB) Knödlseder Jürgen, 12/02/2020 12:21 AM

Residuals_none_20201109_gauss05 Gps_anticentre_ebins20 Gps_anticentre_ebins30 Gps_anticentre_ebins40 Gps_anticentre_ebins60 Residual_irf100 Residual_irf Residual Residual_irf_new Residual_new Gps_anticentre_before Gps_anticentre_after

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 4 years ago

I checked whether the residuals change with a changed number of energy bins. The figures below show the latitude residuals for 20, 30, 40 and 60 energy bins. Apparently the residuals do not reduce with an increase in the number of energy bins.

20 bins 30 bins
40 bins 60 bins

#2 Updated by Knödlseder Jürgen almost 4 years ago

  • Tracker changed from Action to Bug
  • Project changed from gsrvy to GammaLib
  • Target version set to 2.0.0

#3 Updated by Knödlseder Jürgen almost 4 years ago

  • File residual.png added

I did a single simulation of 50h of background only on the Galactic centre, generated response and background cubes, computed a model cube and displayed the residual between data and model. I selected an energy range of 70 GeV - 199 TeV and used the prod3b-v2 IRF South_z20_50h. I used 20 energy bins.

Below the residuals counts cube - model cube for the first energy bin (70-104.2 GeV). There is obviously an excess in the residuals that is not expected.

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

  • File residual_irf.png added

For comparison the residual that is obtained when the IRF response instead of the stacked response is used. This looks better, but is not perfect.

#5 Updated by Knödlseder Jürgen almost 4 years ago

  • File residual_irf100.png added

Here the same result for 100 energy bins, done using the IRF response computation. This is now a better, although there is still some structure visible, but maybe related to poor statistic.

#6 Updated by Knödlseder Jürgen almost 4 years ago

  • File deleted (residual_irf.png)

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

  • File deleted (residual.png)

#8 Updated by Knödlseder Jürgen almost 4 years ago

  • File deleted (residual_irf100.png)

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

#10 Updated by Knödlseder Jürgen almost 4 years ago

I made a modification in GCTAModelIrfBackground::eval() using now the GCTABackground3D::rate_ebin() integrator method instead of the GCTABackground3D::operator() operator. This takes a bit more time (ctmodel takes 4.9 seconds instead of 3.6 seconds before, which is actually not so bad). The residuals are now clean.

#11 Updated by Knödlseder Jürgen almost 4 years ago

I simplified the GCTACubeBackground::fill() method, removing the power law integration, and using directly the GCTAModelIrfBackground::eval() method which is now exact. Recomputing the background cube using ctbkgcube and then computing a model using the stacked response using ctmodel produced the following plot. It looks perfect, and actually identical to the plot generated using the IRF response.

#12 Updated by Knödlseder Jürgen almost 4 years ago

I redid the GPS anticentre analysis. Below the result, top is original run, bottom the modified code. Things look now much better!


Also note that the background model fit parameters are now much closer to nominal. The normalisation of the IEM is also impacted, not being consistent with the nominal value of 1.

Before:

2020-11-30T16:23:18: === GCTAModelCubeBackground ===
2020-11-30T16:23:18:  Name ......................: BackgroundModel
2020-11-30T16:23:18:  Instruments ...............: CTA, HESS, MAGIC, VERITAS
2020-11-30T16:23:18:  Observation identifiers ...: all
2020-11-30T16:23:18:  Model type ................: "PowerLaw" * "Constant" 
2020-11-30T16:23:18:  Number of parameters ......: 4
2020-11-30T16:23:18:  Number of spectral par's ..: 3
2020-11-30T16:23:18:   Prefactor ................: 0.95425308484162 +/- 0.00401027199310809 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient)
2020-11-30T16:23:18:   Index ....................: -0.0242787890275514 +/- 0.00147495295160353 [-5,5]  (free,scale=1,gradient)
2020-11-30T16:23:18:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2020-11-30T16:23:18:  Number of temporal par's ..: 1
2020-11-30T16:23:18:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)
2020-11-30T16:23:18: === GCTAModelSkyCube ===
2020-11-30T16:23:18:  Name ......................: IEM
2020-11-30T16:23:18:  Instruments ...............: all
2020-11-30T16:23:18:  Observation identifiers ...: all
2020-11-30T16:23:18:  Model type ................: "ConstantValue" * "Constant" 
2020-11-30T16:23:18:  Number of parameters ......: 3
2020-11-30T16:23:18:  Number of spectral par's ..: 1
2020-11-30T16:23:18:   Value ....................: 16.6818659128961 +/- 1.41465490793952 [1e-05,100000]  (free,scale=1,gradient)
2020-11-30T16:23:18:  Number of temporal par's ..: 1
2020-11-30T16:23:18:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)

After:
2020-12-01T23:09:55: === GCTAModelCubeBackground ===
2020-12-01T23:09:55:  Name ......................: BackgroundModel
2020-12-01T23:09:55:  Instruments ...............: CTA, HESS, MAGIC, VERITAS
2020-12-01T23:09:55:  Observation identifiers ...: all
2020-12-01T23:09:55:  Model type ................: "PowerLaw" * "Constant" 
2020-12-01T23:09:55:  Number of parameters ......: 4
2020-12-01T23:09:55:  Number of spectral par's ..: 3
2020-12-01T23:09:55:   Prefactor ................: 0.998666663749527 +/- 0.00463828188617879 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient)
2020-12-01T23:09:55:   Index ....................: -0.000905912390236462 +/- 0.00158187474876209 [-5,5]  (free,scale=1,gradient)
2020-12-01T23:09:55:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2020-12-01T23:09:55:  Number of temporal par's ..: 1
2020-12-01T23:09:55:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)
2020-12-01T23:09:55: === GCTAModelSkyCube ===
2020-12-01T23:09:55:  Name ......................: IEM
2020-12-01T23:09:55:  Instruments ...............: all
2020-12-01T23:09:55:  Observation identifiers ...: all
2020-12-01T23:09:55:  Model type ................: "ConstantValue" * "Constant" 
2020-12-01T23:09:55:  Number of parameters ......: 3
2020-12-01T23:09:55:  Number of spectral par's ..: 1
2020-12-01T23:09:55:   Value ....................: 1.83811471079993 +/- 1.65034103271708 [1e-05,100000]  (free,scale=1,gradient)
2020-12-01T23:09:55:  Number of temporal par's ..: 1
2020-12-01T23:09:55:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)

#13 Updated by Knödlseder Jürgen almost 4 years ago

  • Target version changed from 2.0.0 to 1.7.3

I moved the issue to the bugfix-1.7.3 release.

Note that I had also added GCTAEventBin::emin() and GCTAEventBin::emax() methods to compute the event boundaries for an event bin from the log mean energy and energy bin width. I kept these methods in release 2.0.0 but removed them from release 1.7.3 since a bugfix release should have no interface change.

#14 Updated by Knödlseder Jürgen almost 4 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 90 to 100

#15 Updated by Knödlseder Jürgen almost 4 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF