Commit 24f5f1c6a1aa9e99eca3f8e89777bab8f7a9d0c3

Authored by Jürgen Knödlseder
1 parent b554fc2e

Optionally add LO_THRES and HI_THRES keywords to IRF

cscripts/csroot2caldb.par
... ... @@ -24,6 +24,8 @@ version, s, a, prod3,,, "Instrument Response Function version"
24 24 analysis, s, a, DESY,,, "Instrument Response Function analysis"
25 25 zenith, r, a, 20.0,0.0,90.0, "Zenith Angle (deg)"
26 26 azimuth, r, a, 0.0,0.0,360.0, "Azimuth Angle (deg)"
  27 +emin, r, h, UNDEF,,, "Minimum energy threshold (TeV)"
  28 +emax, r, h, UNDEF,,, "Maximum energy threshold (TeV)"
27 29 psftype, s, h, Gauss,Gauss|King,, "Point spread function type"
28 30 split, b, h, no,,, "Split IRF components into different files"
29 31 norm1d, b, h, no,,, "Normalize on 1D histograms"
... ...
cscripts/csroot2caldb.py
... ... @@ -588,6 +588,14 @@ class csroot2caldb(ctools.cscript):
588 588 self._set_cif_keywords(ds['HDU_EA'], irf['EA_NAME'],
589 589 irf['EA_BOUNDS'], irf['EA_DESC'], irf)
590 590  
  591 + # Optionally write energy thresholds
  592 + if self['emin'].is_valid():
  593 + emin = self['emin'].real()
  594 + ds['HDU_EA'].card('LO_THRES', emin, '[TeV] Low energy threshold')
  595 + if self['emax'].is_valid():
  596 + emin = self['emax'].real()
  597 + ds['HDU_EA'].card('HI_THRES', emin, '[TeV] High energy threshold')
  598 +
591 599 # Create "EFFAREA" data column
592 600 self._make_2D(etrue, ds['HDU_EA'], 'EFFAREA', 'm2')
593 601  
... ...