Pass parameters to a Statistics object.
More...
#include <Statistics.h>
Pass parameters to a Statistics object.
A class to pass parameters which control how the stats are calculated.
Definition at line 93 of file Statistics.h.
◆ WeightsBoolean
Enumerator |
---|
WEIGHTS_FALSE | |
WEIGHTS_TRUE | |
WEIGHTS_NONE | |
Definition at line 95 of file Statistics.h.
◆ StatisticsControl()
- Parameters
-
numSigmaClip | number of standard deviations to clip at |
numIter | Number of iterations |
andMask | and-Mask: defines which mask bits cause a value to be ignored |
isNanSafe | flag NaNs & Infs |
useWeights | use weighted statistics (via a vector or an inverse variance) |
Definition at line 97 of file Statistics.h.
105 : _numSigmaClip(numSigmaClip),
108 _noGoodPixelsMask(0x0),
109 _isNanSafe(isNanSafe),
110 _useWeights(useWeights),
111 _calcErrorFromInputVariance(
false),
112 _maskPropagationThresholds() {
119 assert(_numSigmaClip > 0);
120 assert(_numIter > 0);
◆ getAndMask()
int lsst::afw::math::StatisticsControl::getAndMask |
( |
| ) |
const |
|
inlinenoexcept |
◆ getCalcErrorFromInputVariance()
bool lsst::afw::math::StatisticsControl::getCalcErrorFromInputVariance |
( |
| ) |
const |
|
inlinenoexcept |
Definition at line 140 of file Statistics.h.
140 {
return _calcErrorFromInputVariance; }
◆ getMaskPropagationThreshold()
double lsst::afw::math::StatisticsControl::getMaskPropagationThreshold |
( |
int |
bit | ) |
const |
When pixels with the given bit are rejected, we count what fraction the rejected pixels would have contributed (including the weights, if any) if those pixels had not been rejected, and set that bit in the return value of Statistics::getOrMask() if it exceeds the given threshold.
Definition at line 727 of file Statistics.cc.
728 int oldSize = _maskPropagationThresholds.
size();
732 return _maskPropagationThresholds[bit];
◆ getNanSafe()
bool lsst::afw::math::StatisticsControl::getNanSafe |
( |
| ) |
const |
|
inlinenoexcept |
◆ getNoGoodPixelsMask()
int lsst::afw::math::StatisticsControl::getNoGoodPixelsMask |
( |
| ) |
const |
|
inlinenoexcept |
Definition at line 136 of file Statistics.h.
136 {
return _noGoodPixelsMask; }
◆ getNumIter()
int lsst::afw::math::StatisticsControl::getNumIter |
( |
| ) |
const |
|
inlinenoexcept |
◆ getNumSigmaClip()
double lsst::afw::math::StatisticsControl::getNumSigmaClip |
( |
| ) |
const |
|
inlinenoexcept |
◆ getWeighted()
bool lsst::afw::math::StatisticsControl::getWeighted |
( |
| ) |
const |
|
inlinenoexcept |
◆ getWeightedIsSet()
bool lsst::afw::math::StatisticsControl::getWeightedIsSet |
( |
| ) |
const |
|
inlinenoexcept |
◆ setAndMask()
void lsst::afw::math::StatisticsControl::setAndMask |
( |
int |
andMask | ) |
|
|
inline |
◆ setCalcErrorFromInputVariance()
void lsst::afw::math::StatisticsControl::setCalcErrorFromInputVariance |
( |
bool |
calcErrorFromInputVariance | ) |
|
|
inlinenoexcept |
Definition at line 154 of file Statistics.h.
155 _calcErrorFromInputVariance = calcErrorFromInputVariance;
◆ setMaskPropagationThreshold()
void lsst::afw::math::StatisticsControl::setMaskPropagationThreshold |
( |
int |
bit, |
|
|
double |
threshold |
|
) |
| |
Definition at line 735 of file Statistics.cc.
736 int oldSize = _maskPropagationThresholds.
size();
737 if (oldSize <= bit) {
738 int newSize = bit + 1;
739 _maskPropagationThresholds.
resize(newSize);
740 for (
int i = oldSize; i < bit; ++i) {
741 _maskPropagationThresholds[i] = 1.0;
744 _maskPropagationThresholds[bit] = threshold;
◆ setNanSafe()
void lsst::afw::math::StatisticsControl::setNanSafe |
( |
bool |
isNanSafe | ) |
|
|
inlinenoexcept |
Definition at line 152 of file Statistics.h.
152 { _isNanSafe = isNanSafe; }
◆ setNoGoodPixelsMask()
void lsst::afw::math::StatisticsControl::setNoGoodPixelsMask |
( |
int |
noGoodPixelsMask | ) |
|
|
inline |
Definition at line 151 of file Statistics.h.
151 { _noGoodPixelsMask = noGoodPixelsMask; }
◆ setNumIter()
void lsst::afw::math::StatisticsControl::setNumIter |
( |
int |
numIter | ) |
|
|
inline |
◆ setNumSigmaClip()
void lsst::afw::math::StatisticsControl::setNumSigmaClip |
( |
double |
numSigmaClip | ) |
|
|
inline |
Definition at line 142 of file Statistics.h.
143 assert(numSigmaClip > 0);
144 _numSigmaClip = numSigmaClip;
◆ setWeighted()
void lsst::afw::math::StatisticsControl::setWeighted |
( |
bool |
useWeights | ) |
|
|
inlinenoexcept |
◆ Statistics
The documentation for this class was generated from the following files:
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/afw/20.0.0/include/lsst/afw/math/Statistics.h
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/afw/20.0.0/src/math/Statistics.cc