LSST Applications g063fba187b+fee0456c91,g0f08755f38+ea96e5a5a3,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+90257ff92a,g20f6ffc8e0+ea96e5a5a3,g217e2c1bcf+937a289c59,g28da252d5a+daa7da44eb,g2bbee38e9b+253935c60e,g2bc492864f+253935c60e,g3156d2b45e+6e55a43351,g32e5bea42b+31359a2a7a,g347aa1857d+253935c60e,g35bb328faa+a8ce1bb630,g3a166c0a6a+253935c60e,g3b1af351f3+a8ce1bb630,g3e281a1b8c+c5dd892a6c,g414038480c+416496e02f,g41af890bb2+afe91b1188,g599934f4f4+0db33f7991,g7af13505b9+e36de7bce6,g80478fca09+da231ba887,g82479be7b0+a4516e59e3,g858d7b2824+ea96e5a5a3,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+bc6ab8dfbd,gb58c049af0+d64f4d3760,gc28159a63d+253935c60e,gcab2d0539d+3f2b72788c,gcf0d15dbbd+4ea9c45075,gda6a2b7d83+4ea9c45075,gdaeeff99f8+1711a396fd,ge79ae78c31+253935c60e,gef2f8181fd+3031e3cf99,gf0baf85859+c1f95f4921,gfa517265be+ea96e5a5a3,gfa999e8aa5+17cd334064,w.2024.50
LSST Data Management Base Package
|
Classes | |
class | _Buffering |
Public Member Functions | |
__init__ (self, frame=None, backend=None, **kwargs) | |
__enter__ (self) | |
__exit__ (self, *args) | |
__del__ (self) | |
__getattr__ (self, name) | |
close (self) | |
verbose (self) | |
verbose (self, value) | |
__str__ (self) | |
setImageColormap (self, cmap) | |
maskColorGenerator (self, omitBW=True) | |
setMaskPlaneColor (self, name, color=None) | |
getMaskPlaneColor (self, name=None) | |
setMaskTransparency (self, transparency=None, name=None) | |
getMaskTransparency (self, name=None) | |
show (self) | |
image (self, data, title="", wcs=None) | |
mtv (self, data, title="", wcs=None) | |
Buffering (self) | |
flush (self) | |
erase (self) | |
centroids (self, catalog, *symbol="o", **kwargs) | |
dot (self, symb, c, r, size=2, ctype=None, origin=afwImage.PARENT, **kwargs) | |
line (self, points, origin=afwImage.PARENT, symbs=False, ctype=None, size=0.5) | |
scale (self, algorithm, min, max=None, unit=None, **kwargs) | |
zoom (self, zoomfac=None, colc=None, rowc=None, origin=afwImage.PARENT) | |
pan (self, colc=None, rowc=None, origin=afwImage.PARENT) | |
interact (self) | |
setCallback (self, k, func=None, noRaise=False) | |
getActiveCallbackKeys (self, onlyActive=True) | |
Static Public Member Functions | |
setDefaultBackend (backend) | |
getDefaultBackend () | |
setDefaultFrame (frame=0) | |
getDefaultFrame () | |
incrDefaultFrame () | |
setDefaultMaskTransparency (maskPlaneTransparency={}) | |
setDefaultMaskPlaneColor (name=None, color=None) | |
setDefaultImageColormap (cmap) | |
getDisplay (frame=None, backend=None, create=True, verbose=False, **kwargs) | |
delAllDisplays () | |
Public Attributes | |
frame | |
name | |
Protected Attributes | |
_impl | |
_xy0 | |
_maskPlaneColors | |
_callbacks | |
Static Protected Attributes | |
dict | _displays = {} |
_defaultBackend = None | |
int | _defaultFrame = 0 |
_defaultMaskPlaneColor | |
dict | _defaultMaskTransparency = {} |
str | _defaultImageColormap = "gray" |
Create an object able to display images and overplot glyphs. Parameters ---------- frame An identifier for the display. backend : `str` The backend to use (defaults to value set by setDefaultBackend()). **kwargs Arguments to pass to the backend.
Definition at line 126 of file interface.py.
lsst.afw.display.interface.Display.__init__ | ( | self, | |
frame = None, | |||
backend = None, | |||
** | kwargs ) |
Definition at line 158 of file interface.py.
lsst.afw.display.interface.Display.__del__ | ( | self | ) |
Definition at line 215 of file interface.py.
lsst.afw.display.interface.Display.__enter__ | ( | self | ) |
Support for python's with statement.
Definition at line 205 of file interface.py.
lsst.afw.display.interface.Display.__exit__ | ( | self, | |
* | args ) |
Support for python's with statement.
Definition at line 210 of file interface.py.
lsst.afw.display.interface.Display.__getattr__ | ( | self, | |
name ) |
Return the attribute of ``self._impl``, or ``._impl`` if it is requested. Parameters: ----------- name : `str` name of the attribute requested. Returns: -------- attribute : `object` the attribute of self._impl for the requested name.
Definition at line 218 of file interface.py.
lsst.afw.display.interface.Display.__str__ | ( | self | ) |
Definition at line 265 of file interface.py.
lsst.afw.display.interface.Display.Buffering | ( | self | ) |
Return a context manager that will buffer repeated display commands, to e.g. speed up displaying points. Examples -------- .. code-block:: py with display.Buffering(): display.dot("+", xc, yc)
Definition at line 621 of file interface.py.
lsst.afw.display.interface.Display.centroids | ( | self, | |
catalog, | |||
* | symbol = "o", | ||
** | kwargs ) |
Draw the sources from a catalog at their pixel centroid positions as given by `~lsst.afw.table.Catalog.getX()` and `~lsst.afw.table.Catalog.getY()`. See `dot` for an explanation of ``symbol`` and available args/kwargs, which are passed to `dot`. Parameters ---------- catalog : `lsst.afw.table.Catalog` Catalog to display centroids for. Must have valid `slot_Centroid`.
Definition at line 644 of file interface.py.
lsst.afw.display.interface.Display.close | ( | self | ) |
Definition at line 245 of file interface.py.
|
static |
Delete and close all known displays.
Definition at line 402 of file interface.py.
lsst.afw.display.interface.Display.dot | ( | self, | |
symb, | |||
c, | |||
r, | |||
size = 2, | |||
ctype = None, | |||
origin = afwImage.PARENT, | |||
** | kwargs ) |
Draw a symbol onto the specified display frame. Parameters ---------- symb 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) `lsst.afw.geom.ellipses.BaseCore` Draw the ellipse (argument size is ignored). N.b. objects derived from `~lsst.afw.geom.ellipses.BaseCore` include `~lsst.afw.geom.ellipses.Axes` and `~lsst.afw.geom.ellipses.Quadrupole`. Any other value Interpreted as a string to be drawn. c, r : `float` The column and row where the symbol is drawn [0-based coordinates]. 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 origin : `lsst.afw.image.ImageOrigin` Coordinate system for the given positions. **kwargs Extra keyword arguments to backend.
Definition at line 664 of file interface.py.
lsst.afw.display.interface.Display.erase | ( | self | ) |
Erase the specified display frame.
Definition at line 639 of file interface.py.
lsst.afw.display.interface.Display.flush | ( | self | ) |
Flush any buffering that may be provided by the backend.
Definition at line 634 of file interface.py.
lsst.afw.display.interface.Display.getActiveCallbackKeys | ( | self, | |
onlyActive = True ) |
Return all callback keys Parameters ---------- onlyActive : `bool` If `True` only return keys that do something
Definition at line 882 of file interface.py.
|
static |
Definition at line 281 of file interface.py.
|
static |
Get the default frame for display.
Definition at line 291 of file interface.py.
|
static |
Return a specific `Display`, creating it if need be. Parameters ---------- frame The desired frame (`None` => use defaultFrame (see `~Display.setDefaultFrame`)). backend : `str` 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 : `bool` create the display if it doesn't already exist. verbose : `bool` Allow backend to be chatty. **kwargs keyword arguments passed to `Display` constructor.
Definition at line 368 of file interface.py.
lsst.afw.display.interface.Display.getMaskPlaneColor | ( | self, | |
name = None ) |
Return the color associated with the specified mask plane name. Parameters ---------- name : `str` Desired mask plane; if `None`, return entire dict.
Definition at line 468 of file interface.py.
lsst.afw.display.interface.Display.getMaskTransparency | ( | self, | |
name = None ) |
Return the current display's mask transparency.
Definition at line 507 of file interface.py.
lsst.afw.display.interface.Display.image | ( | self, | |
data, | |||
title = "", | |||
wcs = None ) |
Display an image on a display, with semi-transparent masks overlaid, if available. Parameters ---------- data : `lsst.afw.image.Exposure` or `lsst.afw.image.MaskedImage` or `lsst.afw.image.Image` Image to display; Exposure and MaskedImage will show transparent mask planes. title : `str`, optional Title for the display window. wcs : `lsst.afw.geom.SkyWcs`, optional World Coordinate System to align an `~lsst.afw.image.MaskedImage` or `~lsst.afw.image.Image` to; raise an exception if ``data`` is an `~lsst.afw.image.Exposure`. Raises ------ RuntimeError Raised if an Exposure is passed with a non-None wcs when the ``wcs`` kwarg is also non-None. TypeError Raised if data is an incompatible type.
Definition at line 538 of file interface.py.
|
static |
Increment the default frame for display.
Definition at line 297 of file interface.py.
lsst.afw.display.interface.Display.interact | ( | self | ) |
Enter an interactive loop, listening for key presses or equivalent UI actions in the display and firing callbacks. Exit with ``q``, ``CR``, ``ESC``, or any equivalent UI action provided in the display. The loop may also be exited by returning `True` from a user-provided callback function.
Definition at line 823 of file interface.py.
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 points Parameters ---------- points : `list` A list of (col, row) origin : `lsst.afw.image.ImageOrigin` Coordinate system for the given positions. symbs : `bool` or sequence If ``symbs`` is `True`, draw points at the specified points using the desired symbol, otherwise connect the dots. If ``symbs`` supports indexing (which includes a string -- caveat emptor) the elements are used to label the points. ctype : `str` ``ctype`` is the name of a color (e.g. 'red'). size : `float` Size of points to create if `symbs` is passed.
Definition at line 721 of file interface.py.
lsst.afw.display.interface.Display.maskColorGenerator | ( | self, | |
omitBW = True ) |
A generator for "standard" colors. Parameters ---------- omitBW : `bool` Don't include `BLACK` and `WHITE`. Examples -------- .. code-block:: py colorGenerator = interface.maskColorGenerator(omitBW=True) for p in planeList: print(p, next(colorGenerator))
Definition at line 409 of file interface.py.
lsst.afw.display.interface.Display.mtv | ( | self, | |
data, | |||
title = "", | |||
wcs = None ) |
Display an image on a display, with semi-transparent masks overlaid, if available. Notes ----- 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 597 of file interface.py.
lsst.afw.display.interface.Display.pan | ( | self, | |
colc = None, | |||
rowc = None, | |||
origin = afwImage.PARENT ) |
Pan to a location. Parameters ---------- colc, rowc Coordinates to pan to. origin : `lsst.afw.image.ImageOrigin` Coordinate system for the given positions. See also -------- Display.zoom
Definition at line 807 of file interface.py.
lsst.afw.display.interface.Display.scale | ( | self, | |
algorithm, | |||
min, | |||
max = None, | |||
unit = None, | |||
** | kwargs ) |
Set the range of the scaling from DN in the image to the image display. Parameters ---------- algorithm : `str` 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). **kwargs Optional keyword arguments to the backend.
Definition at line 760 of file interface.py.
lsst.afw.display.interface.Display.setCallback | ( | self, | |
k, | |||
func = None, | |||
noRaise = False ) |
Set the callback for a key. Backend displays may provide an equivalent graphical UI action, but must make the associated key letter visible in the UI in some way. Parameters ---------- k : `str` The key to assign the callback to. func : callable The callback assigned to ``k``. noRaise : `bool` Do not raise if ``k`` is already in use. Returns ------- oldFunc : callable The callback previously assigned to ``k``.
Definition at line 848 of file interface.py.
|
static |
Definition at line 271 of file interface.py.
|
static |
Set the default frame for display.
Definition at line 285 of file interface.py.
|
static |
Set the default colormap for images. Parameters ---------- cmap : `str` Name of colormap, as interpreted by the backend. Notes ----- The only colormaps that all backends are required to honor (if they pay any attention to setImageColormap) are "gray" and "grey".
Definition at line 335 of file interface.py.
|
static |
Set the default mapping from mask plane names to colors. Parameters ---------- name : `str` or `dict` Name of mask plane, or a dict mapping names to colors If name is `None`, use the hard-coded default dictionary. color Desired color, or `None` if name is a dict.
Definition at line 311 of file interface.py.
|
static |
Definition at line 304 of file interface.py.
lsst.afw.display.interface.Display.setImageColormap | ( | self, | |
cmap ) |
Set the colormap to use for images. Parameters ---------- cmap : `str` Name of colormap, as interpreted by the backend. Notes ----- The only colormaps that all backends are required to honor (if they pay any attention to setImageColormap) are "gray" and "grey".
Definition at line 351 of file interface.py.
lsst.afw.display.interface.Display.setMaskPlaneColor | ( | self, | |
name, | |||
color = None ) |
Request that mask plane name be displayed as color. Parameters ---------- name : `str` or `dict` Name of mask plane or a dictionary of name -> colorName. color : `str` The name of the color to use (must be `None` if ``name`` is a `dict`). Colors may be specified as any X11-compliant string (e.g. `"orchid"`), or by one of the following constants in `lsst.afw.display` : `BLACK`, `WHITE`, `RED`, `BLUE`, `GREEN`, `CYAN`, `MAGENTA`, `YELLOW`. If the color 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 438 of file interface.py.
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 486 of file interface.py.
lsst.afw.display.interface.Display.show | ( | self | ) |
Uniconify and Raise display. Notes ----- Throws an exception if frame doesn't exit.
Definition at line 512 of file interface.py.
lsst.afw.display.interface.Display.verbose | ( | self | ) |
The backend's verbosity.
Definition at line 255 of file interface.py.
lsst.afw.display.interface.Display.verbose | ( | self, | |
value ) |
Definition at line 261 of file interface.py.
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 786 of file interface.py.
|
protected |
Definition at line 181 of file interface.py.
|
staticprotected |
Definition at line 139 of file interface.py.
|
staticprotected |
Definition at line 140 of file interface.py.
|
staticprotected |
Definition at line 156 of file interface.py.
|
staticprotected |
Definition at line 141 of file interface.py.
|
staticprotected |
Definition at line 155 of file interface.py.
|
staticprotected |
Definition at line 138 of file interface.py.
|
protected |
Definition at line 172 of file interface.py.
|
protected |
Definition at line 177 of file interface.py.
|
protected |
Definition at line 175 of file interface.py.
lsst.afw.display.interface.Display.frame |
Definition at line 171 of file interface.py.
lsst.afw.display.interface.Display.name |
Definition at line 173 of file interface.py.