Saves information to an ASCII file.
sherpa> SAVE <arg> <filename>
<arg> may be:
SAVE Command Arguments
ALL |
Equivalent to issuing the commands SAVE BACKGROUND,
SAVE INSTRUMENT, SAVE METHOD,
SAVE SYSTEM, SAVE SOURCE, and
SAVE STATISTIC commands,
in addition to saving the information needed to fully restore a
Sherpa session, such as
the names of the loaded datasets, and the currently defined
filters. |
SYSTEM |
Saves the parameter values and ranges for all current source,
background, and instrument model components. |
MODELS |
Saves current model component names (e.g., g for
the definition GAUSS[g]). |
<sherpa_model_stack> [# [ID]] |
Saves current names for all model components of the
specified model stack (SOURCE, BACKGROUND,
PILEUP, [B]NOISE, or
KERNEL; also [B]INSTRUMENT)
to their latest user-defined
values. # is a dataset number (default 1); see
BACKGROUND for an explanation of ID.
|
<model_stack> |
Saves current names for all model components of the
specified user-defined model stack.
|
<sherpa_modelname> |
Saves the parameter values and ranges for the specified source,
background, or instrument model component. |
<modelname> |
Saves the parameter values and ranges for the specified source,
background, or instrument model component. |
METHOD |
Saves the current parameter values of the selected
optimization method. |
<sherpa_methodname> |
Saves the current parameter values of the specified
optimization method. |
STATISTIC |
Saves the name of the current statistic. |
The SAVE command may be issued at any time.
Each time the command is issued the specified ASCII file
<filename> is written, saving the specified
settings and values. If the specified ASCII file
already exists, it will be overwritten.
Tip: the command SAVE ALL <filename>
is useful for saving the current state
of the user's Sherpa session; the current session may
be restored at a later time by
using <filename> as a Sherpa script.
Write all settings, definitions, filters, and parameter values to an ASCII file:
sherpa> DATA data/example.pha
The inferred file type is PHA. If this is not what you want, please
specify the type explicitly in the data command.
WARNING: using systematic errors specified in the PHA file.
RMF is being input from:
<directory_path>/example.rmf
ARF is being input from:
<directory_path>/example.arf
Background data are being input from:
<directory_path>/example_bkg.pha
sherpa> LPLOT DATA
sherpa> IGNORE ALL
sherpa> NOTICE PLOT
sherpa> BBODY[modelh]
modelh.space parameter value [0]
modelh.kT parameter value [0.592333]
modelh.ampl parameter value [0.000464907]
sherpa> SOURCE = modelh
sherpa> SAVE ALL mysession1.shp
sherpa> EXIT
Goodbye.
In this example, the ASCII file named mysession1.shp
is written with: all program settings;
all parameter values for the current method; all parameter values,
including ranges and delta settings, for the
current model components; source definitions for all datasets;
and the name of the current statistic. Note that information about
an interactively-specified filter is also included.
Restore a session using the results of a previous
SAVE ALL command:
sherpa> USE mysession1.shp
The command USE mysession1.shp restores the example session
above, using the file mysession1.shp.
Write all parameter values to an ASCII file:
sherpa> SAVE modelh mymodelh.shp
sherpa> $more mymodelh.shp
modelh integrate on
modelh.space.min = 0
modelh.space.max = 1
modelh.space.value = 0
modelh.space.type = freeze
modelh.kT.min = 0.00592333
modelh.kT.max = 59.2333
modelh.kT.value = 0.592333
modelh.kT.type = thaw
modelh.ampl.min = 4.64907e-06
modelh.ampl.max = 0.0464907
modelh.ampl.value = 0.000464907
modelh.ampl.type = thaw
In this example, the ASCII file named mymodelh.shp is written with
the parameter values, including parameter ranges, for modelh.
- chandra
-
guide
- sherpa
-
get_analysis,
get_arf_axes,
get_axes,
get_coord,
get_data,
get_energy_axes,
get_errors,
get_filter,
get_filter_expr,
get_fit,
get_fluxed_spectrum,
get_ftest,
get_metadata,
get_photon_axes,
get_photon_energy_axes,
get_photon_wave_axes,
get_qvalue,
get_raw_axes,
get_record,
get_source,
get_statistic,
get_stats,
get_syserrors,
get_wave_axes,
get_weights,
record,
write
|