File Footprint.h¶
- 
namespace lsst
- Class for a simple mapping implementing a generic AstrometryTransform. - Remove all non-astronomical counts from the Chunk Exposure’s pixels. - Forward declarations for lsst::utils::Cache - For details on the Cache class, see the Cache.h file. - It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines. - A base class for image defects - Numeric constants used by the Integrate.h integrator routines. - Compute Image Statistics - Note
- Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981. 
 - Note
- The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions. 
 - 
namespace afw
- 
namespace detection¶
- Functions - 
std::shared_ptr<Footprint> mergeFootprints(Footprint const &footprint1, Footprint const &footprint2)¶
- Merges two Footprints appends their peaks, and unions their spans, returning a new Footprint. Region is not preserved, and is set to an empty lsst::geom::Box2I object. 
 - 
std::vector<lsst::geom::Box2I> footprintToBBoxList(Footprint const &footprint)¶
- Return a list of BBoxs, whose union contains exactly the pixels in the footprint, neither more nor less. - Useful in generating sets of meas::algorithms::Defects for the ISR - Parameters
- footprint: Footprint to turn into bounding box list
 
 
 - 
class Footprint: public lsst::afw::table::io::PersistableFacade<lsst::afw::detection::Footprint>, public lsst::afw::table::io::Persistable
- #include <Footprint.h>Class to describe the properties of a detected object from an image A Footprint is designed to be constructed with information about a detected object in an image. Internally a Footprint holds a SpanSet which is used to describe the location of the object in the image (the x, y pixel locations which are considered part of the object). In addition a Footprint contains a PeakCatalog which is used to store the location and intensity of peaks in the detection. Subclassed by lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > Public Functions - Constructor for Footprint object. 
 - Constructor for the Footprint object. 
 - 
Footprint()
- Constructor of a empty Footprint object. 
 - 
Footprint(Footprint const &other)
 - 
Footprint(Footprint&&)
 - 
~Footprint()
 - 
virtual bool isHeavy() const
- Indicates if this object is a HeavyFootprint 
 - Sets the shared pointer to the SpanSet in the Footprint - Parameters
- otherSpanSet: Shared pointer to a SpanSet
 
 
 - 
PeakCatalog &getPeaks()
- Return the Peaks contained in this Footprint - The peaks should be ordered by decreasing pixel intensity at the peak position (so the most negative peak appears last). Users that add new Peaks manually are responsible for maintaining this sorting. 
 - 
const PeakCatalog &getPeaks() const
 - 
std::shared_ptr<PeakRecord> addPeak(float fx, float fy, float value)
- Convenience function to add a peak - Parameters
- fx: Float containing the x position of a peak
- fy: Float containing the y position of a peak
- value: The intensity value of the peak
 
 
 - 
void sortPeaks(afw::table::Key<float> const &key = afw::table::Key<float>())
- Sort Peaks from most positive value to most negative. - If the key passed is invalid (the default) PeakTable::getPeakValueKey() will be used. - Parameters
- key: A key corresponding to the field in the Schema the PeakCatalog is to be sorted by.
 
 
 - 
void setPeakSchema(afw::table::Schema const &peakSchema)
- Set the Schema used by the PeakCatalog (will throw if PeakCatalog is not empty). - Parameters
- peakSchema: The schema to use in the PeakCatalog
 
- Exceptions
- pex::exceptions::LogicError: Thrown if if the PeakCatalog is not empty
 
 
 - 
void setPeakCatalog(PeakCatalog const &otherPeaks)
- Set the peakCatalog to a copy of the supplied catalog - PeakCatalog will be copied into the Footprint, but a PeakCatalog is a shallow copy, so records will not be duplicated. This function will throw an error if the PeakCatalog of *this is not empty. - Parameters
- otherPeaks: The PeakCatalog to copy
 
 
 - 
std::size_t getArea() const
- Return the number of pixels in this Footprint - This function returns the real number of pixels, not the area of the bbox. 
 - 
lsst::geom::Point2D getCentroid() const
- Return the Footprint’s centroid - The centroid is calculated as the mean of the pixel centers 
 - 
geom::ellipses::Quadrupole getShape() const
- Return the Footprint’s shape (interpreted as an ellipse) - The shape is determined by measuring the moments of the pixel centers about its centroid (cf. getCentroid) 
 - 
void shift(int dx, int dy)
- Shift a Footprint by - (dx, dy)- Parameters
- dx: How much to move Footprint in column direction
- dy: How much to move in row direction
 
 
 - 
void shift(lsst::geom::ExtentI const &d)
- Shift a Footprint by a given extent - Parameters
- d: ExtentI object which gives the dimensions the Footprint should be shifted
 
 
 - 
lsst::geom::Box2I getRegion() const
- Return the corners of the MaskedImage the footprints live in 
 - 
void setRegion(lsst::geom::Box2I const ®ion)
- Set the corners of the MaskedImage wherein the footprints dwell - Parameters
- region: A box describing the corners of the Image the Footprint derives from
 
 
 - 
void clipTo(lsst::geom::Box2I const &bbox)
- Clip the Footprint such that all values lie inside the supplied Bounding Box - Parameters
- bbox: Integer box object that defines the boundaries the footprint should be clipped to.
 
 
 - 
bool contains(lsst::geom::Point2I const &pix) const
- Tests if a pixel postion falls inside the Footprint - Parameters
- pix: Integer point object defining the position of a pixel to test
 
 
 - Transform the footprint from one WCS to another - Parameters
- source: Wcs that defines the coordinate system of the input footprint.
- target: Wcs that defines that desired coordinate system of the returned footprint.
- region: Used to set the “region” box of the returned footprint; note that this is NOT the same as the footprint’s bounding box.
- doClip: If true, clip the new footprint to the region bbox before returning it.
 
 
 - 
std::shared_ptr<Footprint> transform(lsst::geom::LinearTransform const &t, lsst::geom::Box2I const ®ion, bool doClip = true) const
- Return a new Footprint whose pixels are the product of applying the specified transformation - Parameters
- t: A linear transform object which will be used to map the pixels
- region: Used to set the “region” box of the returned footprint; note that this is NOT the same as the footprint’s bounding box.
- doClip: If true, clip the new footprint to the region bbox before returning it.
 
 
 - 
std::shared_ptr<Footprint> transform(lsst::geom::AffineTransform const &t, lsst::geom::Box2I const ®ion, bool doClip = true) const
- Return a new Footprint whose pixels are the product of applying the specified transformation - Parameters
- t: An affine transform object which will be used to map the pixels
- region: Used to set the “region” box of the returned footprint; note that this is NOT the same as the footprint’s bounding box.
- doClip: If true, clip the new footprint to the region bbox before returning it.
 
 
 - 
std::shared_ptr<Footprint> transform(geom::TransformPoint2ToPoint2 const &t, lsst::geom::Box2I const ®ion, bool doClip = true) const
- Return a new Footprint whose pixels are the product of applying the specified transformation - Parameters
- t: A 2-D transform which will be used to map the pixels
- region: Used to set the “region” box of the returned footprint; note that this is NOT the same as the footprint’s bounding box.
- doClip: If true, clip the new footprint to the region bbox before returning it.
 
 
 - 
bool isPersistable() const
- Report if this object is persistable 
 - 
void dilate(int r, geom::Stencil s = geom::Stencil::CIRCLE)
- Dilate the Footprint with a defined kernel - This function enlarges the SpanSet which defines the area of the Footprint by an amount governed by in input kernel - Parameters
- r: The radius of the stencil object used to create a dilation kernel
- s: The stencil object used to create the dilation kernel
 
 
 - 
void dilate(geom::SpanSet const &other)
- Dilate the Footprint with a defined kernel - This function enlarges the SpanSet which defines the area of the Footprint by an amount governed by the input kernel - Parameters
- other: SpanSet to use as the kernel in dilation
 
 
 - 
void erode(int r, geom::Stencil s = geom::Stencil::CIRCLE)
- Erode the Footprint with a defined kernel - This function reduces the size of the SpanSet which defines the area of the Footprint by an amount governed by the input kernel - Parameters
- r: The radius of the stencil object used to create a erosion kernel
- s: The stencil object used to create the erosion kernel
 
 
 - 
void erode(geom::SpanSet const &other)
- Erode the Footprint with a defined kernel - This function reduces the size of the SpanSet which defines the area of the Footprint by an amount governed by the input kernel - Parameters
- other: SpanSet to use as the kernel in erosion
 
 
 - 
void removeOrphanPeaks()
- Remove peaks from the PeakCatalog that fall outside the area of the Footprint 
 - 
bool isContiguous() const
- Reports if the Footprint is simply connected or has multiple components 
 Protected Functions - 
std::string getPersistenceName() const
- Return the name correspoinging ot the persistence type 
 - 
std::string getPythonModule() const
- Return the python module the object will live in 
 - 
void write(OutputArchiveHandle &handle) const
- Write an instance of a Footprint to an output Archive 
 Protected Static Functions - 
static std::unique_ptr<Footprint> readSpanSet(afw::table::BaseCatalog const&, afw::table::io::InputArchive const&)
- Static method used to unpersist the SpanSet member of the Footprint class 
 - 
static void readPeaks(afw::table::BaseCatalog const&, Footprint&)
- Static method used to unpersist the PeakCatalog member of the Footprint class 
 Private Members - 
PeakCatalog _peaks¶
 Friends - 
friend lsst::afw::detection::FootprintFactory
 - 
friend lsst::afw::detection::FootprintMerge
 
 
- 
std::shared_ptr<Footprint> 
 
- 
namespace