Delete a Sherpa model by model ID
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")
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
If supplied with a data set ID, delete_model() will remove
the model assigned to the specified data set.
- py.sherpa
-
add_user_pars,
calc_chisqr,
calc_energy_flux,
calc_model_sum,
calc_photon_flux,
calc_source_sum,
calc_stat,
clean,
contour_model,
contour_ratio,
contour_resid,
create_model_component,
delete_bkg_model,
delete_model_component,
delete_psf,
eqwidth,
get_bkg_plot,
get_model,
get_model_autoassign_func,
get_model_plot,
get_num_par,
get_order_plot,
get_par,
get_pileup_model,
get_ratio,
get_resid,
get_source,
image_model,
image_source,
integrate,
link,
list_model_ids,
load_table_model,
load_user_model,
plot_model,
plot_source,
reset,
set_bkg_model,
set_model,
set_model_autoassign_func,
set_pileup_model,
set_source
|