23 #include <pybind11/pybind11.h> 
   24 #include <pybind11/stl.h> 
   29 using namespace pybind11::literals;
 
   35 template <
typename Pixel>
 
   37     mod.def(
"makeStatistics",
 
   44     mod.def(
"makeStatistics",
 
   48     mod.def(
"makeStatistics",
 
   58 template <
typename Pixel>
 
   70     py::enum_<Property>(mod, 
"Property", py::arithmetic())
 
   93     py::class_<StatisticsControl, std::shared_ptr<StatisticsControl>> clsStatisticsControl(
 
   94             mod, 
"StatisticsControl");
 
   96     py::enum_<StatisticsControl::WeightsBoolean>(clsStatisticsControl, 
"WeightsBoolean")
 
   97             .value(
"WEIGHTS_FALSE", StatisticsControl::WeightsBoolean::WEIGHTS_FALSE)
 
   98             .value(
"WEIGHTS_TRUE", StatisticsControl::WeightsBoolean::WEIGHTS_TRUE)
 
   99             .value(
"WEIGHTS_NONE", StatisticsControl::WeightsBoolean::WEIGHTS_NONE)
 
  104                              "numSigmaClip"_a = 3.0, 
"numIter"_a = 3, 
"andMask"_a = 0x0, 
"isNanSafe"_a = 
true,
 
  105                              "useWeights"_a = StatisticsControl::WEIGHTS_NONE);
 
  107     clsStatisticsControl.def(
"getMaskPropagationThreshold", &StatisticsControl::getMaskPropagationThreshold);
 
  108     clsStatisticsControl.def(
"setMaskPropagationThreshold", &StatisticsControl::setMaskPropagationThreshold);
 
  109     clsStatisticsControl.def(
"getNumSigmaClip", &StatisticsControl::getNumSigmaClip);
 
  110     clsStatisticsControl.def(
"getNumIter", &StatisticsControl::getNumIter);
 
  111     clsStatisticsControl.def(
"getAndMask", &StatisticsControl::getAndMask);
 
  112     clsStatisticsControl.def(
"getNoGoodPixelsMask", &StatisticsControl::getNoGoodPixelsMask);
 
  113     clsStatisticsControl.def(
"getNanSafe", &StatisticsControl::getNanSafe);
 
  114     clsStatisticsControl.def(
"getWeighted", &StatisticsControl::getWeighted);
 
  115     clsStatisticsControl.def(
"getWeightedIsSet", &StatisticsControl::getWeightedIsSet);
 
  116     clsStatisticsControl.def(
"getCalcErrorFromInputVariance",
 
  117                              &StatisticsControl::getCalcErrorFromInputVariance);
 
  118     clsStatisticsControl.def(
"setNumSigmaClip", &StatisticsControl::setNumSigmaClip);
 
  119     clsStatisticsControl.def(
"setNumIter", &StatisticsControl::setNumIter);
 
  120     clsStatisticsControl.def(
"setAndMask", &StatisticsControl::setAndMask);
 
  121     clsStatisticsControl.def(
"setNoGoodPixelsMask", &StatisticsControl::setNoGoodPixelsMask);
 
  122     clsStatisticsControl.def(
"setNanSafe", &StatisticsControl::setNanSafe);
 
  123     clsStatisticsControl.def(
"setWeighted", &StatisticsControl::setWeighted);
 
  124     clsStatisticsControl.def(
"setCalcErrorFromInputVariance",
 
  125                              &StatisticsControl::setCalcErrorFromInputVariance);
 
  127     py::class_<Statistics> clsStatistics(mod, 
"Statistics");
 
  129     clsStatistics.def(
"getResult", &Statistics::getResult, 
"prop"_a = 
Property::NOTHING);
 
  130     clsStatistics.def(
"getError", &Statistics::getError, 
"prop"_a = 
Property::NOTHING);
 
  131     clsStatistics.def(
"getValue", &Statistics::getValue, 
"prop"_a = 
Property::NOTHING);
 
  132     clsStatistics.def(
"getOrMask", &Statistics::getOrMask);
 
  134     declareStatistics<unsigned short>(mod);
 
  135     declareStatistics<double>(mod);
 
  136     declareStatistics<float>(mod);
 
  137     declareStatistics<int>(mod);
 
  142     declareStatisticsVectorOverloads<unsigned short>(mod);
 
  143     declareStatisticsVectorOverloads<double>(mod);
 
  144     declareStatisticsVectorOverloads<float>(mod);
 
  145     declareStatisticsVectorOverloads<int>(mod);