save
- sherpa.ui.save(filename='sherpa.save', clobber=False) None
Save the current Sherpa session to a file.
- Parameters:
- Raises:
sherpa.utils.err.IOErr – If
filenamealready exists andclobberisFalse.
See also
cleanClear all stored session data.
restoreLoad in a Sherpa session from a file.
sherpa.astro.ui.save_allSave the Sherpa session as an ASCII file.
Notes
The current Sherpa session is saved using the Python
picklemodule. The output is a binary file, which may not be portable between versions of Sherpa, but is platform independent, and contains all the data. This means that files created bysavecan be sent to collaborators to share results.Examples
Save the current session to the file ‘sherpa.save’.
>>> save()
Save the current session to the file ‘bestfit.sherpa’, overwriting any existing version of the file.
>>> save('bestfit.sherpa', clobber=True)