LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Namespaces | |
utils | |
Classes | |
class | Footprint |
A set of pixels in an Image. More... | |
class | FootprintControl |
A Control Object for Footprints, controlling e.g. how they are grown. More... | |
class | HeavyFootprintCtrl |
A control object for HeavyFootprints. More... | |
class | FootprintFunctor |
A functor class to allow users to process all the pixels in a Footprint. More... | |
class | FootprintMergeList |
List of Merged Footprints. More... | |
class | FootprintSet |
A set of Footprints, associated with a MaskedImage. More... | |
class | GaussianPsf |
A circularly symmetric Gaussian Psf class with no spatial variation, intended mostly for testing purposes. More... | |
class | HeavyFootprint |
A set of pixels in an Image, including those pixels' actual values. More... | |
class | PeakRecord |
Record class that represents a peak in a Footprint. More... | |
class | PeakTable |
Table class for Peaks in Footprints. More... | |
class | Psf |
A polymorphic base class for representing an image's Point Spread Function. More... | |
class | PsfFormatter |
Formatter for persistence of Psf instances. More... | |
class | Threshold |
A Threshold is used to pass a threshold value to detection algorithms. More... | |
class | FootprintMerge |
class | IdSpan |
struct | IdSpanCompar |
Typedefs | |
typedef boost::uint64_t | FootprintIdPixel |
typedef afw::table::ColumnViewT < PeakRecord > | PeakColumnView |
typedef afw::table::CatalogT < PeakRecord > | PeakCatalog |
typedef afw::table::CatalogT < PeakRecord const > | ConstPeakCatalog |
Functions | |
void | nearestFootprint (std::vector< boost::shared_ptr< Footprint >> const &foots, lsst::afw::image::Image< boost::uint16_t >::Ptr argmin, lsst::afw::image::Image< boost::uint16_t >::Ptr dist) |
boost::shared_ptr< Footprint > | mergeFootprints (Footprint const &foot1, Footprint const &foot2) |
boost::shared_ptr< Footprint > | mergeFootprints (Footprint &foot1, Footprint &foot2) |
boost::shared_ptr< Footprint > | shrinkFootprint (Footprint const &foot, int nGrow, bool isotropic) |
boost::shared_ptr< Footprint > | growFootprint (Footprint const &foot, int nGrow, bool isotropic=true) |
boost::shared_ptr< Footprint > | growFootprint (boost::shared_ptr< Footprint > const &foot, int nGrow, bool isotropic=true) |
boost::shared_ptr< Footprint > | growFootprint (Footprint const &foot, int nGrow, bool left, bool right, bool up, bool down) |
Grow a Footprint in at least one of the cardinal directions, returning a new Footprint. More... | |
std::vector < lsst::afw::geom::Box2I > | footprintToBBoxList (Footprint const &foot) |
template<typename ImageT > | |
ImageT::Pixel | setImageFromFootprint (ImageT *image, Footprint const &footprint, typename ImageT::Pixel const value) |
Set all image pixels in a Footprint to a given value. More... | |
template<typename ImageT > | |
ImageT::Pixel | setImageFromFootprintList (ImageT *image, boost::shared_ptr< std::vector< boost::shared_ptr< Footprint >> const > footprints, typename ImageT::Pixel const value) |
Set all image pixels in a set of Footprints to a given value. More... | |
template<typename ImageT > | |
ImageT::Pixel | setImageFromFootprintList (ImageT *image, std::vector< boost::shared_ptr< Footprint >> const &footprints, typename ImageT::Pixel const value) |
Set all image pixels in a set of Footprints to a given value. More... | |
template<typename MaskT > | |
MaskT | setMaskFromFootprint (lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask) |
OR bitmask into all the Mask's pixels that are in the Footprint. More... | |
template<typename MaskT > | |
MaskT | clearMaskFromFootprint (lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask) |
(AND ~bitmask) all the Mask's pixels that are in the Footprint; that is, set to zero in the Mask-intersecting-Footprint all bits that are 1 in then bitmask. More... | |
template<typename ImageOrMaskedImageT > | |
void | copyWithinFootprint (Footprint const &foot, boost::shared_ptr< ImageOrMaskedImageT > const input, boost::shared_ptr< ImageOrMaskedImageT > output) |
template<typename MaskT > | |
MaskT | setMaskFromFootprintList (lsst::afw::image::Mask< MaskT > *mask, std::vector< boost::shared_ptr< Footprint >> const &footprints, MaskT const bitmask) |
OR bitmask into all the Mask's pixels which are in the set of Footprints. More... | |
template<typename MaskT > | |
MaskT | setMaskFromFootprintList (lsst::afw::image::Mask< MaskT > *mask, boost::shared_ptr< std::vector< boost::shared_ptr< Footprint >> const > const &footprints, MaskT const bitmask) |
OR bitmask into all the Mask's pixels which are in the set of Footprints. More... | |
template<typename MaskT > | |
boost::shared_ptr< Footprint > | footprintAndMask (boost::shared_ptr< Footprint > const &foot, typename image::Mask< MaskT >::Ptr const &mask, MaskT const bitmask) |
Return a Footprint that's the intersection of a Footprint with a Mask. More... | |
template<typename T , typename U , int N, int C, int D> | |
void | flattenArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, ndarray::Array< U, N-1, D > const &dest, lsst::afw::geom::Point2I const &xy0=lsst::afw::geom::Point2I()) |
Flatten the first two dimensions of an array. More... | |
template<typename T , typename U , int N, int C, int D, typename PixelOpT > | |
void | flattenArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, ndarray::Array< U, N-1, D > const &dest, PixelOpT const &pixelOp, lsst::afw::geom::Point2I const &xy0=lsst::afw::geom::Point2I()) |
Flatten the first two dimensions of an array. More... | |
template<typename T , int N, int C> | |
ndarray::Array< typename boost::remove_const< T >::type, N-1, N-1 > | flattenArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, lsst::afw::geom::Point2I const &xy0=lsst::afw::geom::Point2I()) |
Flatten the first two dimensions of an array Use this footprint to map 2-D points in the source to 1-D locations in the destination. This forces a deep copy of some of the relevant parts of source. More... | |
template<typename T , typename U , int N, int C, int D> | |
void | expandArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, ndarray::Array< U, N+1, D > const &dest, lsst::afw::geom::Point2I const &xy0=lsst::afw::geom::Point2I()) |
expand the first dimension of an array More... | |
template<typename T , typename U , int N, int C, int D, typename PixelOpT > | |
void | expandArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, ndarray::Array< U, N+1, D > const &dest, PixelOpT const &pixelOp, lsst::afw::geom::Point2I const &xy0=lsst::afw::geom::Point2I()) |
expand the first dimension of an array, applying a functor to each pixel More... | |
template<typename T , int N, int C> | |
ndarray::Array< typename boost::remove_const< T >::type, N+1, N+1 > | expandArray (Footprint const &fp, ndarray::Array< T, N, C > const &src, lsst::afw::geom::Box2I const &bbox=lsst::afw::geom::Box2I()) |
expand the first dimension of an array More... | |
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT > | |
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > | makeHeavyFootprint (Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &img, HeavyFootprintCtrl const *ctrl=NULL) |
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT > | |
boost::shared_ptr < HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > | mergeHeavyFootprints (HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &h1, HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &h2) |
std::ostream & | operator<< (std::ostream &os, PeakRecord const &record) |
Threshold | createThreshold (double const value, std::string const typeStr, bool const polarity) |
Factory method for creating Threshold objects. More... | |
int | resolve_alias (const std::vector< int > &aliases, int id) |
typedef afw::table::CatalogT<PeakRecord const> lsst::afw::detection::ConstPeakCatalog |
typedef boost::uint64_t lsst::afw::detection::FootprintIdPixel |
Pixel type for FootprintSet::insertIntoImage()
This is independent of the template parameters for FootprintSet, and including it within FootprintSet makes it difficult for SWIG to interpret the type.
Definition at line 46 of file FootprintSet.h.
MaskT lsst::afw::detection::clearMaskFromFootprint | ( | lsst::afw::image::Mask< MaskT > * | mask, |
Footprint const & | footprint, | ||
MaskT const | bitmask | ||
) |
(AND ~bitmask) all the Mask's pixels that are in the Footprint; that is, set to zero in the Mask-intersecting-Footprint all bits that are 1 in then bitmask.
void lsst::afw::detection::copyWithinFootprint | ( | Footprint const & | foot, |
boost::shared_ptr< ImageOrMaskedImageT > const | input, | ||
boost::shared_ptr< ImageOrMaskedImageT > | output | ||
) |
Copies pixels from input image to output image within the Footprint's area.
The input and output image must be the same type – either Image or MaskedImage.
Respects image xy0, so the footprints should be defined in the "PARENT" frame.
Pixels that are in the footprint but do not overlap with both images are not copied.
Threshold lsst::afw::detection::createThreshold | ( | double const | value, |
std::string const | typeStr, | ||
bool const | polarity | ||
) |
Factory method for creating Threshold objects.
value | value of threshold |
typeStr | string representation of a ThresholdType. This parameter is optional. Allowed values are: "variance", "value", "stdev", "pixel_stdev" |
polarity | If true detect positive objects, false for negative |
Definition at line 138 of file Threshold.cc.
void lsst::afw::detection::expandArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
ndarray::Array< U, N+1, D > const & | dest, | ||
lsst::afw::geom::Point2I const & | xy0 = lsst::afw::geom::Point2I() |
||
) |
expand the first dimension of an array
Use this footprint to map 1-D positions in the source to 2-D points in the destination. This forces a deep copy of the relevant parts of the source.
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The size of the outer dimension must match the area of the footprint. |
[out] | dest | array to copy to. The dimensions of the array must be height, width, inner N-1 dimensions of the source. |
[in] | xy0 | xy0 of the src array in the footprint's coordinate system |
For example,
void lsst::afw::detection::expandArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
ndarray::Array< U, N+1, D > const & | dest, | ||
PixelOpT const & | pixelOp, | ||
lsst::afw::geom::Point2I const & | xy0 = lsst::afw::geom::Point2I() |
||
) |
expand the first dimension of an array, applying a functor to each pixel
Use this footprint to map 1-D positions in the source to 2-D points in the destination. This forces a deep copy of the relevant parts of the source.
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The size of the outer dimension must match the area of the footprint. |
[out] | dest | array to copy to. The dimensions of the array must be height, width, inner N-1 dimensions of the source. |
[in] | pixelOp | Functor taking src's pixel value, and returning the value of dest |
[in] | xy0 | xy0 of the src array in the footprint's coordinate system |
ndarray::Array<typename boost::remove_const<T>::type, N+1, N+1> lsst::afw::detection::expandArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
lsst::afw::geom::Box2I const & | bbox = lsst::afw::geom::Box2I() |
||
) |
expand the first dimension of an array
Use this footprint to map 1-D positions in the source to 2-D points in the destination. This whose first two dimension are determined by the bounds of this footprint, and whose remaming dimensions are determined by the inner N-1 dimensions of the source. the forces a deep copy of the source
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The size of the outer dimension must match the area of the footprint. |
[in] | bbox | bounding box of the returned array. |
void lsst::afw::detection::flattenArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
ndarray::Array< U, N-1, D > const & | dest, | ||
lsst::afw::geom::Point2I const & | xy0 = lsst::afw::geom::Point2I() |
||
) |
Flatten the first two dimensions of an array.
Use this footprint to map 2-D points in the source to 1-D position in the destination. This forces a deep copy of the relevant parts of the source.
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The first two dimensions are (height, width). |
[out] | dest | array to copy to. The dimensions of the dest must be area of the footprint, inner N-1 dimensions of the source |
[in] | xy0 | xy0 of the src array in the footprint's coordinate system |
For example,
void lsst::afw::detection::flattenArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
ndarray::Array< U, N-1, D > const & | dest, | ||
PixelOpT const & | pixelOp, | ||
lsst::afw::geom::Point2I const & | xy0 = lsst::afw::geom::Point2I() |
||
) |
Flatten the first two dimensions of an array.
Use this footprint to map 2-D points in the source to 1-D position in the destination. This forces a deep copy of the relevant parts of the source.
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The first two dimensions are (height, width). |
[out] | dest | array to copy to. The dimensions of the dest must be area of the footprint, inner N-1 dimensions of the source |
[in] | pixelOp | Functor taking src's pixel value, and returning the value of dest |
[in] | xy0 | xy0 of the src array in the footprint's coordinate system |
For example,
ndarray::Array<typename boost::remove_const<T>::type, N-1, N-1> lsst::afw::detection::flattenArray | ( | Footprint const & | fp, |
ndarray::Array< T, N, C > const & | src, | ||
lsst::afw::geom::Point2I const & | xy0 = lsst::afw::geom::Point2I() |
||
) |
Flatten the first two dimensions of an array Use this footprint to map 2-D points in the source to 1-D locations in the destination. This forces a deep copy of some of the relevant parts of source.
[in] | fp | footprint to operate on |
[in] | src | array to copy from. The first two dimensions are (height, width); the remainder are copied exactly. |
[in] | xy0 | xy0 of the src array in the footprint's coordinate system |
For example,
boost::shared_ptr< Footprint > lsst::afw::detection::footprintAndMask | ( | boost::shared_ptr< Footprint > const & | foot, |
typename image::Mask< MaskT >::Ptr const & | mask, | ||
MaskT const | bitmask | ||
) |
Return a Footprint that's the intersection of a Footprint with a Mask.
The resulting Footprint contains only pixels for which (mask & bitMask) != 0; it may have disjoint pieces
foot: The initial Footprint mask: The mask to & with foot bitmask: Only consider these bits
std::vector<lsst::afw::geom::Box2I> lsst::afw::detection::footprintToBBoxList | ( | Footprint const & | foot | ) |
Return a list of BBoxs, whose union contains exactly the pixels in foot, neither more nor less
Useful in generating sets of meas::algorithms::Defects for the ISR
boost::shared_ptr< Footprint > lsst::afw::detection::growFootprint | ( | Footprint const & | foot, |
int | nGrow, | ||
bool | isotropic = true |
||
) |
Grow a Footprint by nGrow pixels, returning a new Footprint.
boost::shared_ptr< Footprint > lsst::afw::detection::growFootprint | ( | boost::shared_ptr< Footprint > const & | foot, |
int | nGrow, | ||
bool | isotropic = true |
||
) |
boost::shared_ptr< Footprint > lsst::afw::detection::growFootprint | ( | Footprint const & | foot, |
int | nGrow, | ||
bool | left, | ||
bool | right, | ||
bool | up, | ||
bool | down | ||
) |
Grow a Footprint in at least one of the cardinal directions, returning a new Footprint.
Note that any left/right grow is done prior to the up/down grow, so any left/right grown pixels are subject to a further up/down grow (i.e. an initial single pixel Footprint will end up as a square, not a cross.
HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT> lsst::afw::detection::makeHeavyFootprint | ( | Footprint const & | foot, |
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | img, | ||
HeavyFootprintCtrl const * | ctrl = NULL |
||
) |
Create a HeavyFootprint with footprint defined by the given Footprint and pixel values from the given MaskedImage.
Definition at line 139 of file HeavyFootprint.h.
boost::shared_ptr< Footprint > lsst::afw::detection::mergeFootprints | ( | Footprint const & | foot1, |
Footprint const & | foot2 | ||
) |
Merges two Footprints – appends their peaks, and unions their spans, returning a new Footprint.
This const version requires that both input footprints are normalized (and will raise an exception if not).
boost::shared_ptr< Footprint > lsst::afw::detection::mergeFootprints | ( | Footprint & | foot1, |
Footprint & | foot2 | ||
) |
Merges two Footprints – appends their peaks, and unions their spans, returning a new Footprint.
boost::shared_ptr<HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT> > lsst::afw::detection::mergeHeavyFootprints | ( | HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const & | h1, |
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const & | h2 | ||
) |
Sum the two given HeavyFootprints h1 and h2, returning a HeavyFootprint with the union footprint, and summed pixels where they overlap. The peak list is the union of the two inputs.
void lsst::afw::detection::nearestFootprint | ( | std::vector< boost::shared_ptr< Footprint >> const & | foots, |
lsst::afw::image::Image< boost::uint16_t >::Ptr | argmin, | ||
lsst::afw::image::Image< boost::uint16_t >::Ptr | dist | ||
) |
Given a vector of Footprints, fills the output "argmin" and "dist" images to contain the Manhattan distance to the nearest footprint (in "dist") and the identity of the nearest footprint (in "argmin").
For example, if there are two footprints at y=0 covering x=[1,2] and [7,7],
Index : 0 1 2 3 4 5 6 7
Footprints: . 0 0 . . . . 1
Argmin : 0 0 0 0 0 1 1 1
Dist : 1 0 0 1 2 2 1 0
"argmin" gives the index of the nearest footprint, and "dist" its Manhattan (L_1 norm) distance. The pixel at index 4 is closest to footprint 0, and its distance is 2.
std::ostream & lsst::afw::detection::operator<< | ( | std::ostream & | os, |
PeakRecord const & | record | ||
) |
int lsst::afw::detection::resolve_alias | ( | const std::vector< int > & | aliases, |
int | id | ||
) |
Follow a chain of aliases, returning the final resolved value.
ImageT::Pixel lsst::afw::detection::setImageFromFootprint | ( | ImageT * | image, |
Footprint const & | footprint, | ||
typename ImageT::Pixel const | value | ||
) |
Set all image pixels in a Footprint to a given value.
ImageT::Pixel lsst::afw::detection::setImageFromFootprintList | ( | ImageT * | image, |
boost::shared_ptr< std::vector< boost::shared_ptr< Footprint >> const > | footprints, | ||
typename ImageT::Pixel const | value | ||
) |
Set all image pixels in a set of Footprints to a given value.
ImageT::Pixel lsst::afw::detection::setImageFromFootprintList | ( | ImageT * | image, |
std::vector< boost::shared_ptr< Footprint >> const & | footprints, | ||
typename ImageT::Pixel const | value | ||
) |
Set all image pixels in a set of Footprints to a given value.
MaskT lsst::afw::detection::setMaskFromFootprint | ( | lsst::afw::image::Mask< MaskT > * | mask, |
Footprint const & | footprint, | ||
MaskT const | bitmask | ||
) |
OR bitmask into all the Mask's pixels that are in the Footprint.
MaskT lsst::afw::detection::setMaskFromFootprintList | ( | lsst::afw::image::Mask< MaskT > * | mask, |
std::vector< boost::shared_ptr< Footprint >> const & | footprints, | ||
MaskT const | bitmask | ||
) |
OR bitmask into all the Mask's pixels which are in the set of Footprints.
MaskT lsst::afw::detection::setMaskFromFootprintList | ( | lsst::afw::image::Mask< MaskT > * | mask, |
boost::shared_ptr< std::vector< boost::shared_ptr< Footprint >> const > const & | footprints, | ||
MaskT const | bitmask | ||
) |
OR bitmask into all the Mask's pixels which are in the set of Footprints.
boost::shared_ptr< Footprint > lsst::afw::detection::shrinkFootprint | ( | Footprint const & | foot, |
int | nGrow, | ||
bool | isotropic | ||
) |
Shrink a footprint isotropically by nGrow pixels, returning a new Footprint.