39 {
40 using PyContext = py::class_<Context>;
41
42 wrappers.
wrapType(PyContext(wrappers.module,
"Context"), [](
auto &mod,
auto &clsContext) {
43
44 clsContext.attr("KEEPHIDDEN") = py::cast(static_cast<int>(Context::KEEPHIDDEN));
45 clsContext.attr("REMOVEHIDDEN") = py::cast(static_cast<int>(Context::REMOVEHIDDEN));
46
47 clsContext.def(
48 py::init<std::vector<std::string> const &, std::vector<int> const &, std::vector<int> const &, bool>(),
49 "names"_a, "group"_a, "degree"_a, "pcexflag"_a);
50
51 clsContext.def("getName", &Context::getName);
52 clsContext.def("getNpc", &Context::getNpc);
53 clsContext.def("getPcflag", &Context::getPcflag);
54 clsContext.def("getPc", &Context::getPc);
55 });
56
57 using PySample = py::class_<Sample>;
58 wrappers.
wrapType(PySample(wrappers.module,
"Sample"), [](
auto &mod,
auto &clsSample) {
59
60 clsSample.def("getCatindex", &Sample::getCatindex);
61 clsSample.def("setCatindex", &Sample::setCatindex);
62 clsSample.def("getObjindex", &Sample::getObjindex);
63 clsSample.def("setObjindex", &Sample::setObjindex);
64 clsSample.def("getExtindex", &Sample::getExtindex);
65 clsSample.def("setExtindex", &Sample::setExtindex);
66 clsSample.def("setVig", &Sample::setVig);
67 clsSample.def("setNorm", &Sample::setNorm);
68 clsSample.def("setBacknoise2", &Sample::setBacknoise2);
69 clsSample.def("setGain", &Sample::setGain);
70 clsSample.def("setX", &Sample::setX);
71 clsSample.def("setY", &Sample::setY);
72 clsSample.def("setContext", &Sample::setContext);
73 clsSample.def("setFluxrad", &Sample::setFluxrad);
74 clsSample.def("getVig", &Sample::getVig);
75 clsSample.def("getVigResi", &Sample::getVigResi);
76 clsSample.def("getVigChi", &Sample::getVigChi);
77 clsSample.def("getVigWeight", &Sample::getVigWeight);
78 clsSample.def("getXY", &Sample::getXY);
79 clsSample.def("getNorm", &Sample::getNorm);
80 });
81
82 using PySet = py::class_<Set, std::shared_ptr<Set>>;
83 wrappers.
wrapType(PySet(wrappers.module,
"Set"), [](
auto &mod,
auto &clsSet) {
84 clsSet.def(py::init<Context &>());
85
86 clsSet.def("newSample", &Set::newSample);
87 clsSet.def("trimMemory", &Set::trimMemory);
88 clsSet.def("getFwhm", &Set::getFwhm);
89 clsSet.def("setFwhm", &Set::setFwhm);
90 clsSet.def("getNcontext", &Set::getNcontext);
91 clsSet.def("getNsample", &Set::getNsample);
92 clsSet.def("getContextOffset", &Set::getContextOffset);
93 clsSet.def("setContextOffset", &Set::setContextOffset);
94 clsSet.def("getContextScale", &Set::getContextScale);
95 clsSet.def("setContextScale", &Set::setContextScale);
96 clsSet.def("getRecentroid", &Set::getRecentroid);
97 clsSet.def("setRecentroid", &Set::setRecentroid);
98 clsSet.def("setVigSize", &Set::setVigSize);
99 clsSet.def("finiSample", &Set::finiSample);
100 clsSet.def("empty", &Set::empty);
101 clsSet.def("getContextNames", &Set::getContextNames);
102 clsSet.def("setContextname", &Set::setContextname);
103 clsSet.def("setBadFlags", &Set::setBadFlags);
104 clsSet.def("getBadFlags", &Set::getBadFlags);
105 clsSet.def("setBadSN", &Set::setBadSN);
106 clsSet.def("getBadSN", &Set::getBadSN);
107 clsSet.def("setBadFrmin", &Set::setBadFrmin);
108 clsSet.def("getBadFrmin", &Set::getBadFrmin);
109 clsSet.def("setBadFrmax", &Set::setBadFrmax);
110 clsSet.def("getBadFrmax", &Set::getBadFrmax);
111 clsSet.def("setBadElong", &Set::setBadElong);
112 clsSet.def("getBadElong", &Set::getBadElong);
113 clsSet.def("setBadPix", &Set::setBadPix);
114 clsSet.def("getBadPix", &Set::getBadPix);
115 clsSet.def("getSample", &Set::getSample);
116 });
117
118 using PyPsf = py::class_<Psf>;
119 wrappers.
wrapType(PyPsf(wrappers.module,
"Psf"), [](
auto &mod,
auto &clsPsf) {
120 clsPsf.def(py::init<>());
121
122 clsPsf.def("getLoc", &Psf::getLoc);
123 clsPsf.def("getResi", &Psf::getResi);
124 clsPsf.def("build", &Psf::build,
125 "x"_a, "y"_a, "other"_a = std::vector<double>());
126 clsPsf.def("clip", &Psf::clip);
127 });
128}