LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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 | |||
) |