BackgroundModel

class gammapy.modeling.models.BackgroundModel(map, norm=1, tilt=0, reference='1 TeV', name='background', filename=None)[source]

Bases: gammapy.modeling.Model

Background model.

Create a new map by a tilt and normalization on the available map

Parameters:
map : Map

Background model map

norm : float

Background normalization

tilt : float

Additional tilt in the spectrum

reference : Quantity

Reference energy of the tilt.

Attributes Summary

energy_center True energy axis bin centers (Quantity)
filename
map
name
norm
parameters Parameters (Parameters)
reference
tag
tilt

Methods Summary

copy(self) A deep copy.
create(tag, \*args, \*\*kwargs) Create a model instance.
evaluate(self) Evaluate background model.
from_dict(data)
to_dict(self)

Attributes Documentation

energy_center

True energy axis bin centers (Quantity)

filename
map
name
norm
parameters

Parameters (Parameters)

reference
tag = 'BackgroundModel'
tilt

Methods Documentation

copy(self)

A deep copy.

static create(tag, *args, **kwargs)

Create a model instance.

Examples

>>> from gammapy.modeling 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)[source]

Evaluate background model.

Returns:
background_map : Map

Background evaluated on the Map

classmethod from_dict(data)[source]
to_dict(self)[source]