Synopsis
Load in a Sherpa session from a file.
Syntax
restore(filename='sherpa.save') filename - str, optional
Description
Warning
Security risk: The imported functions and objects could contain arbitrary Python code and be malicious. Never use this function on untrusted input.
Examples
Example 1
Load in the Sherpa session from 'sherpa.save'.
>>> restore()
Example 2
Load in the session from the given file:
>>> restore('/data/m31/setup.sherpa')
PARAMETERS
The parameter for this function is:
Parameter | Definition |
---|---|
filename | The name of the file to read the results from. The default is 'sherpa.save'. |
Notes
The input to `restore` must have been created with the `save` command. This is a binary file, which may not be portable between versions of Sherpa, but is platform independent. A warning message may be created if a file saved by an older (or newer) version of Sherpa is loaded. An example of such a message is:
WARNING: Could not determine whether the model is discrete. This probably means that you have restored a session saved with a previous version of Sherpa. Falling back to assuming that the model is continuous.
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- contrib
- save_chart_spectrum, save_marx_spectrum
- modeling
- clean, save_model, save_source
- saving
- save, save_all, save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table, script