MultibandFootprint#

class lsst.afw.detection.MultibandFootprint(bands, singles)#

Bases: MultibandBase

Multiband Footprint class

A MultibandFootprint is a collection of HeavyFootprints that have the same SpanSet and peakCatalog but different flux in each band.

Parameters#

bandslist

List of band names.

singleslist

A list of single band HeavyFootprint objects. Each HeavyFootprint should have the same PeakCatalog and the same SpanSet, however to save CPU cycles there is no internal check for consistency of the peak catalog.

Attributes Summary

footprint

Common SpanSet and peak catalog for the single band footprints

mMaskedImage

MultibandMaskedImage that the footprints present a view into

peaks

PeakCatalog of the MultibandFootprint

spans

SpanSet of the MultibandFootprint

Methods Summary

clone([deep])

Copy the current object

fromArrays(bands, image[, mask, variance, ...])

Create a MultibandFootprint from an image, mask, variance

fromImages(bands, image[, mask, variance, ...])

Create a MultibandFootprint from an image, mask, variance

fromMaskedImages(bands, maskedImages[, ...])

Create a MultibandFootprint from a list of MaskedImage

getImage([bbox, fill, imageType])

Convert a MultibandFootprint to a MultibandImage

getPeaks()

Get the PeakCatalog

getSpans()

Get the full SpanSet

Attributes Documentation

footprint#

Common SpanSet and peak catalog for the single band footprints

mMaskedImage#

MultibandMaskedImage that the footprints present a view into

peaks#

PeakCatalog of the MultibandFootprint

spans#

SpanSet of the MultibandFootprint

Methods Documentation

clone(deep=True)#

Copy the current object

Parameters#

deepbool

Whether or not to make a deep copy

Returns#

resultMultibandFootprint

The cloned footprint.

static fromArrays(bands, image, mask=None, variance=None, footprint=None, xy0=None, thresh=0, peaks=None)#

Create a MultibandFootprint from an image, mask, variance

Parameters#

bandslist

List of band names.

image: array

An array to convert into lsst.afw.detection.HeavyFootprint objects. Only pixels above the thresh value for at least one band will be included in the SpanSet and resulting footprints.

maskarray

Mask for the image array.

variancearray

Variance of the image array.

footprintFootprint

Footprint that contains the SpanSet and PeakCatalog to use for the HeavyFootprint in each band. If footprint is None then the thresh is used to create a Footprint based on the pixels above the thresh value.

xy0Point2I

If image is an array and footprint is None then specifying xy0 gives the location of the minimum x and y value of the images.

threshfloat or list of floats

Threshold in each band (or the same threshold to be used in all bands) to include a pixel in the SpanSet of the MultibandFootprint. If Footprint is not None then thresh is ignored.

peaksPeakCatalog

Catalog containing information about the peaks located in the footprints.

Returns#

resultMultibandFootprint

MultibandFootprint created from the arrays

static fromImages(bands, image, mask=None, variance=None, footprint=None, thresh=0, peaks=None)#

Create a MultibandFootprint from an image, mask, variance

Parameters#

bandslist

List of band names.

imagelsst.afw.image.MultibandImage, or list of lsst.afw.image.Image

A lsst.afw.image.MultibandImage (or collection of images in each band) to convert into HeavyFootprint objects. Only pixels above the thresh value for at least one band will be included in the SpanSet and resulting footprints.

maskMultibandMask or list of Mask

Mask for the image.

variancelsst.afw.image.MultibandImage, or list of lsst.afw.image.Image

Variance of the image.

threshfloat or list of floats

Threshold in each band (or the same threshold to be used in all bands) to include a pixel in the SpanSet of the MultibandFootprint. If Footprint is not None then thresh is ignored.

peaksPeakCatalog

Catalog containing information about the peaks located in the footprints.

Returns#

resultMultibandFootprint

MultibandFootprint created from the image, mask, and variance

static fromMaskedImages(bands, maskedImages, footprint=None, thresh=0, peaks=None)#

Create a MultibandFootprint from a list of MaskedImage

See fromImages for a description of the parameters not listed below

Parameters#

maskedImageslist of lsst.afw.image.MaskedImage

MaskedImages to extract the single band heavy footprints from. Like fromImages, if a footprint is not specified then all pixels above thresh will be used, and peaks will be added to the PeakCatalog.

Returns#

resultMultibandFootprint

MultibandFootprint created from the image, mask, and variance

getImage(bbox=None, fill=nan, imageType=<class 'lsst.afw.image._image._multiband.MultibandMaskedImage'>)#

Convert a MultibandFootprint to a MultibandImage

This returns the heavy footprints converted into an MultibandImage or MultibandMaskedImage (depending on imageType). This might be different than the internal mMaskedImage property of the MultibandFootprint, as the mMaskedImage might contain some non-zero pixels not contained in the footprint but present in the images.

Parameters#

bboxBox2I

Bounding box of the resulting image. If no bounding box is specified, then the bounding box of the footprint is used.

fillfloat

Value to use for any pixel in the resulting image outside of the SpanSet.

imageTypetype

This should be either a MultibandMaskedImage or MultibandImage and describes the type of the output image.

Returns#

resultMultibandBase

The resulting MultibandImage or MultibandMaskedImage created from the MultibandHeavyFootprint.

getPeaks()#

Get the PeakCatalog

getSpans()#

Get the full SpanSet