Return the prior function for a parameter (MCMC).

The default behavior of the pyBLoCXS MCMC sampler (run by the get_draws function) is to use a flat prior for each parameter. The get_prior routine finds the current prior assigned to a parameter, and set_prior is used to change it.

Parameters:par (a sherpa.models.parameter.Parameter instance) – A parameter of a model instance.
Returns:The parameter prior set by a previous call to set_prior. This may be a function or model instance.
Return type:prior
Raises:ValueError – If a prior has not been set for the parameter.

See also

Set the prior function to use with a parameter.


>>> prior = get_prior(bgnd.c0)
>>> print(prior)