|
lsst.afw g714e0ed6de+de8826df4f
|
Public Member Functions | |
| __init__ (self, gutter=3, background=0, mode="square") | |
| reset (self) | |
| append (self, image, label=None, ctype=None) | |
| makeMosaic (self, images=None, display="deferToFrame", mode=None, background=None, title="") | |
| setGutter (self, gutter) | |
| setBackground (self, background) | |
| setMode (self, mode) | |
| getBBox (self, ix, iy=None) | |
| drawLabels (self, labels=None, display="deferToFrame", frame=None) | |
| nImage (self) | |
Public Attributes | |
| gutter = gutter | |
| background = background | |
| int | xsize = 0 |
| int | ysize = 0 |
| list | images = [] |
| list | labels = [] |
| int | nImage = 0: |
| nx = 1 | |
| ny = nx, ny | |
| mode = 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()`
| lsst.afw.display.utils.Mosaic.__init__ | ( | self, | |
| gutter = 3, | |||
| background = 0, | |||
| mode = "square" ) |
| lsst.afw.display.utils.Mosaic.append | ( | self, | |
| image, | |||
| label = None, | |||
| ctype = None ) |
| lsst.afw.display.utils.Mosaic.drawLabels | ( | self, | |
| labels = None, | |||
| display = "deferToFrame", | |||
| frame = None ) |
| lsst.afw.display.utils.Mosaic.getBBox | ( | self, | |
| ix, | |||
| iy = None ) |
| lsst.afw.display.utils.Mosaic.makeMosaic | ( | self, | |
| images = None, | |||
| display = "deferToFrame", | |||
| mode = None, | |||
| background = None, | |||
| title = "" ) |
| lsst.afw.display.utils.Mosaic.nImage | ( | self | ) |
| lsst.afw.display.utils.Mosaic.reset | ( | self | ) |
| lsst.afw.display.utils.Mosaic.setBackground | ( | self, | |
| background ) |
| lsst.afw.display.utils.Mosaic.setGutter | ( | self, | |
| gutter ) |
| lsst.afw.display.utils.Mosaic.setMode | ( | self, | |
| mode ) |