| AHELP for CIAO 4.5 Sherpa v1 | delete_model |
Context: modeling |
Synopsis
Delete a Sherpa model by model ID
Syntax
delete_model( [id] )
Description
The delete_model() function removes a specified model from the list of active models in a Sherpa session, by model ID; the model ID is the same as the ID of the data set to which it is assigned.
- id - the id of the data set to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
Example 1
sherpa> delete_model()
When called with no arguments, delete_model() removes from the Sherpa session the model assigned to the default data set.
sherpa> show_model() Model: 1 apply_rmf(apply_arf((7854.46647487 * bbody.b1))) Param Type Value Min Max Units ----- ---- ----- --- --- ----- b1.space frozen 0 0 1 0 - energy | 1 - wave b1.kT thawed 1 0.1 1000 keV b1.ampl thawed 1 1e-20 1e+20 Model: 2 apply_rmf(apply_arf((56494.4943719 * powlaw1d.p1))) Param Type Value Min Max Units ----- ---- ----- --- --- ----- p1.gamma thawed 1 -10 10 p1.ref frozen 1 -3.40282e+38 3.40282e+38 p1.ampl thawed 1 0 3.40282e+38 sherpa> delete_model() sherpa> show_model() Model: 2 apply_rmf(apply_arf((56494.4943719 * powlaw1d.p1))) Param Type Value Min Max Units ----- ---- ----- --- --- ----- p1.gamma thawed 1 -10 10 p1.ref frozen 1 -3.40282e+38 3.40282e+38 p1.ampl thawed 1 0 3.40282e+38
Example 2
sherpa> delete_model(3)
If supplied with a data set ID, delete_model() will remove the model assigned to the specified data set.
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- data
- get_bkg_plot
- info
- list_model_ids, show_bkg_model, show_bkg_source
- modeling
- add_model, add_user_pars, clean, create_model_component, delete_bkg_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_order_plot, get_par, get_pileup_model, get_source, get_source_component_image, get_source_component_plot, image_model, image_model_component, image_source, image_source_component, integrate, integrate1d, link, load_table_model, load_template_model, load_user_model, normal_sample, reset, save_model, save_source, set_bkg_model, set_full_model, set_model_autoassign_func, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset, t_sample, uniform_sample
- plotting
- get_lrt_plot, get_lrt_results, get_pvalue_plot, get_pvalue_results, plot_cdf, plot_lrt, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace
- psfs
- delete_psf, load_conv
- saving
- save_delchi, save_resid
- utilities
- calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth
- visualization
- contour_model, contour_ratio, contour_resid, get_ratio, get_resid

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