SkyModel¶
-
class
gammapy.modeling.models.SkyModel(spectral_model, spatial_model=None, temporal_model=None, name=None, apply_irf=None, datasets_names=None)[source]¶ Bases:
gammapy.modeling.models.SkyModelBaseSky model component.
This model represents a factorised sky model. It has
Parameterscombining the spatial and spectral parameters.- Parameters
- spectral_model
SpectralModel Spectral model
- spatial_model
SpatialModel Spatial model (must be normalised to integrate to 1)
- temporal_model
temporalModel Temporal model
- namestr
Model identifier
- spectral_model
Attributes Summary
Parameters (
Parameters)Methods Summary
__call__(self, lon, lat, energy[, time])Call self as a function.
copy(self[, name])Copy SkyModel
create(tag, \*args, \*\*kwargs)Create a model instance.
evaluate(self, lon, lat, energy[, time])Evaluate the model at given points.
evaluate_geom(self, geom[, gti])Evaluate model on
Geom.from_dict(data)Create SkyModel from dict
from_parameters(parameters, \*\*kwargs)Create model from parameter list
integrate_geom(self, geom[, gti])Integrate model on
Geom.to_dict(self)Create dict for YAML serilisation
Attributes Documentation
-
covariance¶
-
default_parameters= <gammapy.modeling.parameter.Parameters object>¶
-
frame¶
-
name¶
-
parameters¶ Parameters (
Parameters)
-
spatial_model¶
-
spectral_model¶
-
tag= 'SkyModel'¶
-
temporal_model¶
Methods Documentation
-
__call__(self, lon, lat, energy, time=None)¶ Call self as a function.
-
static
create(tag, *args, **kwargs)¶ Create a model instance.
Examples
>>> from gammapy.modeling.models import Model >>> spectral_model = Model.create("PowerLaw2SpectralModel", amplitude="1e-10 cm-2 s-1", index=3) >>> type(spectral_model) gammapy.modeling.models.spectral.PowerLaw2SpectralModel
-
evaluate(self, lon, lat, energy, time=None)[source]¶ Evaluate the model at given points.
The model evaluation follows numpy broadcasting rules.
Return differential surface brightness cube. At the moment in units:
cm-2 s-1 TeV-1 deg-2
-
classmethod
from_parameters(parameters, **kwargs)¶ Create model from parameter list
- Parameters
- parameters
Parameters Parameters for init
- parameters
- Returns
- model
Model Model instance
- model