25 #include "pybind11/pybind11.h"
36 using namespace pybind11::literals;
43 py::class_<FitterBase, std::shared_ptr<FitterBase>>
cls(mod,
"FitterBase");
46 "doLineSearch"_a =
false,
"dumpMatrixFile"_a =
"");
48 cls.def(
"saveChi2Contributions", &FitterBase::saveChi2Contributions);
52 py::class_<AstrometryFit, std::shared_ptr<AstrometryFit>, FitterBase>
cls(mod,
"AstrometryFit");
55 "associations"_a,
"astrometryModel"_a,
"posError"_a);
57 cls.def(
"getModel", &AstrometryFit::getModel, py::return_value_policy::reference_internal);
61 py::class_<PhotometryFit, std::shared_ptr<PhotometryFit>, FitterBase>
cls(mod,
"PhotometryFit");
66 cls.def(
"getModel", &PhotometryFit::getModel, py::return_value_policy::reference_internal);
70 py::module::import(
"lsst.jointcal.associations");
71 py::module::import(
"lsst.jointcal.astrometryModels");
72 py::module::import(
"lsst.jointcal.chi2");
73 py::module::import(
"lsst.jointcal.photometryModels");
74 py::enum_<MinimizeResult>(mod,
"MinimizeResult")
75 .value(
"Converged", MinimizeResult::Converged)
76 .value(
"Chi2Increased", MinimizeResult::Chi2Increased)
77 .value(
"NonFinite", MinimizeResult::NonFinite)
78 .value(
"Failed", MinimizeResult::Failed);
80 declareFitterBase(mod);
81 declareAstrometryFit(mod);
82 declarePhotometryFit(mod);