Commit 5e98cffc47ad39e4f866018c4fa4bdefb5cc9650

Authored by Jürgen Knödlseder
1 parent 8c456189

Adapt MWL Python test script to new filename interface definition.

Showing 1 changed file with 4 additions and 6 deletions
inst/mwl/test/test_python.py
... ... @@ -2,8 +2,6 @@
2 2  
3 3 import gammalib
4 4 import math
5   -#from gammalib import *
6   -#from math import *
7 5 import os
8 6  
9 7  
... ... @@ -29,7 +27,7 @@ def extract_data(filename):
29 27  
30 28 # Load spectrum
31 29 spectrum = gammalib.GMWLSpectrum()
32   - spectrum.load(filename, extno)
  30 + spectrum.load(filename+"["+str(extno)+"]")
33 31  
34 32 # Add spectral points
35 33 x = []
... ... @@ -66,9 +64,9 @@ def fit_spectrum(filename, xmlname):
66 64 """
67 65 # Load observations
68 66 obs = gammalib.GObservations()
69   - comptel = gammalib.GMWLObservation(filename, "COMPTEL")
70   - lat = gammalib.GMWLObservation(filename, "LAT")
71   - hess = gammalib.GMWLObservation(filename, "HESS")
  67 + comptel = gammalib.GMWLObservation(filename+"[COMPTEL]")
  68 + lat = gammalib.GMWLObservation(filename+"[LAT]")
  69 + hess = gammalib.GMWLObservation(filename+"[HESS]")
72 70 obs.append(comptel)
73 71 obs.append(lat)
74 72 obs.append(hess)
... ...