24 #include "pybind11/pybind11.h" 25 #include "pybind11/stl.h" 27 #include "ndarray/pybind11.h" 40 using PyUnitTransformedLikelihoodControl =
41 py::class_<UnitTransformedLikelihoodControl, std::shared_ptr<UnitTransformedLikelihoodControl>>;
43 using PyEpochFootprint = py::class_<EpochFootprint, std::shared_ptr<EpochFootprint>>;
45 using PyUnitTransformedLikelihood =
46 py::class_<UnitTransformedLikelihood, std::shared_ptr<UnitTransformedLikelihood>, Likelihood>;
49 py::module::import(
"lsst.afw.geom.ellipses");
50 py::module::import(
"lsst.afw.detection");
51 py::module::import(
"lsst.afw.image");
52 py::module::import(
"lsst.meas.modelfit.model");
53 py::module::import(
"lsst.meas.modelfit.likelihood");
54 py::module::import(
"lsst.meas.modelfit.unitSystem");
56 PyUnitTransformedLikelihoodControl clsControl(mod,
"UnitTransformedLikelihoodControl");
59 clsControl.def(py::init<bool>(),
"usePixelWeights"_a =
false);
61 PyEpochFootprint clsEpochFootprint(mod,
"EpochFootprint");
63 shapelet::MultiShapeletFunction
const &>(),
64 "footprint"_a,
"exposure"_a,
"psf"_a);
65 clsEpochFootprint.def_readonly(
"footprint", &EpochFootprint::footprint);
66 clsEpochFootprint.def_readonly(
"exposure", &EpochFootprint::exposure);
69 PyUnitTransformedLikelihood clsUnitTransformedLikelihood(mod,
"UnitTransformedLikelihood");
70 clsUnitTransformedLikelihood.def(
74 UnitTransformedLikelihoodControl
const &>(),
75 "model"_a,
"fixed"_a,
"fitSys"_a,
"position"_a,
"exposure"_a,
"footprint"_a,
"psf"_a,
"ctrl"_a);
76 clsUnitTransformedLikelihood.def(
79 UnitTransformedLikelihoodControl
const &>(),
80 "model"_a,
"fixed"_a,
"fitSys"_a,
"position"_a,
"epochFootprintList"_a,
"ctrl"_a);
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.
lsst::afw::detection::Footprint Footprint
lsst::geom::SpherePoint SpherePoint