UniformPrior#

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

Bases: Prior

Uniform Prior.

Returns 2log(max-min) if the parameter value is in [min, max]. Returns inf, otherwise. Only well defined for finite values of min and max.

Parameters:
minfloat, optional

Minimum value. Default is 0.

maxfloat, optional

Maximum value. Default is 1.

Attributes Summary

default_parameters

max

Parameter of a Prior.

min

Parameter of a Prior.

tag

Methods Summary

evaluate(value, min, max)

Evaluate the uniform prior.

Attributes Documentation

default_parameters = <gammapy.modeling.parameter.PriorParameters object>#
max#

Parameter of a Prior.

A prior is a probability density function of a model parameter and can take different forms, including but not limited to Gaussian distributions and uniform distributions. The prior includes information or knowledge about the dataset or the parameters of the fit.

Parameters:
namestr

Name.

valuefloat or Quantity

Value.

unitUnit or str, optional

Unit. Default is “”.

Examples

For a usage example see Priors tutorial.

min#

Parameter of a Prior.

A prior is a probability density function of a model parameter and can take different forms, including but not limited to Gaussian distributions and uniform distributions. The prior includes information or knowledge about the dataset or the parameters of the fit.

Parameters:
namestr

Name.

valuefloat or Quantity

Value.

unitUnit or str, optional

Unit. Default is “”.

Examples

For a usage example see Priors tutorial.

tag = ['UniformPrior']#

Methods Documentation

static evaluate(value, min, max)[source]#

Evaluate the uniform prior.

__init__(**kwargs)#
classmethod __new__(*args, **kwargs)#