MultibandFootprint¶
- class lsst.afw.detection.MultibandFootprint(bands, singles)¶
- Bases: - MultibandBase- Multiband Footprint class - A - MultibandFootprintis a collection of HeavyFootprints that have the same- SpanSetand- peakCatalogbut different flux in each band.- Parameters:
- bandslist
- List of band names. 
- singleslist
- A list of single band - HeavyFootprintobjects. Each- HeavyFootprintshould have the same- PeakCatalogand the same- SpanSet, however to save CPU cycles there is no internal check for consistency of the peak catalog.
 
- bands
 - Attributes Summary - List of band names for the single band objects - List of filter names for the single band objects (deprecated) - Common SpanSet and peak catalog for the single band footprints - Height of the images - MultibandMaskedImage that the footprints present a view into - Minimum (y,x) position - PeakCatalogof the- MultibandFootprint- List of single band objects - SpanSetof the- MultibandFootprint- Width of the images - X0 - Y0 - Methods Summary - clone([deep])- Copy the current object - fromArrays(bands, image[, mask, variance, ...])- Create a - MultibandFootprintfrom an- image,- mask,- variance- fromImages(bands, image[, mask, variance, ...])- Create a - MultibandFootprintfrom an- image,- mask,- variance- fromMaskedImages(bands, maskedImages[, ...])- Create a - MultibandFootprintfrom a list of- MaskedImage- getBBox()- Bounding box - getImage([bbox, fill, imageType])- Convert a - MultibandFootprintto a- MultibandImage- getPeaks()- Get the - PeakCatalog- getSpans()- Get the full - SpanSet- getXY0()- Minimum coordinate in the bounding box - setXY0(xy0)- Shift the bounding box but keep the same Extent - shiftedBy(offset)- Shift a bounding box by an offset, but keep the same Extent - shiftedTo(xy0)- Shift the bounding box but keep the same Extent - Attributes Documentation - bands¶
- List of band names for the single band objects 
 - filters¶
- List of filter names for the single band objects (deprecated) - Use - bandsinstead.- Deprecated since version v29.0: This has been replaced with - bands. Will be removed after v29.
 - footprint¶
- Common SpanSet and peak catalog for the single band footprints 
 - height¶
- Height of the images 
 - mMaskedImage¶
- MultibandMaskedImage that the footprints present a view into 
 - origin¶
- Minimum (y,x) position - This is the position of - self.getBBox().getMin(), but available as a tuple for numpy array indexing.
 - peaks¶
- PeakCatalogof the- MultibandFootprint
 - singles¶
- List of single band objects 
 - spans¶
- SpanSetof the- MultibandFootprint
 - width¶
- Width of the images 
 - x0¶
- X0 - X component of XY0 - Point2I.getX()
 - y0¶
- Y0 - Y component of XY0 - Point2I.getY()
 - Methods Documentation - clone(deep=True)¶
- Copy the current object - Parameters:
- deepbool
- Whether or not to make a deep copy 
 
- deep
- Returns:
- resultMultibandFootprint
- The cloned footprint. 
 
- result
 
 - static fromArrays(bands, image, mask=None, variance=None, footprint=None, xy0=None, thresh=0, peaks=None)¶
- Create a - MultibandFootprintfrom an- image,- mask,- variance- Parameters:
- bandslist
- List of band names. 
- image: array
- An array to convert into - lsst.afw.detection.HeavyFootprintobjects. Only pixels above the- threshvalue for at least one band will be included in the- SpanSetand resulting footprints.
- maskarray
- Mask for the - imagearray.
- variancearray
- Variance of the - imagearray.
- footprintFootprint
- Footprintthat contains the- SpanSetand- PeakCatalogto use for the- HeavyFootprintin each band. If- footprintis- Nonethen the- threshis used to create a- Footprintbased on the pixels above the- threshvalue.
- xy0Point2I
- If - imageis an array and- footprintis- Nonethen specifying- xy0gives the location of the minimum- xand- yvalue of the- images.
- threshfloator list of floats
- Threshold in each band (or the same threshold to be used in all bands) to include a pixel in the - SpanSetof the- MultibandFootprint. If- Footprintis not- Nonethen- threshis ignored.
- peaksPeakCatalog
- Catalog containing information about the peaks located in the footprints. 
 
