|
LSST Applications g013ef56533+63812263fb,g083dd6704c+a047e97985,g199a45376c+0ba108daf9,g1fd858c14a+fde7a7a78c,g210f2d0738+db0c280453,g262e1987ae+abed931625,g29ae962dfc+058d1915d8,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+64337f1634,g47891489e3+f459a6810c,g53246c7159+8c5ae1fdc5,g54cd7ddccb+890c8e1e5d,g5a60e81ecd+d9e514a434,g64539dfbff+db0c280453,g67b6fd64d1+f459a6810c,g6ebf1fc0d4+8c5ae1fdc5,g7382096ae9+36d16ea71a,g74acd417e5+c70e70fbf6,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+f459a6810c,g8d7436a09f+1b779678e3,g8ea07a8fe4+81eaaadc04,g90f42f885a+34c0557caf,g97be763408+9583a964dd,g98a1a72a9c+028271c396,g98df359435+530b675b85,gb8cb2b794d+4e54f68785,gbf99507273+8c5ae1fdc5,gc2a301910b+db0c280453,gca7fc764a6+f459a6810c,gd7ef33dd92+f459a6810c,gdab6d2f7ff+c70e70fbf6,ge410e46f29+f459a6810c,ge41e95a9f2+db0c280453,geaed405ab2+e3b4b2a692,gf9a733ac38+8c5ae1fdc5,w.2025.43
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, metadata=None) | |
| mtv (self, data, title="", wcs=None, metadata=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) | |
| alignImages (self, match_type="", lock_match=True) | |
| 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 = frame | |
| name = backend | |
Protected Attributes | |
| _impl = _makeDisplayImpl(self, backend, **kwargs) | |
| _xy0 = None | |
| dict | _maskPlaneColors = {} |
| dict | _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.alignImages | ( | self, | |
| match_type = "", | |||
| lock_match = True ) |
Align and optionally lock the orientation of the images being
displayed.
Parameters
----------
match_type : `str`, optional
Match type to use to align the images; see the interface-specific
docs for what values to use.
lock_match : `bool`, optional
Whether to lock the alignment. Panning/zooming in one image will
preserve the alignment in other images.
Definition at line 850 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 623 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 646 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 666 of file interface.py.
| lsst.afw.display.interface.Display.erase | ( | self | ) |
Erase the specified display frame.
Definition at line 641 of file interface.py.
| lsst.afw.display.interface.Display.flush | ( | self | ) |
Flush any buffering that may be provided by the backend.
Definition at line 636 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 902 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, | |||
| metadata = 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`.
metadata : `lsst.daf.base.PropertySet`, optional
Additional FITS metadata to be sent to display.
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 825 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 723 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, | |||
| metadata = 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 599 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 809 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 762 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 868 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 788 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 = frame |
Definition at line 171 of file interface.py.
| lsst.afw.display.interface.Display.name = backend |
Definition at line 173 of file interface.py.