|
LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Public Member Functions | |
| def | __init__ |
| def | reset |
| def | append |
| def | makeMosaic |
| def | setGutter |
| def | setBackground |
| def | setMode |
| def | getBBox |
| def | drawLabels |
Public Attributes | |
| gutter | |
| background | |
| xsize | |
| ysize | |
| images | |
| labels | |
| nImage | |
| ny | |
| mode | |
A class to handle mosaics of one or more identically-sized images (or Masks or MaskedImages)
E.g.
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:
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.append | ( | self, | |
| image, | |||
label = None, |
|||
ctype = None |
|||
| ) |
| def lsst.afw.display.utils.Mosaic.drawLabels | ( | self, | |
labels = None, |
|||
display = "deferToFrame", |
|||
frame = None |
|||
| ) |
Draw the list labels at the corners of each panel. If labels is None, use the ones specified by Mosaic.append()
Definition at line 250 of file utils.py.
| def lsst.afw.display.utils.Mosaic.getBBox | ( | self, | |
| ix, | |||
iy = None |
|||
| ) |
Get the BBox for the nth or (ix, iy)the panel
Definition at line 241 of file utils.py.
| def lsst.afw.display.utils.Mosaic.makeMosaic | ( | self, | |
images = None, |
|||
display = "deferToFrame", |
|||
mode = None, |
|||
background = None, |
|||
title = "", |
|||
frame = None |
|||
| ) |
Return a mosaic of all the images provided; if none are specified, use the list accumulated with Mosaic.append(). 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 If display or frame (deprecated) is specified, display the mosaic
Definition at line 133 of file utils.py.
| 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 | |||
| ) |
1.8.5