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,9 +254,9 @@ class cstsdist(GApplication):
254 pntdir.lb_deg(lpnt, bpnt) 254 pntdir.lb_deg(lpnt, bpnt)
255 255
256 # Create CTA observation 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 # Append observation to container 261 # Append observation to container
262 obs.append(run) 262 obs.append(run)
test/example_survey.py
@@ -25,7 +25,7 @@ from math import * @@ -25,7 +25,7 @@ from math import *
25 import os 25 import os
26 import glob 26 import glob
27 import sys 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,8 +235,7 @@ def survey_single():
235 # Set single pointing at galactic centre 235 # Set single pointing at galactic centre
236 pntdir = GSkyDir() 236 pntdir = GSkyDir()
237 pntdir.lb_deg(0.0, 0.0) 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 obs.append(run) 239 obs.append(run)
241 240
242 # Define single point source with Crab flux at galactic centre 241 # Define single point source with Crab flux at galactic centre
@@ -276,8 +275,7 @@ def survey_gplane(lrange=10, lstep=2): @@ -276,8 +275,7 @@ def survey_gplane(lrange=10, lstep=2):
276 # Set pointing 275 # Set pointing
277 pntdir = GSkyDir() 276 pntdir = GSkyDir()
278 pntdir.lb_deg(l, 0.0) 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 run.id(str(l)) 279 run.id(str(l))
282 obs.append(run) 280 obs.append(run)
283 281