NaimaSpectralModel#

class gammapy.modeling.models.NaimaSpectralModel[source]#

Bases: SpectralModel

A wrapper for Naima models.

For more information see Naima spectral model.

Parameters:
radiative_modelBaseRadiative

An instance of a radiative model defined in models.

distanceQuantity, optional

Distance to the source. If set to 0, the intrinsic differential luminosity will be returned. Default is 1 kpc.

seedstr or list of str, optional

Seed photon field(s) to be considered for the radiative_model flux computation, in case of a InverseCompton model. It can be a subset of the seed_photon_fields list defining the radiative_model. Default is the whole list of photon fields.

nested_modelsdict

Additional parameters for nested models not supplied by the radiative model, for now this is used only for synchrotron self-compton model.

Attributes Summary

default_parameters

include_ssc

Whether the model includes an SSC component.

particle_distribution

Particle distribution.

ssc_model

Synchrotron model.

tag

Methods Summary

__call__(energy)

Call self as a function.

evaluate(energy, *args)

Evaluate the model.

from_dict(data, **kwargs)

from_parameters(parameters, **kwargs)

Create model from parameter list.

to_dict([full_output])

Create dictionary for YAML serialisation.

Attributes Documentation

default_parameters = <gammapy.modeling.parameter.Parameters object>#
include_ssc#

Whether the model includes an SSC component.

particle_distribution#

Particle distribution.

ssc_model#

Synchrotron model.

tag = ['NaimaSpectralModel', 'naima']#

Methods Documentation

__call__(energy)[source]#

Call self as a function.

evaluate(energy, *args)[source]#

Evaluate the model.

Parameters:
energyQuantity

Energy to evaluate the model at.

Returns:
dndeQuantity

Differential flux at given energy.

classmethod from_dict(data, **kwargs)[source]#
classmethod from_parameters(parameters, **kwargs)[source]#

Create model from parameter list.

Parameters:
parametersParameters

Parameters for init.

**kwargsdict

Keyword arguments to overwrite the model class constructor.

Returns:
modelModel

Model instance.

to_dict(full_output=True)[source]#

Create dictionary for YAML serialisation.

__init__(radiative_model, distance=<Quantity 1. kpc>, seed=None, nested_models=None, use_cache=False)[source]#
classmethod __new__(*args, **kwargs)#