25 #include "pybind11/pybind11.h"
26 #include "pybind11/eigen.h"
27 #include "pybind11/stl.h"
28 #include "ndarray/pybind11.h"
29 #include "ndarray/eigen.h"
41 using namespace pybind11::literals;
48 py::class_<AstrometryModel, std::shared_ptr<AstrometryModel>>
cls(mod,
"AstrometryModel");
50 cls.def(
"getNpar", &AstrometryModel::getNpar);
51 cls.def(
"getMapping", &AstrometryModel::getMapping, py::return_value_policy::reference_internal);
52 cls.def(
"assignIndices", &AstrometryModel::assignIndices);
53 cls.def(
"offsetParams", &AstrometryModel::offsetParams);
54 cls.def(
"getSkyToTangentPlane", &AstrometryModel::getSkyToTangentPlane);
56 cls.def(
"getTotalParameters", &AstrometryModel::getTotalParameters);
59 cls.def(
"__str__", [](AstrometryModel
const &
self) {
return "AstrometryModel"; });
62 void declareSimpleAstrometryModel(
py::module &mod) {
63 py::class_<SimpleAstrometryModel, std::shared_ptr<SimpleAstrometryModel>, AstrometryModel>
cls(
64 mod,
"SimpleAstrometryModel");
68 "ccdImageList"_a,
"projectionHandler"_a,
"initFromWcs"_a,
"nNotFit"_a = 0,
"order"_a = 3);
70 cls.def(
"getTransform", &SimpleAstrometryModel::getTransform,
71 py::return_value_policy::reference_internal);
72 cls.def(
"__str__", [](SimpleAstrometryModel
const &
self) {
return "SimpleAstrometryModel"; });
75 void declareConstrainedAstrometryModel(
py::module &mod) {
76 py::class_<ConstrainedAstrometryModel, std::shared_ptr<ConstrainedAstrometryModel>, AstrometryModel>
cls(
77 mod,
"ConstrainedAstrometryModel");
80 "ccdImageList"_a,
"projectionHandler"_a,
"chipOrder"_a,
"visitOrder"_a);
82 cls.def(
"getChipTransform", &ConstrainedAstrometryModel::getChipTransform,
83 py::return_value_policy::reference_internal);
84 cls.def(
"getVisitTransform", &ConstrainedAstrometryModel::getVisitTransform,
85 py::return_value_policy::reference_internal);
86 cls.def(
"__str__", [](ConstrainedAstrometryModel
const &
self) {
return "ConstrainedAstrometryModel"; });
90 py::module::import(
"lsst.jointcal.ccdImage");
91 py::module::import(
"lsst.jointcal.astrometryTransform");
92 py::module::import(
"lsst.jointcal.astrometryMappings");
93 declareAstrometryModel(mod);
94 declareSimpleAstrometryModel(mod);
95 declareConstrainedAstrometryModel(mod);