Synopsis
Save the current Sherpa session to a file.
Syntax
save(filename='sherpa.save', clobber=False) filename - str, optional clobber - bool, optional
Examples
Example 1
Save the current session to the file 'sherpa.save'.
>>> save()
Example 2
Save the current session to the file 'bestfit.sherpa', overwriting any existing version of the file.
>>> save('bestfit.sherpa', clobber=True)
PARAMETERS
The parameters for this function are:
Parameter | Definition |
---|---|
filename | The name of the file to write the results to. The default is 'sherpa.save'. |
clobber | This flag controls whether an existing file can be overwritten ( True ) or if it raises an exception ( False , the default setting). |
Notes
The current Sherpa session is saved using the Python `pickle` module. 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 by `save` can be sent to collaborators to share results.
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
- restore, 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