Public Member Functions | |
| __init__ (self, display, dims=None, use_opencv=False, verbose=False, *args, **kwargs) | |
| embed (self) | |
| get_viewer (self) | |
| show_color_bar (self, show=True) | |
| show_pan_mark (self, show=True, color='red') | |
| overlay_mask (self, maskImage, maskDict, maskAlpha) | |
| beginMarking (self, symb='+', ctype='cyan', size=10, label='interactive') | |
| endMarking (self) | |
| getMarkers (self, label='interactive') | |
| clearMarkers (self, label=None) | |
| linkMarkers (self, ctype='brown', label='interactive') | |
| clearLines (self) | |
Public Attributes | |
| logger = get_logger("ginga", log_stderr=True, level=40) | |
Static Public Attributes | |
| dict | markerDict = {'+': 'plus', 'x': 'cross', '.': 'circle', '*': 'circle', 'o': 'circle'} |
Protected Member Functions | |
| _setMaskTransparency (self, transparency, maskplane=None) | |
| _getMaskTransparency (self, maskplane=None) | |
| _mtv (self, image, mask=None, wcs=None, title="", metadata=None) | |
| _buffer (self, enable=True) | |
| _flush (self) | |
| _erase (self) | |
| _dot (self, symb, c, r, size, ctype, fontFamily="helvetica", textAngle=None, label='_dot') | |
| _drawLines (self, points, ctype) | |
| _scale (self, algorithm, min, max, unit, *args, **kwargs) | |
| _show (self) | |
| _zoom (self, zoomfac) | |
| _pan (self, colc, rowc) | |
| _getEvent (self) | |
Protected Attributes | |
| _viewer | |
| str | _defaultMarkTagName = 'all' |
| _callbackDict = dict() | |
| _gingaViewer = self._viewer._viewer | |
| _canvas = self._viewer.canvas | |
| float | _maskTransparency = 0.8 |
| bool | _redraw = True |
Virtual device display implementation.
Parameters
----------
display : `lsst.afw.display.virtualDevice.DisplayImpl`
Display object to connect to.
dims : `tuple` [`int`, `int`], optional
Dimensions of the viewer window.
use_opencv : `bool`, optional
Should openCV be used to speed drawing?
verbose : `bool`, optional
Increase log verbosity?
|
protected |
Draw a symbol at (col,row) = (c,r) [0-based coordinates].
Parameters
----------
symb : `str`
Symbol to draw. Should be one of '+', 'x', '*', 'o', '.'.
c : `int`
Image column for dot center (0-based coordinates).
r : `int`
Image row for dot center (0-based coordinate).
size : `int`
Size of dot.
fontFamily : `str`, optional
Font to use for text symbols.
textAngle : `float`, optional
Text rotation angle.
label : `str`, optional
Label to store this dot in the internal list.
|
protected |
Connect the points, a list of (col,row).
Parameters
----------
points : `list` [`tuple` [`int`, `int`]]
Points to connect with lines.
ctype : `str`
Color to use.
|
protected |
Erase the display
|
protected |
Listen for a key press on a frame in DS9 and return an event.
Returns
-------
event : `Ds9Event`
Event with (key, x, y).
|
protected |
Return the current mask transparency.
|
protected |
Display an Image and/or Mask on a ginga display
Parameters
----------
image : `lsst.afw.image.Image` or `lsst.afw.image.Exposure`
Image to display.
mask : `lsst.afw.image.Mask`, optional
Mask to use, if the input does not contain one.
wcs : `ginga.util.wcsmod.wcs_astropy`
WCS to use, if the input does not contain one.
title : `str`, optional
Title that will be stored in OBJECT header of FITS file.
metadata : `lsst.daf.base.PropertyList`, optional
FITS header information that might be used.
|
protected |
Pan to (colc, rowc)
Parameters
----------
colc : `int`
Column to center in viewer (0-based coordinate).
rowc : `int`
Row to center in viewer (0-based coordinate).
|
protected |
Set greyscale values.
Parameters
----------
algorithm : `str`
Image scaling algorithm to use.
min : `float` or `str`
Minimum value to set to black. If a string, should be one of 'zscale' or 'minmax'.
max : `float`
Maximum value to set to white.
unit : `str`
Scaling units. This is ignored.
|
protected |
Specify mask transparency (percent); or None to not set it when loading masks.
Parameters
----------
transparency : `float`
Transparency of the masks in percent (0-100).
maskplane : `str`, optional
Unsupported option to only change the transparency of
certain masks.
|
protected |
Show the requested display. In this case, embed it in the notebook (equivalent to Display.get_viewer().show(); see also Display.get_viewer().embed() N.b. These command *must* be the last entry in their cell
|
protected |
Zoom by specified amount
Parameters
----------
zoomfac : `float`
Zoom factor to use.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.beginMarking | ( | self, | |
| symb = '+', | |||
| ctype = 'cyan', | |||
| size = 10, | |||
| label = 'interactive' ) |
Begin interactive mark adding.
Parameters
----------
symb : `str`, optional
Symbol to use. Should be one of '+', 'x', '*', 'o', '.'.
ctype : `str`, optional
Color of markers.
size : `float`, optional
Size of marker.
label : `str`
Label to store this marker in the internal list.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.clearLines | ( | self | ) |
Remove all lines from the display.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.clearMarkers | ( | self, | |
| label = None ) |
Clear markers.
Parameters
----------
label : `str`, optional
Marker label to clear. If None, all markers are cleared.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.embed | ( | self | ) |
Attach this display to the output of the current cell.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.endMarking | ( | self | ) |
End interactive mark adding.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.get_viewer | ( | self | ) |
Return the ginga viewer
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.getMarkers | ( | self, | |
| label = 'interactive' ) |
Get list of markers.
Parameters
----------
label : `str`, optional
Marker label to return.
Returns
-------
table : `astropy.table.Table`
Table of markers with the given label.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.linkMarkers | ( | self, | |
| ctype = 'brown', | |||
| label = 'interactive' ) |
Connect markers with lines.
Parameters
----------
ctype : `str`, optional
Color to draw the lines.
label : `str`, optional
Marker label to connect. Lines are drawn in the order
found in the table.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.overlay_mask | ( | self, | |
| maskImage, | |||
| maskDict, | |||
| maskAlpha ) |
Draw mask onto the image display.
Parameters
----------
maskImage : `lsst.afw.image.Mask`
Mask to display.
maskDict : `dict` [`str`, `str`]
Dictionary of mask plane names to colors.
maskAlpha : `float`
Transparency to display the mask.
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.show_color_bar | ( | self, | |
| show = True ) |
Show (or hide) the colour bar.
Parameters
----------
show : `bool`, optional
Should the color bar be shown?
| lsst.display.astrowidgets.astrowidgets.DisplayImpl.show_pan_mark | ( | self, | |
| show = True, | |||
| color = 'red' ) |
Show (or hide) the pan mark.
Parameters
----------
show : `bool`, optional
Should the pan marker be shown?
color : `str`, optional
What color should the pan mark be?
|
protected |