PiecewiseNormSpectralModel#

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

Bases: SpectralModel

Piecewise spectral correction with a free normalization at each fixed energy nodes.

For more information see Piecewise norm spectral model.

Parameters:
energyQuantity

Array of energies at which the model values are given (nodes).

normsndarray or list of gammapy.modeling.Parameter

Array with the initial norms of the model at energies energy. Normalisation parameters are created for each value. Default is one at each node.

interpstr

Interpolation scaling in {“log”, “lin”}. Default is “log”.

Attributes Summary

default_parameters

energy

Energy nodes.

norms

Norm values.

tag

Methods Summary

__call__(energy)

Call self as a function.

evaluate(energy, *norms)

from_dict(data, **kwargs)

Create model from dictionary.

from_parameters(parameters, **kwargs)

Create model from parameters.

to_dict([full_output])

Create dictionary for YAML serialisation.

Attributes Documentation

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

Energy nodes.

norms#

Norm values.

tag = ['PiecewiseNormSpectralModel', 'piecewise-norm']#

Methods Documentation

__call__(energy)[source]#

Call self as a function.

evaluate(energy, *norms)[source]#
classmethod from_dict(data, **kwargs)[source]#

Create model from dictionary.

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

Create model from parameters.

to_dict(full_output=False)[source]#

Create dictionary for YAML serialisation.

__init__(energy, norms=None, interp='log')[source]#
classmethod __new__(*args, **kwargs)#