Coverage for python/lsst/afw/display/virtualDevice.py : 87%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# # LSST Data Management System # Copyright 2008, 2009, 2010, 2015 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
"""Back-end for display objects.
Parameters ---------- display The display object that we're providing the implementation for verbose : `bool` be chatty? """
"""Close the display, cleaning up any allocated resources """
"""Enable or disable buffering of writes to the display
Parameters ---------- enable : `bool` `True` or `False`, as appropriate """
"""Draw a symbol at (c, r)
Parameters ---------- symb The desired symbol. See `dot` for details c : `float` (x) column position r : `float` (y) row position size : `int` Size of symbol, in pixels ctype : `str` The desired color, either e.g. `lsst.afw.display.RED` or a color name known to X11 *args Extra arguments to backend **kwargs Extra keyword arguments to backend """ (self.frame, symb, c, r, size, ctype, args, kwargs))
"""Draw line defined by the list points
Parameters ---------- points : `list` of `tuple` of `float` A list of 0-indexed positions [(x, y), (x, y), ...] ctype : `str` The desired color, either e.g. `lsst.afw.display.RED` or a color name known to X11 """ (self.frame, points, ctype))
"""Erase all glyphs drawn on display """
"""Flush any I/O buffers """
print("setCallback %s -> %s" % (what, func))
"""Return an event generated by a keypress or mouse click """
"""Return the mask transparency for a display """ if self.verbose: print("virtual[%s]._getMaskTransparency()" % self.frame)
"""Display an image and maybe a mask overlay on a display
Parameters ---------- image : `lsst.afw.image.Image` `~lsst.afw.image.Image` to display mask : `lsst.afw.image.Mask` `~lsst.afw.image.Mask` to display wcs : `lsst.afw.geom.SkyWcs` A Wcs to associate with data title : `str` Name to display with the data """ (self.frame, "Image" if image else None, "Mask" if mask else None, "Wcs" if wcs else None, title))
"""Set the desired colormap
Parameters ---------- cmap : `str` the name of a colormap (e.g. "gray") or a backend-specific object """
"""Set the transparency of a maskplane
Parameters ---------- transparency : `float` The desired transparency, in the range [0, 100] maskplane The maskplane to set (None: all) """ (self.frame, transparency, maskplane))
"""Set the scaling from DN to displayed pixels
Parameters ---------- algorithm Scaling algorithm (e.g. linear) min The minimum value of the stretch (or "zscale" or "minmax") max The maximum value of the stretch unit Units for min and max (e.g. Percent, Absolute, Sigma) *args Optional arguments to the backend **kwargs Optional keyword arguments to the backend """ min, max, unit, args, kwargs))
"""Show the requested display """
"""Pan to a row and column
Parameters ---------- c : `float` Desired column (x) position r : `float` Desired row (y) position """
"""Set the zoom
Parameters ---------- zoomfac : `float` Zoom factor to use """ |