24 #include "pybind11/pybind11.h" 40 using PyImportanceSamplerControl =
41 py::class_<ImportanceSamplerControl, std::shared_ptr<ImportanceSamplerControl>>;
42 using PyAdaptiveImportanceSampler =
43 py::class_<AdaptiveImportanceSampler, std::shared_ptr<AdaptiveImportanceSampler>, Sampler>;
46 py::module::import(
"lsst.afw.table");
47 py::module::import(
"lsst.afw.math");
48 py::module::import(
"lsst.meas.modelfit.sampler");
49 py::module::import(
"lsst.meas.modelfit.mixture");
51 PyImportanceSamplerControl clsImportanceSamplerControl(mod,
"ImportanceSamplerControl");
52 clsImportanceSamplerControl.def(py::init<>());
60 PyAdaptiveImportanceSampler clsAdaptiveImportanceSampler(mod,
"AdaptiveImportanceSampler");
63 "sampleSchema"_a,
"rng"_a,
"ctrls"_a,
"doSaveIteration"_a =
false);
65 clsAdaptiveImportanceSampler.def(
"computeNormalizedPerplexity",
66 &AdaptiveImportanceSampler::computeNormalizedPerplexity);
67 clsAdaptiveImportanceSampler.def(
"computeEffectiveSampleSizeFraction",
68 &AdaptiveImportanceSampler::computeEffectiveSampleSizeFraction);
PYBIND11_MODULE(camera, mod)
A base class for image defects.
#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.