LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
|
A class to evaluate image statistics. More...
#include <Statistics.h>
Public Types | |
using | Value = std::pair<double, double> |
The type used to report (value, error) for desired statistics. | |
Public Member Functions | |
template<typename ImageT , typename MaskT , typename VarianceT > | |
Statistics (ImageT const &img, MaskT const &msk, VarianceT const &var, int const flags, StatisticsControl const &sctrl=StatisticsControl()) | |
Constructor for Statistics object. | |
template<typename ImageT , typename MaskT , typename VarianceT , typename WeightT > | |
Statistics (ImageT const &img, MaskT const &msk, VarianceT const &var, WeightT const &weights, int const flags, StatisticsControl const &sctrl=StatisticsControl()) | |
Statistics (Statistics const &)=default | |
Statistics (Statistics &&)=default | |
Statistics & | operator= (Statistics const &)=default |
Statistics & | operator= (Statistics &&)=default |
~Statistics () noexcept=default | |
Value | getResult (Property const prop=NOTHING) const |
Return the value and error in the specified statistic (e.g. | |
double | getError (Property const prop=NOTHING) const |
Return the error in the desired property (if specified in the constructor) | |
double | getValue (Property const prop=NOTHING) const |
Return the value of the desired property (if specified in the constructor) | |
lsst::afw::image::MaskPixel | getOrMask () const noexcept |
template<> | |
Statistics (image::Mask< image::MaskPixel > const &msk, image::Mask< image::MaskPixel > const &msk2, image::Mask< image::MaskPixel > const &var, int const flags, StatisticsControl const &sctrl) | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename Pixel > | |
Statistics | makeStatistics (lsst::afw::image::Image< Pixel > const &img, lsst::afw::image::Mask< image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Handle a watered-down front-end to the constructor (no variance) | |
template<typename ImageT , typename MaskT , typename VarianceT > | |
Statistics | makeStatistics (ImageT const &img, MaskT const &msk, VarianceT const &var, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Handle a straight front-end to the constructor. | |
template<typename Pixel > | |
Statistics | makeStatistics (lsst::afw::image::MaskedImage< Pixel > const &mimg, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Handle MaskedImages, just pass the getImage() and getMask() values right on through. | |
template<typename Pixel > | |
Statistics | makeStatistics (lsst::afw::image::MaskedImage< Pixel > const &mimg, lsst::afw::image::Image< WeightPixel > const &weights, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Handle MaskedImages, just pass the getImage() and getMask() values right on through. | |
Statistics | makeStatistics (lsst::afw::image::Mask< lsst::afw::image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Specialization to handle Masks. | |
template<typename Pixel > | |
Statistics | makeStatistics (lsst::afw::image::Image< Pixel > const &img, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle regular (non-masked) Images. | |
template<typename EntryT > | |
Statistics | makeStatistics (std::vector< EntryT > const &v, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle std::vector<> | |
template<typename EntryT > | |
Statistics | makeStatistics (std::vector< EntryT > const &v, std::vector< WeightPixel > const &vweights, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle std::vector<> | |
template<typename EntryT > | |
Statistics | makeStatistics (lsst::afw::math::MaskedVector< EntryT > const &mv, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle lsst::afw::math::MaskedVector<> | |
template<typename EntryT > | |
Statistics | makeStatistics (lsst::afw::math::MaskedVector< EntryT > const &mv, std::vector< WeightPixel > const &vweights, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle lsst::afw::math::MaskedVector<> | |
A class to evaluate image statistics.
The basic strategy is to construct a Statistics object from an Image and a statement of what we want to know. The desired results can then be returned using Statistics methods. A StatisticsControl object is used to pass parameters. The statistics currently implemented are listed in the enum Properties in Statistics.h.
// sets NumSigclip (3.0), and NumIter (3) for clipping lsst::afw::math::StatisticsControl sctrl(3.0, 3); sctrl.setNumSigmaClip(4.0); // reset number of standard deviations for N-sigma clipping sctrl.setNumIter(5); // reset number of iterations for N-sigma clipping sctrl.setAndMask(0x1); // ignore pixels with these mask bits set sctrl.setNanSafe(true); // check for NaNs & Infs, a bit slower (default=true) lsst::afw::math::Statistics statobj = lsst::afw::math::makeStatistics(*img, afwMath::NPOINT | afwMath::MEAN | afwMath::MEANCLIP, sctrl); double const n = statobj.getValue(lsst::afw::math::NPOINT); std::pair<double, double> const mean = statobj.getResult(lsst::afw::math::MEAN); // Returns (value, error) double const meanError = statobj.getError(lsst::afw::math::MEAN); // just the error
makeStatistics
, rather that the constructor directly so that the compiler could deduce the types – cf. std::make_pair()
Definition at line 222 of file Statistics.h.
using lsst::afw::math::Statistics::Value = std::pair<double, double> |
The type used to report (value, error) for desired statistics.
Definition at line 225 of file Statistics.h.
|
explicit |
Constructor for Statistics object.
img | Image whose properties we want |
msk | Mask to control which pixels are included |
var | Variances corresponding to values in Image |
flags | Describe what we want to calculate |
sctrl | Control how things are calculated |
getValue
etc. Definition at line 788 of file Statistics.cc.
|
explicit |
img | Image whose properties we want |
msk | Mask to control which pixels are included |
var | Variances corresponding to values in Image |
weights | Weights to use corresponding to values in Image |
flags | Describe what we want to calculate |
sctrl | Control how things are calculated |
Definition at line 837 of file Statistics.cc.
|
default |
|
default |
|
defaultnoexcept |
lsst::afw::math::Statistics::Statistics | ( | image::Mask< image::MaskPixel > const & | msk, |
image::Mask< image::MaskPixel > const & | msk2, | ||
image::Mask< image::MaskPixel > const & | var, | ||
int const | flags, | ||
StatisticsControl const & | sctrl ) |
Definition at line 1093 of file Statistics.cc.
Return the error in the desired property (if specified in the constructor)
prop | the afw::math::Property to retrieve. If NOTHING (default) and you only asked for one property in the constructor, that property's error is returned |
Definition at line 1081 of file Statistics.cc.
|
inlinenoexcept |
Definition at line 290 of file Statistics.h.
std::pair< double, double > lsst::afw::math::Statistics::getResult | ( | Property const | prop = NOTHING | ) | const |
Return the value and error in the specified statistic (e.g.
MEAN)
prop | the afw::math::Property to retrieve. If NOTHING (default) and you only asked for one property (and maybe its error) in the constructor, that property is returned |
Definition at line 954 of file Statistics.cc.
Return the value of the desired property (if specified in the constructor)
prop | the afw::math::Property to retrieve. If NOTHING (default) and you only asked for one property in the constructor, that property is returned |
Definition at line 1079 of file Statistics.cc.
|
default |
|
default |
|
related |
Handle a straight front-end to the constructor.
Definition at line 373 of file Statistics.h.
|
related |
The makeStatistics() overload to handle regular (non-masked) Images.
img | Image (or Image) whose properties we want |
flags | Describe what we want to calculate |
sctrl | Control calculation |
Definition at line 427 of file Statistics.h.
|
related |
Handle a watered-down front-end to the constructor (no variance)
Definition at line 361 of file Statistics.h.
|
related |
Specialization to handle Masks.
msk | Image (or MaskedImage) whose properties we want |
flags | Describe what we want to calculate |
sctrl | Control how things are calculated |
Definition at line 1136 of file Statistics.cc.
|
related |
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 383 of file Statistics.h.
|
related |
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 398 of file Statistics.h.
|
related |
The makeStatistics() overload to handle lsst::afw::math::MaskedVector<>
mv | MaskedVector |
flags | Describe what we want to calculate |
sctrl | Control calculation |
Definition at line 510 of file Statistics.h.
|
related |
The makeStatistics() overload to handle lsst::afw::math::MaskedVector<>
mv | MaskedVector |
vweights | weights |
flags | Describe what we want to calculate |
sctrl | Control calculation |
Definition at line 527 of file Statistics.h.
|
related |
The makeStatistics() overload to handle std::vector<>
v | Image (or MaskedImage) whose properties we want |
flags | Describe what we want to calculate |
sctrl | Control calculation |
Definition at line 476 of file Statistics.h.
|
related |
The makeStatistics() overload to handle std::vector<>
v | Image (or MaskedImage) whose properties we want |
vweights | Weights |
flags | Describe what we want to calculate |
sctrl | Control calculation |
Definition at line 491 of file Statistics.h.