lsst.afw g714e0ed6de+196fb0684f
Loading...
Searching...
No Matches
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory Class Reference
Inheritance diagram for lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory:
lsst::afw::table::io::PersistableFacade< T > lsst::afw::detection::Footprint lsst::afw::table::io::PersistableFactory lsst::afw::table::io::PersistableFacade< lsst::afw::detection::Footprint > lsst::afw::table::io::Persistable

Public Member Functions

 Factory (std::string const &name)
 
std::shared_ptr< afw::table::io::Persistableread (InputArchive const &archive, CatalogVector const &catalogs) const override
 Construct a new object from the given InputArchive and vector of catalogs.
 
 HeavyFootprint (Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &mimage, HeavyFootprintCtrl const *ctrl=nullptr)
 Create a HeavyFootprint from a regular Footprint and the image that provides the pixel values.
 
 HeavyFootprint (Footprint const &foot, HeavyFootprintCtrl const *ctrl=nullptr)
 Create a HeavyFootprint from a regular Footprint, allocating space to hold foot.getArea() pixels, but not initializing them.
 
 HeavyFootprint ()=default
 Default constructor for HeavyFootprint.
 
 HeavyFootprint (HeavyFootprint const &other)=default
 
 HeavyFootprint (HeavyFootprint &&other)=default
 
 ~HeavyFootprint () override=default
 
HeavyFootprintoperator= (HeavyFootprint const &)=default
 
HeavyFootprintoperator= (HeavyFootprint &&)=default
 
bool isHeavy () const override
 Is this a HeavyFootprint (yes!)
 
void insert (lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage) const
 Replace all the pixels in the image with the values in the HeavyFootprint.
 
void insert (lsst::afw::image::Image< ImagePixelT > &image) const
 Replace all the pixels in the image with the values in the HeavyFootprint.
 
ndarray::Array< ImagePixelT, 1, 1 > getImageArray ()
 
ndarray::Array< ImagePixelT const, 1, 1 > getImageArray () const
 
ndarray::Array< MaskPixelT, 1, 1 > getMaskArray ()
 
ndarray::Array< MaskPixelT const, 1, 1 > getMaskArray () const
 
ndarray::Array< VariancePixelT, 1, 1 > getVarianceArray ()
 
ndarray::Array< VariancePixelT const, 1, 1 > getVarianceArray () const
 
MaskPixelT getMaskBitsSet () const
 
double dot (HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &other) const
 Dot product between HeavyFootprints.
 
std::shared_ptr< geom::SpanSetgetSpans () const
 Return a shared pointer to the SpanSet.
 
void setSpans (std::shared_ptr< geom::SpanSet > otherSpanSet)
 Sets the shared pointer to the SpanSet in the Footprint.
 
PeakCataloggetPeaks ()
 Return the Peaks contained in this Footprint.
 
const PeakCataloggetPeaks () const
 
std::shared_ptr< PeakRecordaddPeak (float fx, float fy, float value)
 Convenience function to add a peak.
 
void sortPeaks (afw::table::Key< float > const &key=afw::table::Key< float >())
 Sort Peaks from most positive value to most negative.
 
void setPeakSchema (afw::table::Schema const &peakSchema)
 Set the Schema used by the PeakCatalog (will throw if PeakCatalog is not empty).
 
void setPeakCatalog (PeakCatalog const &otherPeaks)
 Set the peakCatalog to a copy of the supplied catalog.
 
std::size_t getArea () const
 Return the number of pixels in this Footprint.
 
lsst::geom::Point2D getCentroid () const
 Return the Footprint's centroid.
 
geom::ellipses::Quadrupole getShape () const
 Return the Footprint's shape (interpreted as an ellipse)
 
void shift (int dx, int dy)
 Shift a Footprint by (dx, dy)
 
void shift (lsst::geom::ExtentI const &d)
 Shift a Footprint by a given extent.
 
lsst::geom::Box2I getBBox () const
 Return the Footprint's bounding box.
 
lsst::geom::Box2I getRegion () const
 Return the corners of the MaskedImage the footprints live in.
 
void setRegion (lsst::geom::Box2I const &region)
 Set the corners of the MaskedImage wherein the footprints dwell.
 
void clipTo (lsst::geom::Box2I const &bbox)
 Clip the Footprint such that all values lie inside the supplied Bounding Box.
 