- bands
- Returns:
- resultMultibandFootprint
- MultibandFootprint created from the arrays 
 
- result
 
 - static fromImages(bands, image, mask=None, variance=None, footprint=None, thresh=0, peaks=None)¶
- Create a - MultibandFootprintfrom an- image,- mask,- variance- Parameters:
- bandslist
- List of band names. 
- imagelsst.afw.image.MultibandImage, or list oflsst.afw.image.Image
- A - lsst.afw.image.MultibandImage(or collection of images in each band) to convert into- HeavyFootprintobjects. Only pixels above the- threshvalue for at least one band will be included in the- SpanSetand resulting footprints.
- maskMultibandMaskor list ofMask
- Mask for the - image.
- variancelsst.afw.image.MultibandImage, or list oflsst.afw.image.Image
- Variance of the - image.
- threshfloatorlistof floats
- Threshold in each band (or the same threshold to be used in all bands) to include a pixel in the - SpanSetof the- MultibandFootprint. If- Footprintis not- Nonethen- threshis ignored.
- peaksPeakCatalog
- Catalog containing information about the peaks located in the footprints. 
 
- bands
- Returns:
- resultMultibandFootprint
- MultibandFootprint created from the image, mask, and variance 
 
- result
 
 - static fromMaskedImages(bands, maskedImages, footprint=None, thresh=0, peaks=None)¶
- Create a - MultibandFootprintfrom a list of- MaskedImage- See - fromImagesfor a description of the parameters not listed below- Parameters:
- maskedImageslistoflsst.afw.image.MaskedImage
- MaskedImages to extract the single band heavy footprints from. Like - fromImages, if a- footprintis not specified then all pixels above- threshwill be used, and- peakswill be added to the- PeakCatalog.
 
- maskedImages
- Returns:
- resultMultibandFootprint
- MultibandFootprint created from the image, mask, and variance 
 
- result
 
 - getBBox()¶
- Bounding box 
 - getImage(bbox=None, fill=nan, imageType=<class 'lsst.afw.image._image._multiband.MultibandMaskedImage'>)¶
- Convert a - MultibandFootprintto a- MultibandImage- This returns the heavy footprints converted into an - MultibandImageor- MultibandMaskedImage(depending on- imageType). This might be different than the internal- mMaskedImageproperty of the- MultibandFootprint, as the- mMaskedImagemight 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 - MultibandMaskedImageor- MultibandImageand describes the type of the output image.
 
- bbox
- Returns:
- resultMultibandBase
- The resulting - MultibandImageor- MultibandMaskedImagecreated from the- MultibandHeavyFootprint.
 
- result
 
 - getPeaks()¶
- Get the - PeakCatalog
 - getSpans()¶
- Get the full - SpanSet
 - getXY0()¶
- Minimum coordinate in the bounding box 
 - setXY0(xy0)¶
- Shift the bounding box but keep the same Extent - Parameters:
- xy0: `Point2I`
- New minimum bounds of the bounding box 
 
 
 - shiftedBy(offset)¶
- Shift a bounding box by an offset, but keep the same Extent - This method is broken until DM-10781 is completed. - Parameters:
- offset: `Extent2I`
- Amount to shift the bounding box in x and y. 
 
- Returns:
- result: MultibandBase
- A copy of the object, shifted by - offset
 
- result: 
 
 - shiftedTo(xy0)¶
- Shift the bounding box but keep the same Extent - This method is broken until DM-10781 is completed. - Parameters:
- xy0: `Point2I`
- New minimum bounds of the bounding box 
 
- Returns:
- result: MultibandBase
- A copy of the object, shifted to - xy0.
 
- result: