25 #include "pybind11/pybind11.h" 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);
PYBIND11_MODULE(camera, mod)
FitResults minimize(lsst::afw::math::Function1< ReturnT > const &function, std::vector< double > const &initialParameterList, std::vector< double > const &stepSizeList, std::vector< double > const &measurementList, std::vector< double > const &varianceList, std::vector< double > const &xPositionList, double errorDef)
Find the minimum of a function(x)
A base class for image defects.
double computeChi2(const StarMatchList &L, const AstrometryTransform &transform)
the actual chi2