Last modified: December 2024

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/clean.html
AHELP for CIAO 4.17 Sherpa

clean

Context: modeling

Synopsis

Clear out the current Sherpa session.

Syntax

clean()

Description

The `clean` function removes all data sets and model assignments, and restores the default settings for the optimisation and fit statistic.


Examples

Example 1

>>> clean()

Example 2

After the call to `clean` , the `line` and `bgnd` variables will be removed, so accessing them would cause a NameError.

>>> set_source(gauss1d.line + const1d.bgnd)
>>> bgnd.c0.min = 0
>>> print(line)
>>> clean()

Changes in CIAO

Changed in CIAO 4.15

The model names are now removed from the global symbol table.


Bugs

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

See Also

data
copy_data, dataspace1d, dataspace2d, datastack, delete_data, fake, get_axes, get_bkg_chisqr_plot, get_bkg_delchi_plot, get_bkg_fit_plot, get_bkg_model_plot, get_bkg_plot, get_bkg_ratio_plot, get_bkg_resid_plot, get_bkg_source_plot, get_counts, get_data, get_data_contour, get_data_contour_prefs, get_data_image, get_data_plot, get_data_plot_prefs, get_dep, get_dims, get_error, get_quality, get_specresp, get_staterror, get_syserror, group, group_adapt, group_adapt_snr, group_bins, group_counts, group_snr, group_width, load_ascii, load_data, load_grouping, load_quality, set_data, set_quality, ungroup, unpack_ascii, unpack_data
filtering
get_filter, load_filter, set_filter
info
get_default_id, list_data_ids, list_model_ids, list_response_ids, show_bkg_model, show_bkg_source
modeling
add_model, add_user_pars, create_model_component, delete_bkg_model, delete_model, delete_model_component, get_model, get_model_autoassign_func, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_num_par_frozen, get_num_par_thawed, get_order_plot, get_par, get_pileup_model, get_source, get_source_component_image, get_source_component_plot, get_source_contour, get_source_image, get_source_plot, image_model, image_model_component, image_source, image_source_component, integrate, link, load_table_model, load_template_interpolator, load_template_model, load_user_model, normal_sample, reset, save_model, save_source, set_bkg_model, set_bkg_source, set_full_model, set_model, set_model_autoassign_func, set_pileup_model, set_source, t_sample, uniform_sample
plotting
get_cdf_plot, get_pdf_plot, get_pvalue_plot, get_pvalue_results, plot_cdf, plot_data, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace, set_xlinear, set_xlog, set_ylinear, set_ylog
psfs
delete_psf, load_conv
saving
restore, save, save_delchi, save_error, save_filter, save_grouping, save_quality, save_resid, save_staterror, save_syserror
utilities
calc_chisqr, calc_data_sum, calc_data_sum2d, calc_energy_flux, calc_ftest, calc_kcorr, calc_mlr, calc_model_sum, calc_model_sum2d, calc_photon_flux, calc_source_sum, calc_source_sum2d, calc_stat, eqwidth, get_rate
visualization
contour, contour_data, contour_model, contour_ratio, contour_resid, histogram1d, histogram2d, image_data, rebin