restore
- sherpa.astro.ui.restore(filename='sherpa.save') None
Load in a Sherpa session from a file.
Warning
Security risk: The imported functions and objects could contain arbitrary Python code and be malicious. Never use this function on untrusted input.
- Parameters:
filename (str, optional) – The name of the file to read the results from. The default is ‘sherpa.save’.
- Raises:
IOError – If
filename
does not exist.
Notes
The input to
restore
must have been created with thesave
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.
Examples
Load in the Sherpa session from ‘sherpa.save’.
>>> restore()
Load in the session from the given file:
>>> restore('/data/m31/setup.sherpa')