Commit eab4eddca15268cd768664166d2eaede5c2c535c

Authored by Jürgen Knödlseder
1 parent 2ef938fe

Add "name" parameter to csobsdef script

cscripts/csobsdef.par
... ... @@ -23,6 +23,7 @@ outobs, f, a, obs.xml,,, "Output observation definition XML file"
23 23 # Common pointing parameter values
24 24 #=================================
25 25 duration, r, a, 1800.0,,, "Pointing duration (seconds)"
  26 +name, s, h, None,,, "Observation name"
26 27 caldb, s, h, ,,, "Calibration database"
27 28 irf, s, h, ,,, "Instrument response function"
28 29 emin, r, h, UNDEF,,, "Lower energy limit (TeV)"
... ...
cscripts/csobsdef.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generation of an observation definition file
4 4 #
5   -# Copyright (C) 2015-2016 Juergen Knoedlseder
  5 +# Copyright (C) 2015-2017 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -85,7 +85,7 @@ class csobsdef(ctools.cscript):
85 85 """
86 86 # Set name and version
87 87 self._name = 'csobsdef'
88   - self._version = '1.2.0'
  88 + self._version = '1.3.0'
89 89  
90 90 # Initialise class members
91 91 self._obs = gammalib.GObservations()
... ... @@ -217,7 +217,7 @@ class csobsdef(ctools.cscript):
217 217 if 'name' in header:
218 218 name = self._pntdef[row, header.index('name')]
219 219 else:
220   - name = 'None'
  220 + name = self['name'].string()
221 221 obs.name(name)
222 222  
223 223 # Set observation identifier. If no observation identified was
... ...
doc/source/users/reference_manual/csobsdef.rst
... ... @@ -62,6 +62,9 @@ General parameters
62 62 ``duration [real]``
63 63 Duration of observation (in seconds).
64 64  
  65 +``(name = "") [string]``
  66 + Observation name.
  67 +
65 68 ``(caldb = "") [string]``
66 69 Calibration database.
67 70  
... ...