Commit 1b2cd383989e6320976c14ac551b1fc4bed7cf4e

Authored by Jürgen Knödlseder
1 parent 06349ac9

Adapt to latest GammaLib code.

Showing 1 changed file with 3 additions and 2 deletions
test/example_survey.py
... ... @@ -192,7 +192,7 @@ def add_background_model(obs):
192 192  
193 193 # Define background model
194 194 bgd_radial = GCTAModelRadialGauss(3.0)
195   - bgd_spectrum = GModelSpectralPlaw(61.8e-6, -1.85, 1.0e6)
  195 + bgd_spectrum = GModelSpectralPlaw(61.8e-6, -1.85, GEnergy(1.0, "TeV"))
196 196 bgd_model = GCTAModelRadialAcceptance(bgd_radial, bgd_spectrum)
197 197 bgd_model.name("Background")
198 198 bgd_model.instruments("CTA")
... ... @@ -216,7 +216,7 @@ def crab_spec():
216 216 (Albert et al. 2008, ApJ, 674, 1037)
217 217 """
218 218 # Set parameters
219   - spectrum = GModelSpectralPlaw(5.7e-16, -2.48, 3.0e5)
  219 + spectrum = GModelSpectralPlaw(5.7e-16, -2.48, GEnergy(0.3, "TeV"))
220 220  
221 221 # Return spectrum
222 222 return spectrum
... ... @@ -278,6 +278,7 @@ def survey_gplane(lrange=10, lstep=2):
278 278 pntdir.lb_deg(l, 0.0)
279 279 #run = set_one_obs(pntdir)
280 280 run = obsutils.set(pntdir)
  281 + run.id(str(l))
281 282 obs.append(run)
282 283  
283 284 # Define single point source with Crab flux at galactic centre
... ...