get_model_contour
- sherpa.astro.ui.get_model_contour(id: IdType | None = None, recalc=True)
Return the data used by contour_model.
- Parameters:
id (int, str, or None, optional) – The data set. If not given then the default identifier is used, as returned by
get_default_id.recalc (bool, optional) – If
Falsethen the results from the last call tocontour_model(orget_model_contour) are returned, otherwise the data is re-generated.
- Returns:
model_data – The
yattribute contains the model values and thex0andx1arrays contain the corresponding coordinate values, as one-dimensional arrays.- Return type:
a
sherpa.plot.ModelContourinstance- Raises:
sherpa.utils.err.DataErr – If the data set is not 2D.
sherpa.utils.err.IdentifierErr – If the data set does not exist or a source expression has not been set.
See also
get_model_imageReturn the data used by image_model.
contour_modelContour the values of the model, including any PSF.
image_modelDisplay the model for a data set in the image viewer.
Examples
Return the model pixel values for the default data set:
>>> minfo = get_model_contour()