StitchedCoadd

class lsst.cell_coadds.StitchedCoadd(cell_coadd: MultipleCellCoadd, *, bbox: Box2I | None = None)

Bases: StitchedImagePlanes, CommonComponentsProperties

A lazy-evaluation coadd that stitches together images from adjacent cells.

Parameters:
cell_coaddMultipleCellCoadd

Cell-based coadd to stitch together.

bboxBox2I, optional

The region over which a contiguous coadd is desired. Defaults to cell_coadd.inner_bbox.

Notes

This class simply inserts subimages from each cell into the full image, doing so when an attribute is first accessed to avoid stitching together planes that may never be accessed.

A StitchedCoadd cannot be serialized in FITS format directly. Instead, the recommended way is to serialize the MultipleCellCoadd instance that was used to construct the object and reconstruct the StitchedCoadd by calling the stitch method on it. A less recommended way is to call the asExposure method to get an lsst.afw.image.Exposure object and persist that to the disk.

Attributes Summary

band

String label for the filter bandpass.

bbox

The bounding box common to all image planes.

common

Struct of image components common to all cells in a patch.

grid

Object that defines the piecewise grid (of inner cell regions) that this object stitches together.

identifiers

Struct of unique identifiers for this coadd's patch.

image

The data image itself.

mask

An integer bitmask.

mask_fraction_names

The names of all mask planes whose fractions were propagated in any cell.

mask_fractions

The (weighted) fraction of masked pixels that contribute to each pixel.

n_noise_realizations

The number of noise realizations cells are guaranteed to have.

noise_realizations

A sequence of noise realizations that were coadded with the same operations that were appled to the data image.

psf

The piecewise PSF of this image.

units

Units of the coadd's data pixels.

variance

Per-pixel variances for the image.

wcs

World Coordinate System object that maps the pixel grid to sky coordinates.

Methods Summary

asExposure()

Return an lsst.afw.image.Exposure view of this piecewise image.

asMaskedImage()

Return an lsst.afw.image.MaskedImage view of the image, mask, and variance planes.

uncache_image()

Remove any cached image plane.

uncache_mask()

Remove any cached mask plane.

uncache_mask_fraction()

Remove any cached mask_fraction planes.

uncache_noise_realizations()

Remove any cached noise_realization planes.

uncache_variance()

Remove any cached variance plane.

Attributes Documentation

band

String label for the filter bandpass.

May be None only for coadds that represent a combination of multiple passbands (e.g. chi^2 detection coadds), not just to indicate absence of knowledge.

bbox
common
grid

Object that defines the piecewise grid (of inner cell regions) that this object stitches together.

This may include cells outside the region covered by these image planes.

identifiers

Struct of unique identifiers for this coadd’s patch.

image
mask
mask_fraction_names
mask_fractions
n_noise_realizations
noise_realizations
psf

The piecewise PSF of this image.

units

Units of the coadd’s data pixels.

variance
wcs

World Coordinate System object that maps the pixel grid to sky coordinates.

Methods Documentation

asExposure() ExposureF

Return an lsst.afw.image.Exposure view of this piecewise image.

asMaskedImage() MaskedImageF

Return an lsst.afw.image.MaskedImage view of the image, mask, and variance planes.

uncache_image() None

Remove any cached image plane.

uncache_mask() None

Remove any cached mask plane.

uncache_mask_fraction() None

Remove any cached mask_fraction planes.

uncache_noise_realizations() None

Remove any cached noise_realization planes.

uncache_variance() None

Remove any cached variance plane.