Restore the default values of state (configuration) variables
set_state_defaults( String_Type )
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.
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
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")
|