From b989b1ea5c52695ac745c4f495faed0ed9275bef Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sat, 5 Jun 2021 17:40:32 +0200 Subject: [PATCH] Add metadata keywords to output spectrum --- cscripts/csspec.py | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/cscripts/csspec.py b/cscripts/csspec.py index 59efc7f..9c635d5 100755 --- a/cscripts/csspec.py +++ b/cscripts/csspec.py @@ -1232,6 +1232,18 @@ class csspec(ctools.csobservation): # Stamp table self._stamp(table) + # Add metadata keywords + table.card('OBJECT', self['srcname'].string(), 'Source name') + table.card('METHOD', self._method, 'Spectrum generation method') + if self._method == 'BINS': + table.card('BINGAMMA', self['bingamma'].real(), 'Spectral index for BINS method') + table.card('STAT', self['statistic'].string(), 'Optimization statistic') + table.card('EDISP', self['edisp'].boolean(), 'Use energy dispersion?') + table.card('CALCULIM', self['calc_ulim'].boolean(), 'Upper limits computation') + table.card('CALCTS', self['calc_ts'].boolean(), 'Test statistic computation') + table.card('FIXBKG', self['fix_bkg'].boolean(), 'Fix background parameters') + table.card('FIXSRCS', self['fix_srcs'].boolean(), 'Fix other source parameters') + # Create the FITS file now self._fits = gammalib.GFits() self._fits.append(table) -- libgit2 0.21.4