image_xpaset
- sherpa.astro.ui.image_xpaset(arg, data=None)
Return the result of an XPA call to the image viewer.
Send a command to the image viewer.
- Parameters:
arg (str) – A command to send to the image viewer via XPA.
data (optional) – The data for the command.
- Raises:
sherpa.utils.err.DS9Err – The image viewer is not running.
sherpa.utils.err.RuntimeErr – If the command is not recognized or could not be completed.
See also
image_close
Close the image viewer.
image_getregion
Return the region defined in the image viewer.
image_open
Create the image viewer.
image_setregion
Set the region to display in the image viewer.
image_xpaset
Send an XPA command to the image viewer.
Notes
The XPA access point of the ds9 image viewer lets commands and queries to be sent to the viewer.
Examples
Change the zoom setting of the active frame:
>>> image_xpaset('zoom 4')
Overlay the coordinate grid on the current frame:
>>> image_xpaset('grid yes')
Add the region file ‘src.reg’ to the display:
>>> image_xpaset('regions src.reg')
Create a png version of the image being displayed:
>>> image_xpaset('saveimage png /tmp/img.png')