bool contains (lsst::geom::Point2I const &pix) const
 Tests if a pixel postion falls inside the Footprint.
 
std::shared_ptr< Footprinttransform (std::shared_ptr< geom::SkyWcs > source, std::shared_ptr< geom::SkyWcs > target, lsst::geom::Box2I const &region, bool doClip=true) const
 Transform the footprint from one WCS to another.
 
std::shared_ptr< Footprinttransform (lsst::geom::LinearTransform const &t, lsst::geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint whose pixels are the product of applying the specified transformation.
 
std::shared_ptr< Footprinttransform (lsst::geom::AffineTransform const &t, lsst::geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint whose pixels are the product of applying the specified transformation.
 
std::shared_ptr< Footprinttransform (geom::TransformPoint2ToPoint2 const &t, lsst::geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint whose pixels are the product of applying the specified transformation.
 
bool isPersistable () const noexcept override
 Report if this object is persistable.
 
void dilate (int r, geom::Stencil s=geom::Stencil::CIRCLE)
 Dilate the Footprint with a defined kernel.
 
void dilate (geom::SpanSet const &other)
 Dilate the Footprint with a defined kernel.
 
void erode (int r, geom::Stencil s=geom::Stencil::CIRCLE)
 Erode the Footprint with a defined kernel.
 
void erode (geom::SpanSet const &other)
 Erode the Footprint with a defined kernel.
 
void removeOrphanPeaks ()
 Remove peaks from the PeakCatalog that fall outside the area of the Footprint.
 
void updatePeakSignificance (double sigma)
 Compute and update the significance of each peak, given a single value for sigma.
 
void updatePeakSignificance (image::Image< float > const &variance, int polarity)
 Compute and update the significance of each peak, using the variance image.
 
bool isContiguous () const
 Reports if the Footprint is simply connected or has multiple components.
 
std::vector< std::shared_ptr< Footprint > > split () const
 Split a multi-component Footprint into a vector of contiguous Footprints.
 
bool operator== (Footprint const &other) const
 equality operator
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file.
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory.
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object.
 

Static Public Member Functions

static std::shared_ptr< HeavyFootprint< ImagePixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > > readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object.
 
static std::shared_ptr< HeavyFootprint< ImagePixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > > readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 Read an object from a regular FITS file.
 
static std::shared_ptr< HeavyFootprint< ImagePixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > > readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 Read an object from a FITS file in memory.
 
static std::shared_ptr< HeavyFootprint< ImagePixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr.
 
static std::shared_ptr< lsst::afw::detection::FootprintreadFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object.
 
static std::shared_ptr< lsst::afw::detection::FootprintreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 Read an object from a regular FITS file.
 
static std::shared_ptr< lsst::afw::detection::FootprintreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 Read an object from a FITS file in memory.
 
static std::shared_ptr< lsst::afw::detection::FootprintdynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr.
 
static PersistableFactory const & lookup (std::string const &name, std::string const &module="")
 Return the factory that has been registered with the given name.
 

Static Public Attributes

static Factory registration
 

Protected Types

using OutputArchiveHandle
 
using InputArchive = io::InputArchive
 
using CatalogVector = io::CatalogVector
 

Protected Member Functions

std::string getPersistenceName () const override
 Return the name correspoinging ot the persistence type.
 
void write (OutputArchiveHandle &handle) const override
 Write an instance of a Footprint to an output Archive.
 
std::string getPythonModule () const override
 Return the python module the object will live in.
 

Static Protected Member Functions

static std::unique_ptr< FootprintreadSpanSet (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.
 

Detailed Description

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
class lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory

Definition at line 282 of file HeavyFootprint.cc.

Member Typedef Documentation

◆ CatalogVector

using lsst::afw::table::io::PersistableFactory::CatalogVector = io::CatalogVector
protectedinherited

Definition at line 231 of file Persistable.h.

◆ InputArchive

using lsst::afw::table::io::PersistableFactory::InputArchive = io::InputArchive
protectedinherited

Definition at line 230 of file Persistable.h.

◆ OutputArchiveHandle

Definition at line 108 of file Persistable.h.

Constructor & Destructor Documentation

◆ Factory()

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory::Factory ( std::string const & name)
inlineexplicit

Definition at line 285 of file HeavyFootprint.cc.

◆ ~HeavyFootprint()

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::~HeavyFootprint ( )
overridedefault

Member Function Documentation

◆ addPeak()

std::shared_ptr< PeakRecord > lsst::afw::detection::Footprint::addPeak ( float fx,
float fy,
float value )

Convenience function to add a peak.

Parameters
fxFloat containing the x position of a peak
fyFloat containing the y position of a peak
valueThe intensity value of the peak

Definition at line 138 of file Footprint.cc.

◆ clipTo()

void lsst::afw::detection::Footprint::clipTo ( lsst::geom::Box2I const & bbox)

Clip the Footprint such that all values lie inside the supplied Bounding Box.

Parameters
bboxInteger box object that defines the boundaries the footprint should be clipped to.

Definition at line 228 of file Footprint.cc.

◆ contains()

bool lsst::afw::detection::Footprint::contains ( lsst::geom::Point2I const & pix) const

Tests if a pixel postion falls inside the Footprint.

Parameters
pixInteger point object defining the position of a pixel to test

Definition at line 235 of file Footprint.cc.

◆ dilate() [1/2]

void lsst::afw::detection::Footprint::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
otherSpanSet to use as the kernel in dilation

Definition at line 304 of file Footprint.cc.

◆ dilate() [2/2]

void lsst::afw::detection::Footprint::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
rThe radius of the stencil object used to create a dilation kernel
sThe stencil object used to create the dilation kernel

Definition at line 294 of file Footprint.cc.

◆ dot()

double lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::dot ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const & other) const

Dot product between HeavyFootprints.

The mask and variance planes are ignored.

Definition at line 128 of file HeavyFootprint.cc.

◆ dynamicCast() [1/2]

Dynamically cast a shared_ptr.

Dynamically cast a shared pointer and raise on failure.

You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;

Exceptions
lsst::pex::exceptions::LogicErrorif the cast fails

param[in] ptr The pointer to be cast.

Returns
The cast pointer.
Exceptions
lsst::pex::exceptions::TypeErrorIf the dynamic cast fails.

Definition at line 218 of file Persistable.cc.

◆ dynamicCast() [2/2]

Dynamically cast a shared_ptr.

Dynamically cast a shared pointer and raise on failure.

You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;

Exceptions
lsst::pex::exceptions::LogicErrorif the cast fails

param[in] ptr The pointer to be cast.

Returns
The cast pointer.
Exceptions
lsst::pex::exceptions::TypeErrorIf the dynamic cast fails.

Definition at line 218 of file Persistable.cc.

◆ erode() [1/2]

void lsst::afw::detection::Footprint::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
otherSpanSet to use as the kernel in erosion

Definition at line 325 of file Footprint.cc.

◆ erode() [2/2]

void lsst::afw::detection::Footprint::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
rThe radius of the stencil object used to create a erosion kernel
sThe stencil object used to create the erosion kernel

Definition at line 315 of file Footprint.cc.

◆ getArea()

std::size_t lsst::afw::detection::Footprint::getArea ( ) const
inline

Return the number of pixels in this Footprint.

This function returns the real number of pixels, not the area of the bbox.

Definition at line 173 of file Footprint.h.

◆ getBBox()

lsst::geom::Box2I lsst::afw::detection::Footprint::getBBox ( ) const
inline

Return the Footprint's bounding box.

Definition at line 208 of file Footprint.h.

◆ getCentroid()

lsst::geom::Point2D lsst::afw::detection::Footprint::getCentroid ( ) const
inline

Return the Footprint's centroid.

The centroid is calculated as the mean of the pixel centers

Definition at line 180 of file Footprint.h.

◆ getImageArray() [1/2]

ndarray::Array< ImagePixelT, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getImageArray ( )
inline

Definition at line 107 of file HeavyFootprint.h.

◆ getImageArray() [2/2]

ndarray::Array< ImagePixelT const, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getImageArray ( ) const
inline

Definition at line 111 of file HeavyFootprint.h.

◆ getMaskArray() [1/2]

ndarray::Array< MaskPixelT, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskArray ( )
inline

Definition at line 108 of file HeavyFootprint.h.

◆ getMaskArray() [2/2]

ndarray::Array< MaskPixelT const, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskArray ( ) const
inline

Definition at line 112 of file HeavyFootprint.h.

◆ getMaskBitsSet()

MaskPixelT lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskBitsSet ( ) const
inline

Definition at line 116 of file HeavyFootprint.h.

◆ getPeaks() [1/2]

PeakCatalog & lsst::afw::detection::Footprint::getPeaks ( )
inline

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.

Definition at line 129 of file Footprint.h.

◆ getPeaks() [2/2]

const PeakCatalog & lsst::afw::detection::Footprint::getPeaks ( ) const
inline

Definition at line 130 of file Footprint.h.

◆ getPersistenceName()

std::string lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getPersistenceName ( ) const
overrideprotectedvirtual

Return the name correspoinging ot the persistence type.

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 133 of file HeavyFootprint.cc.

◆ getPythonModule()

std::string lsst::afw::detection::Footprint::getPythonModule ( ) const
inlineoverrideprotected

Return the python module the object will live in.

Definition at line 385 of file Footprint.h.

◆ getRegion()

lsst::geom::Box2I lsst::afw::detection::Footprint::getRegion ( ) const
inline

Return the corners of the MaskedImage the footprints live in.

Definition at line 213 of file Footprint.h.

◆ getShape()

geom::ellipses::Quadrupole lsst::afw::detection::Footprint::getShape ( ) const
inline

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)

Definition at line 188 of file Footprint.h.

◆ getSpans()

std::shared_ptr< geom::SpanSet > lsst::afw::detection::Footprint::getSpans ( ) const
inline

Return a shared pointer to the SpanSet.

Definition at line 115 of file Footprint.h.

◆ getVarianceArray() [1/2]

ndarray::Array< VariancePixelT, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getVarianceArray ( )
inline

Definition at line 109 of file HeavyFootprint.h.

◆ getVarianceArray() [2/2]

ndarray::Array< VariancePixelT const, 1, 1 > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getVarianceArray ( ) const
inline

Definition at line 113 of file HeavyFootprint.h.

◆ HeavyFootprint() [1/5]

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( )
default

Default constructor for HeavyFootprint.

Most common use for this will be in combination with the assignment operator

◆ HeavyFootprint() [2/5]

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( Footprint const & foot,
HeavyFootprintCtrl const * ctrl = nullptr )
explicit

Create a HeavyFootprint from a regular Footprint, allocating space to hold foot.getArea() pixels, but not initializing them.

This is used when unpersisting a HeavyFootprint.

Parameters
footThe Footprint defining the pixels to set
ctrlControl how we manipulate HeavyFootprints

Definition at line 75 of file HeavyFootprint.cc.

◆ HeavyFootprint() [3/5]

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( Footprint const & foot,
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & mimage,
HeavyFootprintCtrl const * ctrl = nullptr )
explicit

Create a HeavyFootprint from a regular Footprint and the image that provides the pixel values.

Parameters
footThe Footprint defining the pixels to set
mimageThe pixel values
ctrlControl how we manipulate HeavyFootprints
Note
the HeavyFootprintCtrl is passed by const* not const& so that we needn't provide a definition in the header.

Definition at line 62 of file HeavyFootprint.cc.

◆ HeavyFootprint() [4/5]

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( HeavyFootprint && other)
default

◆ HeavyFootprint() [5/5]

lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( HeavyFootprint const & other)
default

◆ insert() [1/2]

void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::insert ( lsst::afw::image::Image< ImagePixelT > & image) const

Replace all the pixels in the image with the values in the HeavyFootprint.

Parameters
[out]imageImage to set

Definition at line 105 of file HeavyFootprint.cc.

◆ insert() [2/2]

void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::insert ( lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & mimage) const

Replace all the pixels in the image with the values in the HeavyFootprint.

Definition at line 98 of file HeavyFootprint.cc.

◆ isContiguous()

bool lsst::afw::detection::Footprint::isContiguous ( ) const
inline

Reports if the Footprint is simply connected or has multiple components.

Definition at line 358 of file Footprint.h.

◆ isHeavy()

bool lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::isHeavy ( ) const
inlineoverridevirtual

Is this a HeavyFootprint (yes!)

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 93 of file HeavyFootprint.h.

◆ isPersistable()

bool lsst::afw::detection::Footprint::isPersistable ( ) const
inlineoverridenoexcept

Report if this object is persistable.

Definition at line 283 of file Footprint.h.

◆ lookup()

PersistableFactory const & lsst::afw::table::io::PersistableFactory::lookup ( std::string const & name,
std::string const & module = "" )
staticinherited

Return the factory that has been registered with the given name.

If the lookup fails and module is not an empty string, we will attempt to import a Python module with that name (this will only work when the C++ is being called from Python) and try again.

Definition at line 76 of file Persistable.cc.

◆ operator=() [1/2]

HeavyFootprint & lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( HeavyFootprint && )
default

◆ operator=() [2/2]

HeavyFootprint & lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( HeavyFootprint const & )
default

◆ operator==()

bool lsst::afw::detection::Footprint::operator== ( Footprint const & other) const

equality operator

Parameters
otherThe Footprint for which equality will be computed

Definition at line 374 of file Footprint.cc.

◆ read()

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
std::shared_ptr< afw::table::io::Persistable > lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory::read ( InputArchive const & archive,
CatalogVector const & catalogs ) const
inlineoverridevirtual

Construct a new object from the given InputArchive and vector of catalogs.

Implements lsst::afw::table::io::PersistableFactory.

Definition at line 287 of file HeavyFootprint.cc.

◆ readFits() [1/6]

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ readFits() [2/6]

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ readFits() [3/6]

Read an object from a FITS file in memory.

Parameters
[in]managerManager for the memory to read from.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 205 of file Persistable.h.

◆ readFits() [4/6]

Read an object from a FITS file in memory.

Parameters
[in]managerManager for the memory to read from.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 205 of file Persistable.h.

◆ readFits() [5/6]

Read an object from a regular FITS file.

Parameters
[in]fileNameName of the file to read.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 194 of file Persistable.h.

◆ readFits() [6/6]

Read an object from a regular FITS file.

Parameters
[in]fileNameName of the file to read.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 194 of file Persistable.h.

◆ readPeaks()

void lsst::afw::detection::Footprint::readPeaks ( afw::table::BaseCatalog const & peakCat,
Footprint & loadedFootprint )
staticprotected

Static method used to unpersist the PeakCatalog member of the Footprint class.

Definition at line 402 of file Footprint.cc.

◆ readSpanSet()

std::unique_ptr< Footprint > lsst::afw::detection::Footprint::readSpanSet ( afw::table::BaseCatalog const & catalog,
afw::table::io::InputArchive const & archive )
staticprotected

Static method used to unpersist the SpanSet member of the Footprint class.

Definition at line 397 of file Footprint.cc.

◆ removeOrphanPeaks()

void lsst::afw::detection::Footprint::removeOrphanPeaks ( )

Remove peaks from the PeakCatalog that fall outside the area of the Footprint.

Definition at line 330 of file Footprint.cc.

◆ setPeakCatalog()

void lsst::afw::detection::Footprint::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
otherPeaksThe PeakCatalog to copy

Definition at line 166 of file Footprint.cc.

◆ setPeakSchema()

void lsst::afw::detection::Footprint::setPeakSchema ( afw::table::Schema const & peakSchema)

Set the Schema used by the PeakCatalog (will throw if PeakCatalog is not empty).

Parameters
peakSchemaThe schema to use in the PeakCatalog
Exceptions
pex::exceptions::LogicErrorThrown if if the PeakCatalog is not empty

Definition at line 156 of file Footprint.cc.

◆ setRegion()

void lsst::afw::detection::Footprint::setRegion ( lsst::geom::Box2I const & region)
inline

Set the corners of the MaskedImage wherein the footprints dwell.

Parameters
regionA box describing the corners of the Image the Footprint derives from

Definition at line 220 of file Footprint.h.

◆ setSpans()

void lsst::afw::detection::Footprint::setSpans ( std::shared_ptr< geom::SpanSet > otherSpanSet)

Sets the shared pointer to the SpanSet in the Footprint.

Parameters
otherSpanSetShared pointer to a SpanSet

Definition at line 121 of file Footprint.cc.

◆ shift() [1/2]

void lsst::afw::detection::Footprint::shift ( int dx,
int dy )

Shift a Footprint by (dx, dy)

Parameters
dxHow much to move Footprint in column direction
dyHow much to move in row direction

Definition at line 196 of file Footprint.cc.

◆ shift() [2/2]

void lsst::afw::detection::Footprint::shift ( lsst::geom::ExtentI const & d)
inline

Shift a Footprint by a given extent.

Parameters
dExtentI object which gives the dimensions the Footprint should be shifted

Definition at line 203 of file Footprint.h.

◆ sortPeaks()

void lsst::afw::detection::Footprint::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
keyA key corresponding to the field in the Schema the PeakCatalog is to be sorted by.

Definition at line 148 of file Footprint.cc.

◆ split()

std::vector< std::shared_ptr< Footprint > > lsst::afw::detection::Footprint::split ( ) const

Split a multi-component Footprint into a vector of contiguous Footprints.

Split a multi-component Footprint such that each Footprint in the output vector is contiguous and contains only peaks that can be found within the bounds of the Footprint

Definition at line 367 of file Footprint.cc.

◆ transform() [1/4]

std::shared_ptr< Footprint > lsst::afw::detection::Footprint::transform ( geom::TransformPoint2ToPoint2 const & t,
lsst::geom::Box2I const & region,
bool doClip = true ) const

Return a new Footprint whose pixels are the product of applying the specified transformation.

Parameters
tA 2-D transform which will be used to map the pixels
regionUsed to set the "region" box of the returned footprint; note that this is NOT the same as the footprint's bounding box.
doClipIf true, clip the new footprint to the region bbox before returning it.

Definition at line 277 of file Footprint.cc.

◆ transform() [2/4]

std::shared_ptr< Footprint > lsst::afw::detection::Footprint::transform ( lsst::geom::AffineTransform const & t,
lsst::geom::Box2I const & region,
bool doClip = true ) const

Return a new Footprint whose pixels are the product of applying the specified transformation.

Parameters
tAn affine transform object which will be used to map the pixels
regionUsed to set the "region" box of the returned footprint; note that this is NOT the same as the footprint's bounding box.
doClipIf true, clip the new footprint to the region bbox before returning it.

Definition at line 267 of file Footprint.cc.

◆ transform() [3/4]

std::shared_ptr< Footprint > lsst::afw::detection::Footprint::transform ( lsst::geom::LinearTransform const & t,
lsst::geom::Box2I const & region,
bool doClip = true ) const

Return a new Footprint whose pixels are the product of applying the specified transformation.

Parameters
tA linear transform object which will be used to map the pixels
regionUsed to set the "region" box of the returned footprint; note that this is NOT the same as the footprint's bounding box.
doClipIf true, clip the new footprint to the region bbox before returning it.

Definition at line 257 of file Footprint.cc.

◆ transform() [4/4]

std::shared_ptr< Footprint > lsst::afw::detection::Footprint::transform ( std::shared_ptr< geom::SkyWcs > source,
std::shared_ptr< geom::SkyWcs > target,
lsst::geom::Box2I const & region,
bool doClip = true ) const

Transform the footprint from one WCS to another.

Parameters
sourceWcs that defines the coordinate system of the input footprint.
targetWcs that defines that desired coordinate system of the returned footprint.
regionUsed to set the "region" box of the returned footprint; note that this is NOT the same as the footprint's bounding box.
doClipIf true, clip the new footprint to the region bbox before returning it.

Definition at line 246 of file Footprint.cc.

◆ updatePeakSignificance() [1/2]

void lsst::afw::detection::Footprint::updatePeakSignificance ( double sigma)

Compute and update the significance of each peak, given a single value for sigma.

The Footprint peak schema must already have a significance field in it.

Parameters
sigmaThe standard deviation for peak detection, positive or negative as appropriate.
Exceptions
pex::exceptions::NotFoundErrorThrown if the the peaks do not have a significance field.

Definition at line 341 of file Footprint.cc.

◆ updatePeakSignificance() [2/2]

void lsst::afw::detection::Footprint::updatePeakSignificance ( image::Image< float > const & variance,
int polarity )

Compute and update the significance of each peak, using the variance image.

The Footprint peak schema must already have a significance field in it.

Parameters
varianceThe variance plane of the image that this footprint is in.
polarity+1 if this is detected as a positive footprint, -1 if negative.
Exceptions
pex::exceptions::NotFoundErrorThrown if the the peaks do not have a significance field.

Definition at line 353 of file Footprint.cc.

◆ write()

void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::write ( OutputArchiveHandle & handle) const
overrideprotectedvirtual

Write an instance of a Footprint to an output Archive.

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 135 of file HeavyFootprint.cc.

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits & fitsfile) const

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 99 of file Persistable.cc.

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager & manager,
std::string const & mode = "w" ) const

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 92 of file Persistable.cc.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const & fileName,
std::string const & mode = "w" ) const

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 83 of file Persistable.cc.

Member Data Documentation

◆ registration

template<typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::Factory::registration
static

Definition at line 317 of file HeavyFootprint.cc.


The documentation for this class was generated from the following file: