Change request #2656

Use full true energy binning in csspec for the RMF

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

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

100%

Category:-
Target version:1.6.0
Duration:

Description

Currently, csspec applies a 20% margin to determine the true energy range from the reconstructed energy range. This appears not to be sufficient for HESS data. A solution would be to check the RMF and get the corresponding energy boundaries, but even simpler, all etrue energy bins could be used.


Recurrence

No recurrence.

History

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

  • Status changed from New to Pull request
  • % Done changed from 0 to 100

csspec now uses the full true energy range of the RMF for an On/Off analysis, making sure that the tails of the energy dispersion are not cut in case that they are wider than the 20% margin.

Specifically, the following code is now implemented in csspec._select_onoff_obs():

# Select energy bins in etrue and ereco. All etrue energy bins are
# selected. A 0.1% margin is added for reconstructed energies to
# accomodate for rounding errors.
etrue     = obs.rmf().etrue()
ereco     = gammalib.GEbounds()
itrue     = [i for i in range(obs.rmf().etrue().size())]
ireco     = []
for i in range(obs.rmf().emeasured().size()):
    ereco_bin_min = obs.rmf().emeasured().emin(i)
    ereco_bin_max = obs.rmf().emeasured().emax(i)
    if ereco_bin_min * 1.001 >= emin and ereco_bin_max * 0.999 <= emax:
        ereco.append(ereco_bin_min, ereco_bin_max)
        ireco.append(i)

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

  • Status changed from Pull request to Closed

Merged into devel.

Also available in: Atom PDF