lsst.afw  13.0-92-g8ecf155+1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst.afw.display.interface.Display Class Reference
Inheritance diagram for lsst.afw.display.interface.Display:

Classes

class  _Buffering
 

Public Member Functions

def __init__
 Create an object able to display images and overplot glyphs. More...
 
def __enter__
 Support for python's with statement. More...
 
def __exit__
 Support for python's with statement. More...
 
def __del__
 
def __getattr__
 
def close
 
def verbose
 The backend's verbosity. More...
 
def verbose
 
def __str__
 
def maskColorGenerator
 A generator for "standard" colours. More...
 
def setMaskPlaneColor
 Request that mask plane name be displayed as color. More...
 
def getMaskPlaneColor
 Return the colour associated with the specified mask plane name. More...
 
def setMaskTransparency
 Specify display's mask transparency (percent); or None to not set it when loading masks. More...
 
def getMaskTransparency
 Return the current display's mask transparency. More...
 
def show
 Uniconify and Raise display. More...
 
def mtv
 Display an Image or Mask on a DISPLAY display. More...
 
def Buffering
 
def flush
 Flush the buffers. More...
 
def erase
 Erase the specified DISPLAY frame. More...
 
def dot
 Draw a symbol onto the specified DISPLAY frame at (col,row) = (c,r) [0-based coordinates]. More...
 
def line
 Draw a set of symbols or connect the points, a list of (col,row) If symbs is True, draw points at the specified points using the desired symbol, otherwise connect the dots. More...
 
def scale
 Set the range of the scaling from DN in the image to the image display. More...
 
def zoom
 Zoom frame by specified amount, optionally panning also. More...
 
def pan
 Pan to (rowc, colc); see also zoom. More...
 
def interact
 Enter an interactive loop, listening for key presses in display and firing callbacks. More...
 
def setCallback
 Set the callback for key k to be func, returning the old callback. More...
 
def getActiveCallbackKeys
 Return all callback keys. More...
 

Static Public Member Functions

def setDefaultBackend
 
def getDefaultBackend
 
def setDefaultFrame
 
def getDefaultFrame
 
def incrDefaultFrame
 
def setDefaultMaskTransparency
 
def setDefaultMaskPlaneColor
 Set the default mapping from mask plane names to colours. More...
 
def getDisplay
 Return the Display indexed by frame, creating it if needs be. More...
 
def delAllDisplays
 Delete and close all known display. More...
 

Public Attributes

 frame
 
 name
 

Detailed Description

Definition at line 112 of file interface.py.

Constructor & Destructor Documentation

def lsst.afw.display.interface.Display.__init__ (   self,
  frame = None,
  backend = None,
  args,
  kwargs 
)

Create an object able to display images and overplot glyphs.

Parameters
frameAn identifier for the display
backendThe backend to use (defaults to value set by setDefaultBackend())
argsArguments to pass to the backend
kwargsArguments to pass to the backend

Definition at line 132 of file interface.py.

def lsst.afw.display.interface.Display.__del__ (   self)

Definition at line 193 of file interface.py.

Member Function Documentation

def lsst.afw.display.interface.Display.__enter__ (   self)

Support for python's with statement.

Definition at line 185 of file interface.py.

def lsst.afw.display.interface.Display.__exit__ (   self,
  args 
)

Support for python's with statement.

Definition at line 189 of file interface.py.

def lsst.afw.display.interface.Display.__getattr__ (   self,
  name 
)
Return the attribute of self._impl, or ._impl if it is requested
Parameters:
-----------
    name : string
name of the attribute requested
Returns:
--------
    attribute : object
the attribute of self._impl for the requested name

Definition at line 196 of file interface.py.

def lsst.afw.display.interface.Display.__str__ (   self)

Definition at line 238 of file interface.py.

def lsst.afw.display.interface.Display.Buffering (   self)
Return a class intended to be used with python's with statement
    E.g.
with display.Buffering():
    display.dot("+", xc, yc)

Definition at line 467 of file interface.py.

