    Set the MCMC sampler.

set_sampler(sampler)
sampler - str or `sherpa.sim.Sampler` instance

The sampler determines the type of jumping rule to be used when running the MCMC analysis.

>>> set_sampler('metropolismh')

PARAMETERS

The parameter for this function is:

Parameter
Definition
sampler
When a string, the name of the sampler to use (case insensitive). The supported options are given by the

`list_samplers` function.

Notes

The jumping rules are:

Item
Definition
MH
The Metropolis-Hastings rule, which jumps from the best-fit location, even if the previous iteration had moved away from it.
MetropolisMH
This is the Metropolis with Metropolis-Hastings algorithm, that jumps from the best-fit with probability p_m , otherwise it jumps from the last accepted jump. The value of p_m can be changed using `set_sampler_opt` .
PragBayes
This is used when the effective area calibration uncertainty is to be included in the calculation. At each nominal MCMC iteration, a new calibration product is generated, and a series of N (the nsubiters option) MCMC sub-iteration steps are carried out, choosing between Metropolis and Metropolis-Hastings types of samplers with probability p_m . Only the last of these sub-iterations are kept in the chain. The nsubiters and p_m values can be changed using `set_sampler_opt` .
FullBayes
Another sampler for use when including uncertainties due to the effective area.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023