get_source_image¶
-
sherpa.astro.ui.
get_source_image
(id=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 or str, optional) – The data set. If not given then the default identifier is used, as returned by get_default_id.
- Returns
src_img – The
y
attribute contains the source model values as a 2D NumPy array.- Return type
a sherpa.image.SourceImage instance
- Raises
sherpa.utils.err.IdentifierErr – If the data set does not exist or a source expression has not been set.
See also
get_model_image()
Return the data used by image_model.
contour_source()
Contour the values of the model, without any PSF.
image_source()
Display 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)