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 2006

URL: http://cxc.harvard.edu/ciao3.4/set_state_defaults.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 set_state_defaults Context: varmm

Synopsis

Restore the default values of state (configuration) variables

Syntax

set_state_defaults( String_Type )

Description

The set_state_defaults() function is provided as a convenience to reset any CIAO state (also called configuration) variable, referenced by name, to its initial value. Currently CIAO contains three state variables, available when the relevant module is loaded into a S-Lang aware program:

  • varmm - to control the behaviour of the Varmm module
  • chips - to control the behaviour of the ChIPS module
  • sherpa - to control the behaviour of the Sherpa module

The individual fields of state objects can be accessed as with any S-Lang structure; for instance "varmm.caseinsen = 1;". The Varmm set_state() function provides a means of changing multiple fields in one go.

Example 1

Set the Varmm state object to non-default values:

  chips> varmm.readheader = 23
  chips> varmm.rawkeys = 99
  chips> print(varmm)
  readheader       =  23
  rawkeys          =  99
  verbosity        =  1
  caseinsen        =  0

We can now use set_state_defaults() to restore all settings with one call. Note that we supply the name of the state object, rather than the actual object itself:

  chips> set_state_defaults("varmm")
  chips> print(varmm)
  readheader       =  1
  rawkeys          =  1
  verbosity        =  1
  caseinsen        =  0

Example 2

Another use for this function is to restore the settings if they have been accidently trashed: for instance if you said

  sherpa> sherpa.multiplot = 1

rather than

  sherpa> sherpa.multiback = 1

then you will not be able to create anymore plots in Sherpa. To restore the sherpa configuration variables you can call set_state_defaults():

  sherpa> set_state_defaults("sherpa")

Bugs

See the bugs page for the Varmm library on the CIAO website for an up-to-date listing of known bugs.

See Also

modules
varmm
varmm
set_state
Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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.