|
lsst.afw
14.0-25-g0e8fc950e+3
|
Classes | |
| class | _Buffering |
Public Member Functions | |
| def | __init__ (self, frame=None, backend=None, args, kwargs) |
| Create an object able to display images and overplot glyphs. More... | |
| def | __enter__ (self) |
| Support for python's with statement. More... | |
| def | __exit__ (self, args) |
| Support for python's with statement. More... | |
| def | __del__ (self) |
| def | __getattr__ (self, name) |
| def | close (self) |
| def | verbose (self) |
| The backend's verbosity. More... | |
| def | verbose (self, value) |
| def | __str__ (self) |
| def | maskColorGenerator (self, omitBW=True) |
| A generator for "standard" colours. More... | |
| def | setMaskPlaneColor (self, name, color=None) |
| Request that mask plane name be displayed as color. More... | |
| def | getMaskPlaneColor (self, name=None) |
| Return the colour associated with the specified mask plane name. More... | |
| def | setMaskTransparency (self, transparency=None, name=None) |
| Specify display's mask transparency (percent); or None to not set it when loading masks. More... | |
| def | getMaskTransparency (self, name=None) |
| Return the current display's mask transparency. More... | |
| def | show (self) |
| Uniconify and Raise display. More... | |
| def | mtv (self, data, title="", wcs=None) |
| Display an Image or Mask on a DISPLAY display. More... | |
| def | Buffering (self) |
| def | flush (self) |
| Flush the buffers. More... | |
| def | erase (self) |
| Erase the specified DISPLAY frame. More... | |
| def | 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]. More... | |
| def | 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. More... | |
| def | 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. More... | |
| def | zoom (self, zoomfac=None, colc=None, rowc=None, origin=afwImage.PARENT) |
| Zoom frame by specified amount, optionally panning also. More... | |
| def | pan (self, colc=None, rowc=None, origin=afwImage.PARENT) |
| Pan to (rowc, colc); see also zoom. More... | |
| def | interact (self) |
| Enter an interactive loop, listening for key presses in display and firing callbacks. More... | |
| def | setCallback (self, k, func=None, noRaise=False) |
| Set the callback for key k to be func, returning the old callback. More... | |
| def | getActiveCallbackKeys (self, onlyActive=True) |
| Return all callback keys. More... | |
Static Public Member Functions | |
| def | setDefaultBackend (backend) |
| def | getDefaultBackend () |
| def | setDefaultFrame (frame=0) |
| def | getDefaultFrame () |
| def | incrDefaultFrame () |
| def | setDefaultMaskTransparency (maskPlaneTransparency={}) |
| def | setDefaultMaskPlaneColor (name=None, color=None) |
| Set the default mapping from mask plane names to colours. More... | |
| def | getDisplay (frame=None, backend=None, create=True, verbose=False, args, kwargs) |
| 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 113 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 133 of file interface.py.
| def lsst.afw.display.interface.Display.__del__ | ( | self | ) |
Definition at line 194 of file interface.py.
| def lsst.afw.display.interface.Display.__enter__ | ( | self | ) |
Support for python's with statement.
Definition at line 186 of file interface.py.
| def lsst.afw.display.interface.Display.__exit__ | ( | self, | |
| args | |||
| ) |
Support for python's with statement.
Definition at line 190 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 197 of file interface.py.
| def lsst.afw.display.interface.Display.__str__ | ( | self | ) |
Definition at line 240 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 477 of file interface.py.
| def lsst.afw.display.interface.Display.close | ( | self | ) |
Definition at line 221 of file interface.py.
|
static |
Delete and close all known display.
Definition at line 332 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 494 of file interface.py.
| def lsst.afw.display.interface.Display.erase | ( | self | ) |
Erase the specified DISPLAY frame.
Definition at line 489 of file interface.py.
| def lsst.afw.display.interface.Display.flush | ( | self | ) |
Flush the buffers.
Definition at line 485 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 647 of file interface.py.
|
static |
Definition at line 257 of file interface.py.
|
static |
Get the default frame for display
Definition at line 266 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 306 of file interface.py.
| def lsst.afw.display.interface.Display.getMaskPlaneColor | ( | self, | |
name = None |
|||
| ) |
Return the colour associated with the specified mask plane name.
| name | Desired mask plane; if None, return entire dict |
Definition at line 385 of file interface.py.
| def lsst.afw.display.interface.Display.getMaskTransparency | ( | self, | |
name = None |
|||
| ) |
Return the current display's mask transparency.
Definition at line 416 of file interface.py.
|
static |
Increment the default frame for display
Definition at line 271 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 609 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 533 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 339 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 425 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 604 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 563 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 630 of file interface.py.
|
static |
Definition at line 247 of file interface.py.
|
static |
Set the default frame for display
Definition at line 261 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 284 of file interface.py.
|
static |
Definition at line 277 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.
If the colour is "ignore" (or IGNORE) then that mask plane is not displayed
The advantage of using the symbolic names is that the python interpreter can detect typos.
Definition at line 361 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 396 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 421 of file interface.py.
| def lsst.afw.display.interface.Display.verbose | ( | self | ) |
The backend's verbosity.
Definition at line 231 of file interface.py.
| def lsst.afw.display.interface.Display.verbose | ( | self, | |
| value | |||
| ) |
Definition at line 236 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 583 of file interface.py.
| lsst.afw.display.interface.Display.frame |
Definition at line 153 of file interface.py.
| lsst.afw.display.interface.Display.name |
Definition at line 155 of file interface.py.
1.8.13