23 #include "pybind11/pybind11.h"
24 #include "pybind11/stl.h"
29 namespace py = pybind11;
30 using namespace pybind11::literals;
36 void declareAssociations(py::module &mod) {
37 py::class_<Associations, std::shared_ptr<Associations>> cls(mod,
"Associations");
38 cls.def(py::init<>());
41 cls.def(
"refStarListSize", &Associations::refStarListSize);
42 cls.def(
"fittedStarListSize", &Associations::fittedStarListSize);
43 cls.def(
"associateCatalogs", &Associations::associateCatalogs,
"matchCutInArcsec"_a = 0,
44 "useFittedList"_a =
false,
"enlargeFittedList"_a =
true);
45 cls.def(
"collectRefStars", &Associations::collectRefStars);
46 cls.def(
"deprojectFittedStars", &Associations::deprojectFittedStars);
47 cls.def(
"nCcdImagesValidForFit", &Associations::nCcdImagesValidForFit);
49 cls.def(
"addImage", &Associations::addImage);
50 cls.def(
"selectFittedStars", &Associations::selectFittedStars);
52 cls.def(
"getCcdImageList", &Associations::getCcdImageList, py::return_value_policy::reference_internal);
53 cls.def_property_readonly(
"ccdImageList", &Associations::getCcdImageList,
54 py::return_value_policy::reference_internal);
56 cls.def(
"getRaDecBBox", &Associations::getRaDecBBox);
57 cls.def_property_readonly(
"raDecBBox", &Associations::getRaDecBBox);
59 cls.def(
"getCommonTangentPoint", &Associations::getCommonTangentPoint);
60 cls.def(
"setCommonTangentPoint", &Associations::setCommonTangentPoint);
61 cls.def_property(
"commonTangentPoint", &Associations::getCommonTangentPoint,
62 &Associations::setCommonTangentPoint);
65 PYBIND11_PLUGIN(associations) {
66 py::module::import(
"lsst.jointcal.ccdImage");
67 py::module mod(
"associations");
69 declareAssociations(mod);