|
lsst.afw
13.0-73-gb2a4e38
|
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 | |
Definition at line 112 of file interface.py.
| def lsst.afw.display.interface.Display.__init__ | ( | self, | |
frame = None, |
|||
backend = None, |
|||
| args, | |||
| kwargs | |||
| ) |
Create an object able to display images and overplot glyphs.
| frame | An identifier for the display |
| backend | The backend to use (defaults to value set by setDefaultBackend()) |
| args | Arguments to pass to the backend |
| kwargs | Arguments 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.
| 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.
|
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:
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.
| onlyActive | If true only return keys that do something |
Definition at line 637 of file interface.py.
|
static |
Definition at line 255 of file interface.py.
|
static |
Get the default frame for display
Definition at line 264 of file interface.py.
|
static |
Return the Display indexed by frame, creating it if needs be.
| frame | The desired frame (None => use defaultFrame (see setDefaultFrame)) |
| backend | create 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 |
| create | create the display if it doesn't already exist. |
| verbose | Allow backend to be chatty |
| args | arguments passed to Display constructor |
| kwargs | keyword 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.
|
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.
| omitBW | Don'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.
| algorithm | Desired scaling (e.g. "linear" or "asinh") |
| min | Minimum value, or "minmax" or "zscale" |
| max | Maximum value (must be None for minmax|zscale) |
| unit | Units for min and max (e.g. Percent, Absolute, Sigma; None if min==minmax|zscale) |
| *args | Optional arguments |
| **kwargs | Optional 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.
|
static |
Definition at line 245 of file interface.py.
|
static |
Set the default frame for display
Definition at line 259 of file interface.py.
|
static |
Set the default mapping from mask plane names to colours.
| name | name of mask plane, or a dict mapping names to colours |
| color | Desired 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.
|
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.
| name | Name of mask plane or a dictionary of name -> colourName |
| color | The 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.
| 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.
1.8.5