SkyModels¶
-
class
gammapy.cube.models.
SkyModels
(skymodels)[source]¶ Bases:
gammapy.cube.models.SkyModelBase
Collection of
SkyModel
Parameters: - skymodels : list of
SkyModel
Sky models
Examples
Read from an XML file:
from gammapy.cube import SkyModels filename = '$GAMMAPY_DATA/tests/models/fermi_model.xml' sourcelib = SkyModels.read(filename)
Attributes Summary
frame
parameters
Parameters ( Parameters
)skymodels
Methods Summary
__call__
(lon, lat, energy)Call self as a function. copy
()A deep copy. evaluate
(lon, lat, energy)from_xml
(xml)Read from XML string. read
(filename)Read from XML file. to_xml
(filename)Write to XML file. Attributes Documentation
-
frame
= None¶
-
parameters
¶ Parameters (
Parameters
)
-
skymodels
¶
Methods Documentation
-
__call__
(lon, lat, energy)¶ Call self as a function.
-
copy
()¶ A deep copy.
-
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
- skymodels : list of