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_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
asherpa.models.parameter.Parameterinstance A parameter of a model instance.
- par
- Returns:
priorThe parameter prior set by a previous call to
set_prior. This may be a function or model instance.
- Raises:
ValueErrorIf 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)