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/clean.py.html
AHELP for Sherpa 4.1

clean

Context: py.sherpa

Synopsis

Erase data and model settings in a Sherpa session

Syntax

clean( )

Description

The clean() function erases all data set IDs and model assignments established in a Sherpa session. This function accepts no arguments.

Example

sherpa> clean()

The clean() function resets a Sherpa session by erasing all user-defined data and model settings.

sherpa> print(get_data(2))
name           = 1843.pi
channel        = Float64[1024]
counts         = Float64[1024]
staterror      = None
syserror       = None
bin_lo         = None
bin_hi         = None
grouping       = None
quality        = None
exposure       = 7854.46647487
backscal       = 0.00085461636003
areascal       = 1.0
grouped        = False
subtracted     = False
units          = energy
response_ids   = [1]
background_ids = []

sherpa> show_model(2)
Model: 1
apply_rmf(apply_arf((7854.46647487 * 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> clean()

sherpa> print(get_data(2))
IdentifierError'>: data set 2 has not been set

sherpa> show_model(2)
(blank)

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.