Commit a71a6a9654245768b722da60496c43600265ab6a

Authored by Jürgen Knödlseder
1 parent 167a6787

Adapt to new obsutils interface.

scripts/cstsdist.py
... ... @@ -254,9 +254,9 @@ class cstsdist(GApplication):
254 254 pntdir.lb_deg(lpnt, bpnt)
255 255  
256 256 # Create CTA observation
257   - run = obsutils.set(pntdir, caldb=self.m_caldb, irf=self.m_irf, \
258   - duration=self.m_duration, \
259   - emin=emin, emax=emax, rad=self.m_rad)
  257 + run = obsutils.set_obs(pntdir, caldb=self.m_caldb, irf=self.m_irf, \
  258 + duration=self.m_duration, \
  259 + emin=emin, emax=emax, rad=self.m_rad)
260 260  
261 261 # Append observation to container
262 262 obs.append(run)
... ...
test/example_survey.py
... ... @@ -25,7 +25,7 @@ from math import *
25 25 import os
26 26 import glob
27 27 import sys
28   -import obsutils
  28 +from ctools import obsutils
29 29  
30 30  
31 31 # =========== #
... ... @@ -235,8 +235,7 @@ def survey_single():
235 235 # Set single pointing at galactic centre
236 236 pntdir = GSkyDir()
237 237 pntdir.lb_deg(0.0, 0.0)
238   - #run = set_one_obs(pntdir)
239   - run = obsutils.set(pntdir)
  238 + run = obsutils.set_obs(pntdir)
240 239 obs.append(run)
241 240  
242 241 # Define single point source with Crab flux at galactic centre
... ... @@ -276,8 +275,7 @@ def survey_gplane(lrange=10, lstep=2):
276 275 # Set pointing
277 276 pntdir = GSkyDir()
278 277 pntdir.lb_deg(l, 0.0)
279   - #run = set_one_obs(pntdir)
280   - run = obsutils.set(pntdir)
  278 + run = obsutils.set_obs(pntdir)
281 279 run.id(str(l))
282 280 obs.append(run)
283 281  
... ...