|
LSST Applications g00d0e8bbd7+8c5ae1fdc5,g013ef56533+603670b062,g083dd6704c+2e189452a7,g199a45376c+0ba108daf9,g1c5cce2383+bc9f6103a4,g1fd858c14a+cd69ed4fc1,g210f2d0738+c4742f2e9e,g262e1987ae+612fa42d85,g29ae962dfc+83d129e820,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+5eaa884f2a,g47891489e3+e32160a944,g53246c7159+8c5ae1fdc5,g5b326b94bb+dcc56af22d,g64539dfbff+c4742f2e9e,g67b6fd64d1+e32160a944,g74acd417e5+c122e1277d,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g88cb488625+47d24e4084,g89139ef638+e32160a944,g8d7436a09f+d14b4ff40a,g8ea07a8fe4+b212507b11,g90f42f885a+e1755607f3,g97be763408+34be90ab8c,g98df359435+ec1fa61bf1,ga2180abaac+8c5ae1fdc5,ga9e74d7ce9+43ac651df0,gbf99507273+8c5ae1fdc5,gc2a301910b+c4742f2e9e,gca7fc764a6+e32160a944,gd7ef33dd92+e32160a944,gdab6d2f7ff+c122e1277d,gdb1e2cdc75+1b18322db8,ge410e46f29+e32160a944,ge41e95a9f2+c4742f2e9e,geaed405ab2+0d91c11c6d,w.2025.44
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.