Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/set_iter_method_opt.html
Jump to: · Example · PARAMETERS · Notes · Bugs · See Also


AHELP for CIAO 4.16 Sherpa

set_iter_method_opt

Context: methods

Synopsis

Set an option for the iterative-fitting scheme.

Syntax

set_iter_method_opt(optname, val)

optname - str

Example

Reject any points that are more than 5 sigma away from the best fit model and re-fit.

>>> set_iter_method('sigmarej')
>>> set_iter_method_opt('lrej', 5)
>>> set_iter_method_opt('hrej', 5)
>>> fit()

PARAMETERS

The parameters for this function are:

Parameter Definition
optname The name of the option to set. The `get_iter_method_opt` routine can be used to find out valid values for this argument.
val The new value for the option.

Notes

The supported fields for the sigmarej scheme are:

Item Definition
grow The number of points adjacent to a rejected point that should also be removed. A value of 0 means that only the discrepant point is removed whereas a value of 1 means that the two adjacent points (one lower and one higher) will also be removed.
hrej The rejection criterion in units of sigma, for data points above the model (it must be >= 0).
lrej The rejection criterion in units of sigma, for data points below the model (it must be >= 0).
maxiters The maximum number of iterations to perform. If this value is 0 then the fit will run until it has converged.

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_dep, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
filtering
set_filter
fitting
fit, simulfit
methods
get_iter_method_name, get_iter_method_opt, list_iter_methods, set_iter_method, set_method, set_method_opt
modeling
get_par, get_xsabund, get_xscosmo, get_xsxsect, get_xsxset, set_bkg_model, set_bkg_source, set_full_model, set_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
plotting
plot_fit, plot_fit_delchi, plot_fit_resid
statistics
get_stat, get_stat_name, set_prior, set_sampler, set_sampler_opt, set_stat
utilities
calc_chisqr, calc_stat, set_analysis, set_default_id
visualization
contour_resid, image_fit, image_setregion