get_prior¶

sherpa.astro.ui.get_prior(par)

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. The parameter prior set by a previous call to set_prior. This may be a function or model instance. prior ValueError – If a prior has not been set for the parameter.

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