LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
|
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 | |
background | |
xsize | |
ysize | |
images | |
labels | |
nImage | |
nx | |
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()`
lsst.afw.display.utils.Mosaic.__init__ | ( | self, | |
gutter = 3, | |||
background = 0, | |||
mode = "square" ) |
Definition at line 120 of file utils.py.
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.
lsst.afw.display.utils.Mosaic.drawLabels | ( | self, | |
labels = None, | |||
display = "deferToFrame", | |||
frame = None ) |
Draw the list labels at the corners of each panel. Notes ----- If labels is None, use the ones specified by ``Mosaic.append()``
Definition at line 303 of file utils.py.
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.
lsst.afw.display.utils.Mosaic.makeMosaic | ( | self, | |
images = None, | |||
display = "deferToFrame", | |||
mode = None, | |||
background = None, | |||
title = "" ) |
Return a mosaic of all the images provided. If none are specified, use the list accumulated with `Mosaic.append()`. If display is specified, display the mosaic
Definition at line 155 of file utils.py.
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 ) |
Set mosaicing mode. Parameters ---------- mode : {"square", "x", "y"} Valid options: square Make mosaic as square as possible x Make mosaic one image high y Make mosaic one image wide
Definition at line 264 of file utils.py.