show_model
- sherpa.astro.ui.show_model(id: IdType | None = None, outfile=None, clobber=False) None
Display the model expression used to fit a data set.
This displays the model used to fit the data set, that is, the expression set by
set_model
orset_source
combined with any instrumental responses, together with the parameter values of the model. Theshow_source
function displays just the source expression, without the instrumental components (if any).- Parameters:
id (int, str, or None, optional) – The data set. If not given then all source expressions are displayed.
outfile (str, optional) – If not given the results are displayed to the screen, otherwise it is taken to be the name of the file to write the results to.
clobber (bool, optional) – If
outfile
is notNone
, then this flag controls whether an existing file can be overwritten (True
) or if it raises an exception (False
, the default setting).
- Raises:
sherpa.utils.err.IOErr – If
outfile
already exists andclobber
isFalse
.
See also
list_model_ids
List of all the data sets with a source expression.
set_model
Set the source model expression for a data set.
show_all
Report the current state of the Sherpa session.
show_source
Display the source model expression for a data set.