Action #1673

Reduce ctobssim computing time for low energies

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

Status:ClosedStart date:02/16/2016
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.1.0
Duration:

Description

ctobssim actually wastes a lot of time for at energies since many of the simulated photons will be rejected. The reason for this is that the thrown area has been fixed to a constant value that is determined by the large effective area at high energies, while at low energies the effective area drops dramatically, leading to a waste in computing cycles.

This problem can be solved by introducing logarithmically spaced energy slices for the simulation, and by determining in each of the slices the maximum effective area from the response function. This also overcomes the problem of fixing the effective area in advance, making ctobssim more flexible.


Recurrence

No recurrence.

History

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

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

This was done.

A hidden parameter eslices was introduced to control the number of logarithmically spaced internal energy bins. By default 10 bins will be used (I have not really tried to optimise the number).

I also modified the GModelSpatialDiffuseMap and GModelSpatialDiffuseCube set_mc_cone methods to cache the computations in case that the simulation cone has not changed. This speeds up quite a bit the simulations for these models, and becomes in particular necessary for the energy slicing (as otherwise the Monte Carlo cone computations are done for every energy slice).

Code compiles and seems to work, but better wait for the outcome of the automatic science verification before closing the issue.

#2 Updated by Knödlseder Jürgen about 8 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Remaining (hours) set to 0.0

Gabi reported that it works fine, close now.

Also available in: Atom PDF