Action #2722

Remove cube response caching.

Added by Knödlseder Jürgen about 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:11/07/2018
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.6.0
Duration:

Description

The diffuse source caching should not be needed anymore in the stacked response, since the caching is now done at the GCTAResponse::irf level (see #2715). Accordingly the caching should be removed. Before removing the code, some checks should be done that the results are identical.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

I removed the caching.

Here some fit results before removal of caching:

2018-11-12T08:04:53: +=========================================+
2018-11-12T08:04:53: | Maximum likelihood optimisation results |
2018-11-12T08:04:53: +=========================================+
2018-11-12T08:04:53: === GOptimizerLM ===
2018-11-12T08:04:53:  Optimized function value ..: 212467.591
2018-11-12T08:04:53:  Absolute precision ........: 0.005
2018-11-12T08:04:53:  Acceptable value decrease .: 2
2018-11-12T08:04:53:  Optimization status .......: converged
2018-11-12T08:04:53:  Number of parameters ......: 10
2018-11-12T08:04:53:  Number of free parameters .: 5
2018-11-12T08:04:53:  Number of iterations ......: 5
2018-11-12T08:04:53:  Lambda ....................: 1e-08
2018-11-12T08:04:53:  Maximum log likelihood ....: -212467.591
2018-11-12T08:04:53:  Observed events  (Nobs) ...: 64000.000
2018-11-12T08:04:53:  Predicted events (Npred) ..: 63985.858 (Nobs - Npred = 14.1421277142872)
2018-11-12T08:04:53: === GModels ===
2018-11-12T08:04:53:  Number of models ..........: 2
2018-11-12T08:04:53:  Number of parameters ......: 10
2018-11-12T08:04:53: === GModelSky ===
2018-11-12T08:04:53:  Name ......................: RX J1713.7-3946
2018-11-12T08:04:53:  Instruments ...............: all
2018-11-12T08:04:53:  Test Statistic ............: 688.935065519356
2018-11-12T08:04:53:  Instrument scale factors ..: unity
2018-11-12T08:04:53:  Observation identifiers ...: all
2018-11-12T08:04:53:  Model type ................: DiffuseSource
2018-11-12T08:04:53:  Model components ..........: "DiffuseMap" * "ExponentialCutoffPowerLaw" * "Constant" 
2018-11-12T08:04:53:  Number of parameters ......: 6
2018-11-12T08:04:53:  Number of spatial par's ...: 1
2018-11-12T08:04:53:   Normalization ............: 1 [0.001,1000]  (fixed,scale=1,gradient)
2018-11-12T08:04:53:  Number of spectral par's ..: 4
2018-11-12T08:04:53:   Prefactor ................: 1.77551551650277e-17 +/- 1.4829292225055e-18 [1e-25,infty[ ph/cm2/s/MeV (free,scale=1e-17,gradient)
2018-11-12T08:04:53:   Index ....................: -1.93112844935052 +/- 0.107644046874146 [10,-10]  (free,scale=-2,gradient)
2018-11-12T08:04:53:   CutoffEnergy .............: 7091998.49234884 +/- 2611571.54562713 [0.1,infty[ MeV (free,scale=10000000,gradient)
2018-11-12T08:04:53:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2018-11-12T08:04:53:  Number of temporal par's ..: 1
2018-11-12T08:04:53:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)
2018-11-12T08:04:53: === GCTAModelCubeBackground ===
2018-11-12T08:04:53:  Name ......................: BackgroundModel
2018-11-12T08:04:53:  Instruments ...............: CTA, HESS, MAGIC, VERITAS
2018-11-12T08:04:53:  Instrument scale factors ..: unity
2018-11-12T08:04:53:  Observation identifiers ...: all
2018-11-12T08:04:53:  Model type ................: "PowerLaw" * "Constant" 
2018-11-12T08:04:53:  Number of parameters ......: 4
2018-11-12T08:04:53:  Number of spectral par's ..: 3
2018-11-12T08:04:53:   Prefactor ................: 0.962991394831387 +/- 0.0048520819609645 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient)
2018-11-12T08:04:53:   Index ....................: -0.0146948929468694 +/- 0.00543130078271457 [-5,5]  (free,scale=1,gradient)
2018-11-12T08:04:53:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2018-11-12T08:04:53:  Number of temporal par's ..: 1
2018-11-12T08:04:53:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)

And here afterwards. The results are identical.
2018-11-12T18:00:34: +=========================================+
2018-11-12T18:00:34: | Maximum likelihood optimisation results |
2018-11-12T18:00:34: +=========================================+
2018-11-12T18:00:34: === GOptimizerLM ===
2018-11-12T18:00:34:  Optimized function value ..: 212467.591
2018-11-12T18:00:34:  Absolute precision ........: 0.005
2018-11-12T18:00:34:  Acceptable value decrease .: 2
2018-11-12T18:00:34:  Optimization status .......: converged
2018-11-12T18:00:34:  Number of parameters ......: 10
2018-11-12T18:00:34:  Number of free parameters .: 5
2018-11-12T18:00:34:  Number of iterations ......: 5
2018-11-12T18:00:34:  Lambda ....................: 1e-08
2018-11-12T18:00:34:  Maximum log likelihood ....: -212467.591
2018-11-12T18:00:34:  Observed events  (Nobs) ...: 64000.000
2018-11-12T18:00:34:  Predicted events (Npred) ..: 63985.858 (Nobs - Npred = 14.1421277142872)
2018-11-12T18:00:34: === GModels ===
2018-11-12T18:00:34:  Number of models ..........: 2
2018-11-12T18:00:34:  Number of parameters ......: 10
2018-11-12T18:00:34: === GModelSky ===
2018-11-12T18:00:34:  Name ......................: RX J1713.7-3946
2018-11-12T18:00:34:  Instruments ...............: all
2018-11-12T18:00:34:  Test Statistic ............: 688.935065519356
2018-11-12T18:00:34:  Instrument scale factors ..: unity
2018-11-12T18:00:34:  Observation identifiers ...: all
2018-11-12T18:00:34:  Model type ................: DiffuseSource
2018-11-12T18:00:34:  Model components ..........: "DiffuseMap" * "ExponentialCutoffPowerLaw" * "Constant" 
2018-11-12T18:00:34:  Number of parameters ......: 6
2018-11-12T18:00:34:  Number of spatial par's ...: 1
2018-11-12T18:00:34:   Normalization ............: 1 [0.001,1000]  (fixed,scale=1,gradient)
2018-11-12T18:00:34:  Number of spectral par's ..: 4
2018-11-12T18:00:34:   Prefactor ................: 1.77551551650277e-17 +/- 1.4829292225055e-18 [1e-25,infty[ ph/cm2/s/MeV (free,scale=1e-17,gradient)
2018-11-12T18:00:34:   Index ....................: -1.93112844935052 +/- 0.107644046874146 [10,-10]  (free,scale=-2,gradient)
2018-11-12T18:00:34:   CutoffEnergy .............: 7091998.49234884 +/- 2611571.54562713 [0.1,infty[ MeV (free,scale=10000000,gradient)
2018-11-12T18:00:34:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2018-11-12T18:00:34:  Number of temporal par's ..: 1
2018-11-12T18:00:34:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)
2018-11-12T18:00:34: === GCTAModelCubeBackground ===
2018-11-12T18:00:34:  Name ......................: BackgroundModel
2018-11-12T18:00:34:  Instruments ...............: CTA, HESS, MAGIC, VERITAS
2018-11-12T18:00:34:  Instrument scale factors ..: unity
2018-11-12T18:00:34:  Observation identifiers ...: all
2018-11-12T18:00:34:  Model type ................: "PowerLaw" * "Constant" 
2018-11-12T18:00:34:  Number of parameters ......: 4
2018-11-12T18:00:34:  Number of spectral par's ..: 3
2018-11-12T18:00:34:   Prefactor ................: 0.962991394831387 +/- 0.0048520819609645 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient)
2018-11-12T18:00:34:   Index ....................: -0.0146948929468694 +/- 0.00543130078271457 [-5,5]  (free,scale=1,gradient)
2018-11-12T18:00:34:   PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient)
2018-11-12T18:00:34:  Number of temporal par's ..: 1
2018-11-12T18:00:34:   Normalization ............: 1 (relative value) (fixed,scale=1,gradient)

The code was merged into devel.

Also available in: Atom PDF