Commit b989b1ea5c52695ac745c4f495faed0ed9275bef
1 parent
b4ac9e19
Add metadata keywords to output spectrum
Showing
1 changed file
with
12 additions
and
0 deletions
cscripts/csspec.py
| ... | ... | @@ -1232,6 +1232,18 @@ class csspec(ctools.csobservation): |
| 1232 | 1232 | # Stamp table |
| 1233 | 1233 | self._stamp(table) |
| 1234 | 1234 | |
| 1235 | + # Add metadata keywords | |
| 1236 | + table.card('OBJECT', self['srcname'].string(), 'Source name') | |
| 1237 | + table.card('METHOD', self._method, 'Spectrum generation method') | |
| 1238 | + if self._method == 'BINS': | |
| 1239 | + table.card('BINGAMMA', self['bingamma'].real(), 'Spectral index for BINS method') | |
| 1240 | + table.card('STAT', self['statistic'].string(), 'Optimization statistic') | |
| 1241 | + table.card('EDISP', self['edisp'].boolean(), 'Use energy dispersion?') | |
| 1242 | + table.card('CALCULIM', self['calc_ulim'].boolean(), 'Upper limits computation') | |
| 1243 | + table.card('CALCTS', self['calc_ts'].boolean(), 'Test statistic computation') | |
| 1244 | + table.card('FIXBKG', self['fix_bkg'].boolean(), 'Fix background parameters') | |
| 1245 | + table.card('FIXSRCS', self['fix_srcs'].boolean(), 'Fix other source parameters') | |
| 1246 | + | |
| 1235 | 1247 | # Create the FITS file now |
| 1236 | 1248 | self._fits = gammalib.GFits() |
| 1237 | 1249 | self._fits.append(table) | ... | ... |