Commit d7df3c0e568b4203d4d26125dd70d2418ada64fc

Authored by Jürgen Knödlseder
1 parent 63fd354e

Adapt to new model interface.

examples/python/models_howto.py
... ... @@ -38,11 +38,11 @@ def create_models():
38 38 # Create model container
39 39 models = GModels()
40 40  
41   - # Create a powerlaw model for the Crab
  41 + # Create a power law model for the Crab
42 42 crabdir = GSkyDir()
43 43 crabdir.radec_deg(83.6331, 22.0145)
44 44 spatial = GModelSpatialPointSource(crabdir)
45   - spectral = GModelSpectralPlaw(5.7e-16, -2.48, 100.0)
  45 + spectral = GModelSpectralPlaw(5.7e-16, -2.48, GEnergy(100.0, "MeV"))
46 46 model = GModelSky(spatial, spectral)
47 47 models.append(model)
48 48  
... ... @@ -66,5 +66,5 @@ if __name__ == '__main__':
66 66  
67 67 # Create XML document
68 68 models = create_models()
69   - print models
  69 + print(models)
70 70  
71 71 \ No newline at end of file
... ...