22 #include "pybind11/pybind11.h" 
   23 #include "pybind11/stl.h" 
   33 using namespace pybind11::literals;
 
   48 template <
typename PixelT>
 
   51             mod, (
"ImageStatistics" + suffix).c_str());
 
   53     cls.def(py::init<daf::base::PropertySet const &>(), 
"ps"_a);
 
   55     cls.def(
"reset", &ImageStatistics<PixelT>::reset);
 
   56     cls.def(
"apply", (
void (ImageStatistics<PixelT>::*)(afw::image::MaskedImage<PixelT> 
const &)) &
 
   57                              ImageStatistics<PixelT>::apply,
 
   59     cls.def(
"apply", (
void (ImageStatistics<PixelT>::*)(afw::image::MaskedImage<PixelT> 
const &, 
int)) &
 
   60                              ImageStatistics<PixelT>::apply,
 
   62     cls.def(
"setBpMask", &ImageStatistics<PixelT>::setBpMask, 
"bpMask"_a);
 
   63     cls.def(
"getBpMask", &ImageStatistics<PixelT>::getBpMask);
 
   64     cls.def(
"getMean", &ImageStatistics<PixelT>::getMean);
 
   65     cls.def(
"getVariance", &ImageStatistics<PixelT>::getVariance);
 
   66     cls.def(
"getRms", &ImageStatistics<PixelT>::getRms);
 
   67     cls.def(
"getNpix", &ImageStatistics<PixelT>::getNpix);
 
   68     cls.def(
"evaluateQuality", &ImageStatistics<PixelT>::evaluateQuality, 
"ps"_a);
 
   74     py::module::import(
"lsst.daf.base");
 
   75     py::module::import(
"lsst.afw.image");
 
   77     declareImageStatistics<int>(mod, 
"I");
 
   78     declareImageStatistics<float>(mod, 
"F");
 
   79     declareImageStatistics<double>(mod, 
"D");