|
LSST Applications g00d0e8bbd7+edbf708997,g03191d30f7+9ce8016dbd,g1955dfad08+0bd186d245,g199a45376c+5137f08352,g1fd858c14a+a888a50aa2,g262e1987ae+45f9aba685,g29ae962dfc+1c7d47a24f,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3fd5ace14f+eed17d2c67,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+c4107e45b5,g67b6fd64d1+6dc8069a4c,g74acd417e5+f452e9c21a,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+2025e9ce17,g7cc15d900a+2d158402f9,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d4809ba88+c4107e45b5,g8d7436a09f+e96c132b44,g8ea07a8fe4+db21c37724,g98df359435+aae6d409c1,ga2180abaac+edbf708997,gac66b60396+966efe6077,gb632fb1845+88945a90f8,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gca7fc764a6+6dc8069a4c,gd7ef33dd92+6dc8069a4c,gda68eeecaf+7d1e613a8d,gdab6d2f7ff+f452e9c21a,gdbb4c4dda9+c4107e45b5,ge410e46f29+6dc8069a4c,ge41e95a9f2+c4107e45b5,geaed405ab2+e194be0d2b,w.2025.47
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 1099 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 1087 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 960 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 1085 of file Statistics.cc.
|
default |
|
default |
|
Handle a straight front-end to the constructor.
Definition at line 373 of file Statistics.h.
|
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.
|
Handle a watered-down front-end to the constructor (no variance)
Definition at line 361 of file Statistics.h.
|
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 1142 of file Statistics.cc.
|
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 383 of file Statistics.h.
|
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 398 of file Statistics.h.
|
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.
|
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.
|
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.
|
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.