SkyModels¶
-
class
gammapy.cube.models.SkyModels(skymodels)[source]¶ Bases:
objectCollection of
SkyModelParameters: skymodels : list of
SkyModelSky models
Examples
Read from an XML file:
from gammapy.cube import SkyModels filename = '$GAMMAPY_EXTRA/test_datasets/models/fermi_model.xml' sourcelib = SkyModels.read(filename)
Attributes Summary
parametersConcatenated parameters. Methods Summary
evaluate(lon, lat, energy)from_xml(xml)Read from XML string. read(filename)Read from XML file. to_compound_model()Return CompoundSkyModelto_xml(filename)Write to XML file. Attributes Documentation
-
parameters¶ Concatenated parameters.
Currently no way to distinguish spectral and spatial.
Methods Documentation
-
classmethod
read(filename)[source]¶ Read from XML file.
The XML definition of some models is uncompatible with the models currently implemented in gammapy. Therefore the following modifications happen to the XML model definition
- PowerLaw: The spectral index is negative in XML but positive in gammapy. Parameter limits are ignored
- ExponentialCutoffPowerLaw: The cutoff energy is transferred to lambda = 1 / cutof energy on read
-
to_compound_model()[source]¶ Return
CompoundSkyModel
-