image_getregion

sherpa.ui.image_getregion(coord='')

Return the region defined in the image viewer.

The regions defined in the current frame are returned.

Parameters:coord (str, optional) – The coordinate system to use.
Returns:region – The region, or regions, or the empty string.
Return type:str
Raises:sherpa.utils.err.DS9Err – Invalid coordinate system.

See also

image_setregion()
Set the region to display 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

>>> image_getregion()
'circle(123,128,12.377649);-box(130,121,14,14,329.93142);'
>>> image_getregion('physical')
'circle(3920.5,4080.5,396.08476);-rotbox(4144.5,3856.5,448,448,329.93142);'