lsst.display.astrowidgets g2bbee38e9b+32fec32616
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
lsst.display.astrowidgets.astrowidgets.DisplayImpl Class Reference
Inheritance diagram for lsst.display.astrowidgets.astrowidgets.DisplayImpl:

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
 

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="")
 
 _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
 
 _defaultMarkTagName
 
 _callbackDict
 
 _gingaViewer
 
 _canvas
 
 _maskTransparency
 
 _redraw
 

Detailed Description

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?

Definition at line 81 of file astrowidgets.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.display.astrowidgets.astrowidgets.DisplayImpl.__init__ (   self,
  display,
  dims = None,
  use_opencv = False,
  verbose = False,
args,
**  kwargs 
)

Definition at line 97 of file astrowidgets.py.

Member Function Documentation

◆ _buffer()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._buffer (   self,
  enable = True 
)
protected

Definition at line 279 of file astrowidgets.py.

◆ _dot()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._dot (   self,
  symb,
  c,
  r,
  size,
  ctype,
  fontFamily = "helvetica",
  textAngle = None,
  label = '_dot' 
)
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.

Definition at line 289 of file astrowidgets.py.

◆ _drawLines()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._drawLines (   self,
  points,
  ctype 
)
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.

Definition at line 335 of file astrowidgets.py.

◆ _erase()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._erase (   self)
protected
Erase the display

Definition at line 285 of file astrowidgets.py.

◆ _flush()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._flush (   self)
protected

Definition at line 282 of file astrowidgets.py.

◆ _getEvent()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._getEvent (   self)
protected
Listen for a key press on a frame in DS9 and return an event.

Returns
-------
event : `Ds9Event`
    Event with (key, x, y).

Definition at line 489 of file astrowidgets.py.

◆ _getMaskTransparency()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._getMaskTransparency (   self,
  maskplane = None 
)
protected
Return the current mask transparency.

Definition at line 170 of file astrowidgets.py.

◆ _mtv()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._mtv (   self,
  image,
  mask = None,
  wcs = None,
  title = "" 
)
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
    Unsupported display title.

Definition at line 174 of file astrowidgets.py.

◆ _pan()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._pan (   self,
  colc,
  rowc 
)
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).

Definition at line 477 of file astrowidgets.py.

◆ _scale()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._scale (   self,
  algorithm,
  min,
  max,
  unit,
args,
**  kwargs 
)
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.

Definition at line 425 of file astrowidgets.py.

◆ _setMaskTransparency()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._setMaskTransparency (   self,
  transparency,
  maskplane = None 
)
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.

Definition at line 152 of file astrowidgets.py.

◆ _show()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._show (   self)
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

Definition at line 454 of file astrowidgets.py.

◆ _zoom()

lsst.display.astrowidgets.astrowidgets.DisplayImpl._zoom (   self,
  zoomfac 
)
protected
Zoom by specified amount

Parameters
----------
zoomfac : `float`
    Zoom factor to use.

Definition at line 467 of file astrowidgets.py.

◆ beginMarking()

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.

Definition at line 351 of file astrowidgets.py.

◆ clearLines()

lsst.display.astrowidgets.astrowidgets.DisplayImpl.clearLines (   self)
Remove all lines from the display.

Definition at line 421 of file astrowidgets.py.

◆ clearMarkers()

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.

Definition at line 387 of file astrowidgets.py.

◆ embed()

lsst.display.astrowidgets.astrowidgets.DisplayImpl.embed (   self)
Attach this display to the output of the current cell.

Definition at line 122 of file astrowidgets.py.

◆ endMarking()

lsst.display.astrowidgets.astrowidgets.DisplayImpl.endMarking (   self)
End interactive mark adding.

Definition at line 368 of file astrowidgets.py.

◆ get_viewer()

lsst.display.astrowidgets.astrowidgets.DisplayImpl.get_viewer (   self)
Return the ginga viewer

Definition at line 126 of file astrowidgets.py.

◆ getMarkers()

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.

Definition at line 372 of file astrowidgets.py.

◆ linkMarkers()

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.

Definition at line 400 of file astrowidgets.py.

◆ overlay_mask()

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.

Definition at line 231 of file astrowidgets.py.

◆ show_color_bar()

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?

Definition at line 130 of file astrowidgets.py.

◆ show_pan_mark()

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?

Definition at line 140 of file astrowidgets.py.

Member Data Documentation

◆ _callbackDict

lsst.display.astrowidgets.astrowidgets.DisplayImpl._callbackDict
protected

Definition at line 110 of file astrowidgets.py.

◆ _canvas

lsst.display.astrowidgets.astrowidgets.DisplayImpl._canvas
protected

Definition at line 117 of file astrowidgets.py.

◆ _defaultMarkTagName

lsst.display.astrowidgets.astrowidgets.DisplayImpl._defaultMarkTagName
protected

Definition at line 109 of file astrowidgets.py.

◆ _gingaViewer

lsst.display.astrowidgets.astrowidgets.DisplayImpl._gingaViewer
protected

Definition at line 113 of file astrowidgets.py.

◆ _maskTransparency

lsst.display.astrowidgets.astrowidgets.DisplayImpl._maskTransparency
protected

Definition at line 119 of file astrowidgets.py.

◆ _redraw

lsst.display.astrowidgets.astrowidgets.DisplayImpl._redraw
protected

Definition at line 120 of file astrowidgets.py.

◆ _viewer

lsst.display.astrowidgets.astrowidgets.DisplayImpl._viewer
protected

Definition at line 107 of file astrowidgets.py.

◆ logger

lsst.display.astrowidgets.astrowidgets.DisplayImpl.logger

Definition at line 104 of file astrowidgets.py.

◆ markerDict

dict lsst.display.astrowidgets.astrowidgets.DisplayImpl.markerDict = {'+': 'plus', 'x': 'cross', '.': 'circle', '*': 'circle', 'o': 'circle'}
static

Definition at line 95 of file astrowidgets.py.


The documentation for this class was generated from the following file: