|
LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Public Member Functions | |
| def | __init__ (self, gutter=3, background=0, mode="square") |
| def | reset (self) |
| def | append (self, image, label=None, ctype=None) |
| def | makeMosaic (self, images=None, display="deferToFrame", mode=None, background=None, title="") |
| def | setGutter (self, gutter) |
| def | setBackground (self, background) |
| def | setMode (self, mode) |
| def | getBBox (self, ix, iy=None) |
| def | drawLabels (self, labels=None, display="deferToFrame", frame=None) |
| def | nImage (self) |
Public Attributes | |
| gutter | |
| background | |
| xsize | |
| ysize | |
| images | |
| labels | |
| nImage | |
| ny | |
| mode | |
A class to handle mosaics of one or more identically-sized images
(or `~lsst.afw.image.Mask` or `~lsst.afw.image.MaskedImage`)
Notes
-----
Note that this mosaic is a patchwork of the input images; if you want to
make a mosaic of a set images of the sky, you probably want to use the coadd code
Examples
--------
.. code-block:: py
m = Mosaic()
m.setGutter(5)
m.setBackground(10)
m.setMode("square") # the default; other options are "x" or "y"
mosaic = m.makeMosaic(im1, im2, im3) # build the mosaic
display = afwDisplay.getDisplay()
display.mtv(mosaic) # display it
m.drawLabels(["Label 1", "Label 2", "Label 3"], display) # label the panels
# alternative way to build a mosaic
images = [im1, im2, im3]
labels = ["Label 1", "Label 2", "Label 3"]
mosaic = m.makeMosaic(images)
display.mtv(mosaic)
m.drawLabels(labels, display)
# Yet another way to build a mosaic (no need to build the images/labels lists)
for i in range(len(images)):
m.append(images[i], labels[i])
# You may optionally include a colour, e.g. afwDisplay.YELLOW, as a third argument
mosaic = m.makeMosaic()
display.mtv(mosaic)
m.drawLabels(display=display)
Or simply:
.. code-block:: py
mosaic = m.makeMosaic(display=display)
You can return the (ix, iy)th (or nth) bounding box (in pixels) with `getBBox()`
| def lsst.afw.display.utils.Mosaic.__init__ | ( | self, | |
gutter = 3, |
|||
background = 0, |
|||
mode = "square" |
|||
| ) |
| def lsst.afw.display.utils.Mosaic.append | ( | self, | |
| image, | |||
label = None, |
|||
ctype = None |
|||
| ) |
Add an image to the list of images to be mosaiced
Returns
-------
index
the index of this image (may be passed to `getBBox()`)
Notes
-----
Set may be cleared with ``Mosaic.reset()``
Definition at line 134 of file utils.py.
| def lsst.afw.display.utils.Mosaic.drawLabels | ( | self, | |
labels = None, |
|||
display = "deferToFrame", |
|||
frame = None |
|||
| ) |
| def lsst.afw.display.utils.Mosaic.getBBox | ( | self, | |
| ix, | |||
iy = None |
|||
| ) |
Get the BBox for a panel
Parameters
----------
ix : `int`
If ``iy`` is not `None`, this is the x coordinate of the panel.
If ``iy`` is `None`, this is the number of the panel.
iy : `int`, optional
The y coordinate of the panel.
Definition at line 285 of file utils.py.
| def lsst.afw.display.utils.Mosaic.makeMosaic | ( | self, | |
images = None, |
|||
display = "deferToFrame", |
|||
mode = None, |
|||
background = None, |
|||
title = "" |
|||
| ) |
| def lsst.afw.display.utils.Mosaic.nImage | ( | self | ) |
| def lsst.afw.display.utils.Mosaic.reset | ( | self | ) |
| def lsst.afw.display.utils.Mosaic.setBackground | ( | self, | |
| background | |||
| ) |
| def lsst.afw.display.utils.Mosaic.setGutter | ( | self, | |
| gutter | |||
| ) |
| def lsst.afw.display.utils.Mosaic.setMode | ( | self, | |
| mode | |||
| ) |