Commit 6e39d7c7334d8c8b8d29549b7173a15b6d5797f9

Authored by Jürgen Knödlseder
1 parent e1f1685f

Adapt to new model interface.

scripts/cssens.py
... ... @@ -295,7 +295,7 @@ class cssens(GApplication):
295 295 # Define spectral component. If a background model is given then
296 296 # use a file function. Otherwise use a static power law.
297 297 if len(self.m_bkg) > 0:
298   - spectrum = GModelSpectralFunc(self.m_bkg)
  298 + spectrum = GModelSpectralFunc(self.m_bkg, 1.0)
299 299 else:
300 300 spectrum = GModelSpectralPlaw(61.8e-6, -1.85, GEnergy(1.0, "TeV"))
301 301 if fitidx:
... ... @@ -369,7 +369,7 @@ class cssens(GApplication):
369 369 spatial["DEC"].fix()
370 370 spatial["Radius"].fix()
371 371 elif type == "shell":
372   - spatial = GModelSpatialRadialShell(location, self.m_radius, self.m_width)
  372 + spatial = GModelSpatialRadialShell(location, self.m_radius, self.m_width)
373 373 if fitpos:
374 374 spatial["RA"].free()
375 375 spatial["DEC"].free()
... ...
scripts/cstsdist.py
... ... @@ -277,7 +277,7 @@ class cstsdist(GApplication):
277 277 radial["Sigma"].fix()
278 278  
279 279 # Define spectral component
280   - spectrum = GModelSpectralFunc(self.m_bkg)
  280 + spectrum = GModelSpectralFunc(self.m_bkg, 1.0)
281 281  
282 282 # Create background model
283 283 model = GCTAModelRadialAcceptance(radial, spectrum)
... ...