modeling - Models and fitting#

gammapy.modeling Package#

Models and fitting.

Classes#

Covariance(parameters[, data])

Parameter covariance class

Fit([backend, optimize_opts, ...])

Fit class.

Parameter(name, value[, unit, scale, min, ...])

A model parameter.

Parameters([parameters])

Parameters container.

gammapy.modeling.models Package#

Built-in models in Gammapy.

Functions#

create_cosmic_ray_spectral_model([particle])

Cosmic a cosmic ray spectral model at Earth.

create_crab_spectral_model([reference])

Create a Crab nebula reference spectral model.

create_fermi_isotropic_diffuse_model(...)

Read Fermi isotropic diffuse model.

integrate_spectrum(func, energy_min, energy_max)

Integrate 1d function using the log-log trapezoidal rule.

scale_plot_flux(flux[, energy_power])

Scale flux to plot

Classes#

BrokenPowerLawSpectralModel(**kwargs)

Spectral broken power-law model.

CompoundSpectralModel(model1, model2, operator)

Arithmetic combination of two spectral models.

ConstantFluxSpatialModel(**kwargs)

Spatially constant flux spatial model.

ConstantSpatialModel(**kwargs)

Spatially constant (isotropic) spatial model.

ConstantSpectralModel(**kwargs)

Constant model.

ConstantTemporalModel(**kwargs)

Constant temporal model.

DatasetModels([models])

Immutable models container

DiskSpatialModel(**kwargs)

Constant disk model.

EBLAbsorptionNormSpectralModel(energy, ...)

Gamma-ray absorption models.

ExpCutoffPowerLaw3FGLSpectralModel(**kwargs)

Spectral exponential cutoff power-law model used for 3FGL.

ExpCutoffPowerLawNormSpectralModel(**kwargs)

Norm spectral exponential cutoff power-law model.

ExpCutoffPowerLawSpectralModel(**kwargs)

Spectral exponential cutoff power-law model.

ExpDecayTemporalModel(**kwargs)

Temporal model with an exponential decay.

FoVBackgroundModel([spectral_model, ...])

Field of view background model

GaussianSpatialModel(**kwargs)

Two-dimensional Gaussian model.

GaussianSpectralModel(**kwargs)

Gaussian spectral model.

GaussianTemporalModel(**kwargs)

A Gaussian temporal profile

GeneralizedGaussianSpatialModel(**kwargs)

Two-dimensional Generealized Gaussian model.

GeneralizedGaussianTemporalModel(**kwargs)

A generalized Gaussian temporal profile

LightCurveTemplateTemporalModel(table[, ...])

Temporal light curve model.

LinearTemporalModel(**kwargs)

Temporal model with a linear variation.

LogParabolaNormSpectralModel(**kwargs)

Norm spectral log parabola model.

LogParabolaSpectralModel(**kwargs)

Spectral log parabola model.

MeyerCrabSpectralModel(**kwargs)

Meyer 2010 log polynomial Crab spectral model.

Model()

Model class that contains only methods to create a model listed in the registries.

Models([models])

Sky model collection.

ModelBase(**kwargs)

Model base class.

NaimaSpectralModel(radiative_model[, ...])

A wrapper for Naima models.

PiecewiseNormSpectralModel(energy[, norms, ...])

Piecewise spectral correction

PointSpatialModel(**kwargs)

Point Source.

PowerLaw2SpectralModel(**kwargs)

Spectral power-law model with integral as amplitude parameter.

PowerLawNormSpectralModel(**kwargs)

Spectral power-law model with normalized amplitude parameter.

PowerLawSpectralModel(**kwargs)

Spectral power-law model.

PowerLawTemporalModel(**kwargs)

Temporal model with a Power Law decay.

ScaleSpectralModel(model[, norm])

Wrapper to scale another spectral model by a norm factor.

Shell2SpatialModel(**kwargs)

Shell model with outer radius and relative width parametrization

ShellSpatialModel(**kwargs)

Shell model.

SineTemporalModel(**kwargs)

Temporal model with a sinusoidal modulation.

SkyModel(spectral_model[, spatial_model, ...])

Sky model component.

SmoothBrokenPowerLawSpectralModel(**kwargs)

Spectral smooth broken power-law model.

SpatialModel(**kwargs)

Spatial model base class.

SpectralModel(**kwargs)

Spectral model base class.

SuperExpCutoffPowerLaw3FGLSpectralModel(**kwargs)

Spectral super exponential cutoff power-law model used for 3FGL.

SuperExpCutoffPowerLaw4FGLDR3SpectralModel(...)

Spectral super exponential cutoff power-law model used for 4FGL-DR3.

SuperExpCutoffPowerLaw4FGLSpectralModel(**kwargs)

Spectral super exponential cutoff power-law model used for 4FGL-DR1 (and DR2).

TemplateSpatialModel(map[, meta, normalize, ...])

Spatial sky map template model.

TemplateSpectralModel(energy, values[, ...])

A model generated from a table of energy and value arrays.

TemplateNDSpectralModel(map[, ...])

A model generated from a ND map where extra dimensions define the parameter space.

TemplateNPredModel(map[, spectral_model, ...])

Background model.

TemporalModel(**kwargs)

Temporal model base class.

Variables#

MODEL_REGISTRY

Registry of model classes

SPATIAL_MODEL_REGISTRY

Registry of spatial model classes.

SPECTRAL_MODEL_REGISTRY

Registry of spectral model classes.

TEMPORAL_MODEL_REGISTRY

Registry of temporal models classes.