| AHELP for CIAO 4.5 Sherpa v1 | set_sampler_opt |
Context: statistics |
Synopsis
Define sampler options for a pyBLoCXS chain.
Syntax
set_sampler_opt(optname, val )
Description
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 using a predefined Sherpa model to high-energy X-ray spectral data.
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 set_sampler ("ahelp set_sampler").
- 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. ("ahelp list_samplers" and "ahelp get_sampler").
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.).
sherpa> load_pha("pha.fits")
sherpa> set_model(xsphabs.abs1*powlaw1d.p1)
sherpa> set_stat("cash")
sherpa> fit()
sherpa> covar()
sherpa> set_sampler("MH")
sherpa> set_sampler_opt("scale", 0.5)
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).
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- confidence
- set_conf_opt, set_covar_opt, set_proj_opt
- data
- 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
- filtering
- set_filter
- methods
- gridsearch, levmar, list_iter_methods, list_methods, moncar, neldermead, set_iter_method, set_iter_method_opt, set_method, set_method_opt
- modeling
- get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
- statistics
- set_prior, set_sampler, set_stat
- utilities
- set_analysis, set_default_id
- visualization
- image_setregion

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)