Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9 Sherpa v1


Context: statistics


Define sampler options for a pyBLoCXS chain.


set_sampler_opt(optname, val)


pyBLoCXS is a sophisticated Markov chain Monte Carlo (MCMC) based algorithm designed to carry out Bayesian Low-Count X-ray Spectral (BLoCXS) analysis in the Sherpa environment. The algorithm explores parameter space at a suspected minimum - i.e. after a standard Sherpa fit.

The Sherpa set_sampler_opt command may be used to define a particular sampler option for a pyBLoCXS chain; the sampler itself may be set with the set_sampler command.

  • optname - sampler option name
  • val - value for the option

Available samplers and their associated configuration options are returned by the list_samplers and get_sampler commands respectively.

Refer to the pyBLoCXS documentation for additional information about the algorithm.

Example 1

sherpa> set_sampler("MH")
sherpa> set_sampler_opt("scale", 0.5)

Set the current sampler to Metropolis-Hastings, and its "scale" configuration option to a value of 0.5 ("scale" refers to the scalar multiple of the output of covar() used in the scale of the t-distribution.).

Example 2

sherpa> set_sampler("MetropolisMH")
sherpa> set_sampler_opt("p_M", 0.33)

Set the current sampler to Metropolis with Metropolis-Hastings, and its "p_M" configuration option to a value of 0.33 ("p_M" refers to the proportion of jumps generated by the Metropolis jumping rule).


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

See Also

set_conf_opt, set_covar_opt, set_proj_opt
set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_counts, set_data, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
gridsearch, levmar, list_iter_methods, list_methods, moncar, neldermead, set_iter_method, set_iter_method_opt, set_method, set_method_opt
get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
set_prior, set_sampler, set_stat
set_analysis, set_default_id

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.