def lsst.afw.display.interface.Display.close (   self)

Definition at line 220 of file interface.py.

def lsst.afw.display.interface.Display.delAllDisplays ( )
static

Delete and close all known display.

Definition at line 330 of file interface.py.

def lsst.afw.display.interface.Display.dot (   self,
  symb,
  c,
  r,
  size = 2,
  ctype = None,
  origin = afwImage.PARENT,
  args,
  kwargs 
)

Draw a symbol onto the specified DISPLAY frame at (col,row) = (c,r) [0-based coordinates].

Possible values are:

  • Draw a + x Draw an x
  • Draw a * o Draw a circle @:Mxx,Mxy,Myy Draw an ellipse with moments (Mxx, Mxy, Myy) (argument size is ignored) An object derived from afwGeom.ellipses.BaseCore Draw the ellipse (argument size is ignored) Any other value is interpreted as a string to be drawn. Strings obey the fontFamily (which may be extended with other characteristics, e.g. "times bold italic". Text will be drawn rotated by textAngle (textAngle is ignored otherwise).

N.b. objects derived from BaseCore include Axes and Quadrupole.

Definition at line 484 of file interface.py.

def lsst.afw.display.interface.Display.erase (   self)

Erase the specified DISPLAY frame.

Definition at line 479 of file interface.py.

def lsst.afw.display.interface.Display.flush (   self)

Flush the buffers.

Definition at line 475 of file interface.py.

def lsst.afw.display.interface.Display.getActiveCallbackKeys (   self,
  onlyActive = True 
)

Return all callback keys.

Parameters
onlyActiveIf true only return keys that do something

Definition at line 637 of file interface.py.

def lsst.afw.display.interface.Display.getDefaultBackend ( )
static

Definition at line 255 of file interface.py.

def lsst.afw.display.interface.Display.getDefaultFrame ( )
static
Get the default frame for display

Definition at line 264 of file interface.py.

def lsst.afw.display.interface.Display.getDisplay (   frame = None,
  backend = None,
  create = True,
  verbose = False,
  args,
  kwargs 
)
static

Return the Display indexed by frame, creating it if needs be.

Parameters
frameThe desired frame (None => use defaultFrame (see setDefaultFrame))
backendcreate the specified frame using this backend (or the default if None) \ if it doesn't already exist. If backend == "", it's an error to specify a non-existent frame
createcreate the display if it doesn't already exist.
verboseAllow backend to be chatty
argsarguments passed to Display constructor
kwargskeyword arguments passed to Display constructor

Definition at line 304 of file interface.py.

def lsst.afw.display.interface.Display.getMaskPlaneColor (   self,
  name 
)

Return the colour associated with the specified mask plane name.

Definition at line 381 of file interface.py.

def lsst.afw.display.interface.Display.getMaskTransparency (   self,
  name = None 
)

Return the current display's mask transparency.

Definition at line 406 of file interface.py.

def lsst.afw.display.interface.Display.incrDefaultFrame ( )
static
Increment the default frame for display

Definition at line 269 of file interface.py.

def lsst.afw.display.interface.Display.interact (   self)

Enter an interactive loop, listening for key presses in display and firing callbacks.

Exit with q, CR, ESC, or any other callback function that returns a True value.

Definition at line 599 of file interface.py.

def lsst.afw.display.interface.Display.line (   self,
  points,
  origin = afwImage.PARENT,
  symbs = False,
  ctype = None,
  size = 0.5 
)

Draw a set of symbols or connect the points, a list of (col,row) If symbs is True, draw points at the specified points using the desired symbol, otherwise connect the dots.

Ctype is the name of a colour (e.g. 'red')

If symbs supports indexing (which includes a string – caveat emptor) the elements are used to label the points

Definition at line 523 of file interface.py.

def lsst.afw.display.interface.Display.maskColorGenerator (   self,
  omitBW = True 
)

A generator for "standard" colours.

Parameters
omitBWDon't include Black and White

e.g. colorGenerator = interface.maskColorGenerator(omitBW=True) for p in planeList: print p, next(colorGenerator)

Definition at line 337 of file interface.py.

def lsst.afw.display.interface.Display.mtv (   self,
  data,
  title = "",
  wcs = None 
)

Display an Image or Mask on a DISPLAY display.

Historical note: the name "mtv" comes from Jim Gunn's forth imageprocessing system, Mirella (named after Mirella Freni); The "m" stands for Mirella.

Definition at line 415 of file interface.py.

def lsst.afw.display.interface.Display.pan (   self,
  colc = None,
  rowc = None,
  origin = afwImage.PARENT 
)

Pan to (rowc, colc); see also zoom.

Definition at line 594 of file interface.py.

def lsst.afw.display.interface.Display.scale (   self,
  algorithm,
  min,
  max = None,
  unit = None,
  args,
  kwargs 
)

Set the range of the scaling from DN in the image to the image display.

Parameters
algorithmDesired scaling (e.g. "linear" or "asinh")
minMinimum value, or "minmax" or "zscale"
maxMaximum value (must be None for minmax|zscale)
unitUnits for min and max (e.g. Percent, Absolute, Sigma; None if min==minmax|zscale)
*argsOptional arguments
**kwargsOptional keyword arguments

Definition at line 553 of file interface.py.

def lsst.afw.display.interface.Display.setCallback (   self,
  k,
  func = None,
  noRaise = False 
)

Set the callback for key k to be func, returning the old callback.

Definition at line 620 of file interface.py.

def lsst.afw.display.interface.Display.setDefaultBackend (   backend)
static

Definition at line 245 of file interface.py.

def lsst.afw.display.interface.Display.setDefaultFrame (   frame = 0)
static
Set the default frame for display

Definition at line 259 of file interface.py.

def lsst.afw.display.interface.Display.setDefaultMaskPlaneColor (   name = None,
  color = None 
)
static

Set the default mapping from mask plane names to colours.

Parameters
namename of mask plane, or a dict mapping names to colours
colorDesired color, or None if name is a dict

If name is None, use the hard-coded default dictionary

Definition at line 282 of file interface.py.

def lsst.afw.display.interface.Display.setDefaultMaskTransparency (   maskPlaneTransparency = {})
static

Definition at line 275 of file interface.py.

def lsst.afw.display.interface.Display.setMaskPlaneColor (   self,
  name,
  color = None 
)

Request that mask plane name be displayed as color.

Parameters
nameName of mask plane or a dictionary of name -> colourName
colorThe name of the colour to use (must be None if name is a dict)

Colours may be specified as any X11-compliant string (e.g. "orchid"), or by one of the following constants defined in afwDisplay: BLACK, WHITE, RED, BLUE, GREEN, CYAN, MAGENTA, YELLOW.

The advantage of using the symbolic names is that the python interpreter can detect typos.

Definition at line 359 of file interface.py.

def lsst.afw.display.interface.Display.setMaskTransparency (   self,
  transparency = None,
  name = None 
)

Specify display's mask transparency (percent); or None to not set it when loading masks.

Definition at line 386 of file interface.py.

def lsst.afw.display.interface.Display.show (   self)

Uniconify and Raise display.

N.b. throws an exception if frame doesn't exit

Definition at line 411 of file interface.py.

def lsst.afw.display.interface.Display.verbose (   self)

The backend's verbosity.

Definition at line 229 of file interface.py.

def lsst.afw.display.interface.Display.verbose (   self,
  value 
)

Definition at line 234 of file interface.py.

def lsst.afw.display.interface.Display.zoom (   self,
  zoomfac = None,
  colc = None,
  rowc = None,
  origin = afwImage.PARENT 
)

Zoom frame by specified amount, optionally panning also.

Definition at line 573 of file interface.py.

Member Data Documentation

lsst.afw.display.interface.Display.frame

Definition at line 152 of file interface.py.

lsst.afw.display.interface.Display.name

Definition at line 154 of file interface.py.


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