get_prior¶
- sherpa.ui.get_prior(par)¶
Return the prior function for a parameter (MCMC).
The default behavior of the pyBLoCXS MCMC sampler (run by the
get_drawsfunction) is to use a flat prior for each parameter. Theget_priorroutine finds the current prior assigned to a parameter, andset_prioris used to change it.- Parameters
par (a
sherpa.models.parameter.Parameterinstance) – 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_priorSet the prior function to use with a parameter.
Examples
>>> prior = get_prior(bgnd.c0) >>> print(prior)