get_source_image
- sherpa.astro.ui.get_source_image(id: IdType | None = None)
Return the data used by image_source.
Evaluate the source expression for the image pixels - without any PSF convolution - and return the results.
- Parameters:
- id
int,str,orNone,optional The data set. If not given then the default identifier is used, as returned by
get_default_id.
- id
- Returns:
- src_img
asherpa.image.SourceImageinstance The
yattribute contains the source model values as a 2D NumPy array.
- src_img
- Raises:
sherpa.utils.err.IdentifierErrIf 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_sourceContour the values of the model, without any PSF.
image_sourceDisplay the source expression for a data set in the image viewer.
Examples
Return the model data for the default data set:
>>> sinfo = get_source_image() >>> sinfo.y.shape (150, 175)