Erases user inputs and settings, and/or model components.
sherpa> ERASE [{ALL | <sherpa_modelname> | <modelname> |
<model_stack> | DATA [#] | BACK [# [ID]]}]
where # specifies the number of the dataset to be erased (default
dataset number is 1). The ID modifier is used if and only if the Sherpa
state object variable multiback is set to 1, i.e., if more than one
background dataset is to be associated with a single source dataset.
The ID modifier may be any unreserved string (e.g., A, foo, etc.),
i.e., a string that is not a parsable command.
ERASE ALL causes the following to be erased from the current
Sherpa session:
- All source and background datasets.
- All defined model components and model stacks.
Note that ERASE ALL does not cause the
optimization method, statistic choice, parameter prompting, or
variables within the state object to be reset to default values.
RESET
is a related command that may be used
to restore program settings and parameter values.
ERASE
<sherpa_modelname>
and ERASE
<modelname>
cause the specified single model component to be erased.
Note, however, that a single component cannot be erased if it is
part of a model stack definition (e.g.,
SOURCE).
Clear the stack first (by issuing, e.g.,
the command SOURCE =), then issue the
ERASE command.
ERASE <model_stack> causes the specified
single user-defined model stack to be removed; like above, it cannot
be erased if it is part of another stack's definition.
Remove a model component:
sherpa> DATA example.dat
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> POW[modelc]
sherpa> SHOW
Current Data Files:
Data 1: data/example.dat ascii 1 2.
Total Size: 4 bins (or pixels)
Dimensions: 1
Total counts (or values): 31
Optimization Method: Powell
Statistic: Chi-Squared Gehrels
Current Models are:
Current Composite Models are:
Current Model Components are:
powlaw1d[modelc] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 gamma thawed 1 -10 10
2 ref frozen 1 1 4
3 ampl thawed 3 0.0300 300
sherpa> ERASE modelc
In this example, a dataset is input and a model component called
modelc is established.
The ERASE command then removes this model component.
Erase a background dataset:
sherpa> DATA example2.pha
...
Background data are being input from:
<directory path>/example2_bkg.pha
sherpa> SHOW
...
-----------------
Input data files:
-----------------
Data 1: example2.pha pha.
...
Background 1: <directory path>/example2_bkg.pha pha.
...
sherpa> ERASE BACK
sherpa> SHOW
...
-----------------
Input data files:
-----------------
Data 1: example2.pha pha.
...
sherpa>
In this example, the background dataset was automatically loaded into
Sherpa because the source dataset PHA file contained the
header keyword BACKFILE.
Remove all user inputs and user-defined settings:
sherpa> METHOD GRID
sherpa> STATISTIC BAYES
sherpa> ERASE ALL
sherpa> SHOW
Current Data Files:
Optimization Method: Grid
Statistic: Bayes
Current Models are:
Current Composite Models are:
Current Model Components are:
This example illustrates that ERASE ALL does not return
either the optimization method or the statistic to the default
setting (the default method is LEVENBERG-MARQUARDT; the default
statistic is CHI GEHRELS).
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dcounts,
dollarsign,
echo,
eflux,
eqwidth,
flux,
get,
get_dcounts_sum,
get_dir,
get_eflux,
get_eqwidth,
get_filename,
get_flux2d,
get_flux_str,
get_lfactorial,
get_mcounts_sum,
get_pflux,
get_source_components,
get_verbose,
groupbycounts,
guess,
is,
journal,
list,
list_par,
mcounts,
numbersign,
paramest,
plot_eprof,
plot_rprof,
prompt,
reset,
run,
set,
set_analysis,
set_axes,
set_coord,
set_dataspace,
set_dir,
set_verbose,
setplot,
sherpa-module,
sherpa_plotfns,
sherpa_utils,
show,
simspec,
use,
version
|