image_setregion

sherpa.astro.ui.image_setregion(reg, coord='')

Set the region to display in the image viewer.

Parameters:
  • reg (str) – The region to display.

  • coord (str, optional) – The coordinate system to use.

Raises:

sherpa.utils.err.DS9Err – Invalid coordinate system.

See also

image_getregion

Return the region defined in the image viewer.

image_xpaget

Return the result of an XPA call to the image viewer.

image_xpaset

Send an XPA command to the image viewer.

Examples

Add a circle, in the physical coordinate system, to the data from the default data set:

>>> image_data()
>>> image_setregion('circle(4234.53,3245.29,46.74)', 'physical')

Copy the region from the current frame, create a new frame displaying the residuals from data set ‘img’, and then display the region on it:

>>> r = image_getregion()
>>> image_resid('img', newframe=True)
>>> image_setregion(r)