About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2008

URL: http://cxc.harvard.edu/sherpa4.1/delete_model.py.html
AHELP for Sherpa 4.1

delete_model

Context: py.sherpa

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.

Last modified: December 2008



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.