LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
#include <Statistics.h>
Public Types | |
typedef std::pair< double, double > | Value |
The type used to report (value, error) for desired statistics. More... | |
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. More... | |
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()) | |
Value | getResult (Property const prop=NOTHING) const |
Return the value and error in the specified statistic (e.g. MEAN) More... | |
double | getError (Property const prop=NOTHING) const |
Return the error in the desired property (if specified in the constructor) More... | |
double | getValue (Property const prop=NOTHING) const |
Return the value of the desired property (if specified in the constructor) More... | |
lsst::afw::image::MaskPixel | getOrMask () const |
template<> | |
Statistics (afwImage::Mask< afwImage::MaskPixel > const &msk, afwImage::Mask< afwImage::MaskPixel > const &, afwImage::Mask< afwImage::MaskPixel > const &, int const flags, StatisticsControl const &sctrl) | |
Private Member Functions | |
template<typename ImageT , typename MaskT , typename VarianceT , typename WeightT > | |
void | doStatistics (ImageT const &img, MaskT const &msk, VarianceT const &var, WeightT const &weights, int const flags, StatisticsControl const &sctrl) |
Private Attributes | |
long | _flags |
int | _n |
Value | _mean |
Value | _variance |
double | _min |
double | _max |
double | _sum |
Value | _meanclip |
Value | _varianceclip |
Value | _median |
double | _iqrange |
lsst::afw::image::MaskPixel | _allPixelOrMask |
StatisticsControl | _sctrl |
bool | _weightsAreMultiplicative |
Related Functions | |
(Note that these are not member functions.) | |
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) More... | |
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. More... | |
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. More... | |
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. More... | |
Statistics | makeStatistics (lsst::afw::image::Mask< lsst::afw::image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
Front end for specialization to handle Masks. More... | |
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. More... | |
template<typename EntryT > | |
Statistics | makeStatistics (std::vector< EntryT > const &v, int const flags, StatisticsControl const &sctrl=StatisticsControl()) |
The makeStatistics() overload to handle std::vector<> More... | |
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<> More... | |
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<> More... | |
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<> More... | |
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.
makeStatistics
, rather that the constructor directly so that the compiler could deduce the types – cf. std::make_pair
)Definition at line 212 of file Statistics.h.
typedef std::pair<double, double> lsst.afw.math::Statistics::Value |
The type used to report (value, error) for desired statistics.
Definition at line 215 of file Statistics.h.
|
explicit |
Constructor for Statistics object.
getValue
etc. 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 |
Definition at line 746 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 769 of file Statistics.cc.
lsst.afw.math::Statistics::Statistics | ( | afwImage::Mask< afwImage::MaskPixel > const & | msk, |
afwImage::Mask< afwImage::MaskPixel > const & | , | ||
afwImage::Mask< afwImage::MaskPixel > const & | , | ||
int const | flags, | ||
StatisticsControl const & | sctrl | ||
) |
msk | Mask whose properties we want |
flags | Describe what we want to calculate |
sctrl | Control how things are calculated |
Definition at line 1040 of file Statistics.cc.
|
private |
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 793 of file Statistics.cc.
double lsst.afw.math::Statistics::getError | ( | afwMath::Property const | prop = NOTHING | ) | const |
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 1020 of file Statistics.cc.
|
inline |
Definition at line 236 of file Statistics.h.
std::pair< double, double > lsst.afw.math::Statistics::getResult | ( | afwMath::Property const | iProp = NOTHING | ) | const |
Return the value and error in the specified statistic (e.g. MEAN)
iProp | 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 887 of file Statistics.cc.
double lsst.afw.math::Statistics::getValue | ( | afwMath::Property const | prop = NOTHING | ) | const |
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 1009 of file Statistics.cc.
|
related |
Handle a watered-down front-end to the constructor (no variance)
Definition at line 304 of file Statistics.h.
|
related |
Handle a straight front-end to the constructor.
Definition at line 319 of file Statistics.h.
|
related |
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 333 of file Statistics.h.
|
related |
Handle MaskedImages, just pass the getImage() and getMask() values right on through.
Definition at line 352 of file Statistics.h.
|
related |
Front end for specialization to handle Masks.
Definition at line 1082 of file Statistics.cc.
|
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 384 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 431 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 446 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 465 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 482 of file Statistics.h.
|
private |
Definition at line 253 of file Statistics.h.
|
private |
Definition at line 241 of file Statistics.h.
|
private |
Definition at line 252 of file Statistics.h.
|
private |
Definition at line 247 of file Statistics.h.
|
private |
Definition at line 244 of file Statistics.h.
|
private |
Definition at line 249 of file Statistics.h.
|
private |
Definition at line 251 of file Statistics.h.
|
private |
Definition at line 246 of file Statistics.h.
|
private |
Definition at line 243 of file Statistics.h.
|
private |
Definition at line 255 of file Statistics.h.
|
private |
Definition at line 248 of file Statistics.h.
|
private |
Definition at line 245 of file Statistics.h.
|
private |
Definition at line 250 of file Statistics.h.
|
private |
Definition at line 256 of file Statistics.h.