24 #include "pybind11/pybind11.h"
33 using namespace pybind11::literals;
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);