Commit f7c5fe8b9883ac280e336b71aab0673a8599c1a7

Authored by Jürgen Knödlseder
1 parent d8e86a14

csobsselect accepts an observation container upon construction and returns an ob…

…servation container through the obs() method.
Showing 1 changed file with 10 additions and 2 deletions
cscripts/csobsselect.py
... ... @@ -55,8 +55,10 @@ class csobsselect(ctools.cscript):
55 55 """
56 56 Get parameters from parfile and setup observations
57 57 """
58   - # Query input parameters
59   - self['inobs'].filename()
  58 + # If there are no observations in container then query the inobs
  59 + # parameter
  60 + if self._obs.size() == 0:
  61 + self['inobs'].filename()
60 62  
61 63 # Query relevant pointing selection parameters
62 64 pntselect = self['pntselect'].string()
... ... @@ -327,6 +329,12 @@ class csobsselect(ctools.cscript):
327 329 # Return
328 330 return
329 331  
  332 + def obs(self):
  333 + """
  334 + Return observation container
  335 + """
  336 + return self._obs
  337 +
330 338 def execute(self):
331 339 """
332 340 Execute the script
... ...