25 #include "pybind11/pybind11.h"
26 #include "pybind11/eigen.h"
33 using namespace pybind11::literals;
39 void declareAstrometryMapping(
py::module &mod) {
40 py::class_<AstrometryMapping, std::shared_ptr<AstrometryMapping>>
cls(mod,
"AstrometryMapping");
42 cls.def(
"getNpar", &AstrometryMapping::getNpar);
45 self.transformPosAndErrors(inPos, outPos);
50 void declareChipVisitAstrometryMapping(
py::module &mod) {
51 py::class_<ChipVisitAstrometryMapping, std::shared_ptr<ChipVisitAstrometryMapping>, AstrometryMapping>
52 cls(mod,
"ChipVisitAstrometryMapping");
54 cls.def(
"getTransform1", &ChipVisitAstrometryMapping::getTransform1,
55 py::return_value_policy::reference_internal);
56 cls.def_property_readonly(
"transform1", &ChipVisitAstrometryMapping::getTransform1,
57 py::return_value_policy::reference_internal);
59 cls.def(
"getTransform2", &ChipVisitAstrometryMapping::getTransform2,
60 py::return_value_policy::reference_internal);
61 cls.def_property_readonly(
"transform2", &ChipVisitAstrometryMapping::getTransform2,
62 py::return_value_policy::reference_internal);
65 void declareSimpleAstrometryMapping(
py::module &mod) {
66 py::class_<SimpleAstrometryMapping, std::shared_ptr<SimpleAstrometryMapping>, AstrometryMapping>
cls(
67 mod,
"SimpleAstrometryMapping");
68 cls.def(
"getToBeFit", &SimpleAstrometryMapping::getToBeFit);
69 cls.def(
"setToBeFit", &SimpleAstrometryMapping::setToBeFit);
70 cls.def(
"getTransform", &SimpleAstrometryMapping::getTransform,
71 py::return_value_policy::reference_internal);
74 void declareSimplePolyMapping(
py::module &mod) {
75 py::class_<SimplePolyMapping, std::shared_ptr<SimplePolyMapping>, SimpleAstrometryMapping>
cls(
76 mod,
"SimplePolyMapping");
80 py::module::import(
"lsst.jointcal.star");
81 py::module::import(
"lsst.jointcal.astrometryTransform");
82 declareAstrometryMapping(mod);
83 declareChipVisitAstrometryMapping(mod);
84 declareSimpleAstrometryMapping(mod);
85 declareSimplePolyMapping(mod);