26 #include <pybind11/pybind11.h>
37 using namespace pybind11::literals;
55 [](
auto& mod,
auto&
cls) {
56 table::io::python::addPersistableMethods<Psf>(cls);
58 cls.def(
"clone", &Psf::clone);
59 cls.def(
"resized", &Psf::resized,
"width"_a,
"height"_a);
60 cls.def(
"computeImage", &Psf::computeImage,
"position"_a = NullPoint,
61 "color"_a = image::Color(),
"owner"_a = Psf::ImageOwnerEnum::COPY);
62 cls.def(
"computeKernelImage", &Psf::computeKernelImage,
"position"_a = NullPoint,
63 "color"_a = image::Color(),
"owner"_a = Psf::ImageOwnerEnum::COPY);
64 cls.def(
"computePeak", &Psf::computePeak,
"position"_a = NullPoint,
65 "color"_a = image::Color());
66 cls.def(
"computeApertureFlux", &Psf::computeApertureFlux,
"radius"_a,
67 "position"_a = NullPoint,
"color"_a = image::Color());
68 cls.def(
"computeShape", &Psf::computeShape,
"position"_a = NullPoint,
69 "color"_a = image::Color());
70 cls.def(
"computeBBox", &Psf::computeBBox,
"position"_a = NullPoint,
71 "color"_a = image::Color());
72 cls.def(
"getLocalKernel", &Psf::getLocalKernel,
"position"_a = NullPoint,
73 "color"_a = image::Color());
74 cls.def(
"getAverageColor", &Psf::getAverageColor);
75 cls.def(
"getAveragePosition", &Psf::getAveragePosition);
76 cls.def_static(
"recenterKernelImage", &Psf::recenterKernelImage,
"im"_a,
"position"_a,
77 "warpAlgorithm"_a =
"lanczos5",
"warpBuffer"_a = 5);
78 cls.def(
"getCacheCapacity", &Psf::getCacheCapacity);
79 cls.def(
"setCacheCapacity", &Psf::setCacheCapacity);
82 wrappers.
wrapType(py::enum_<Psf::ImageOwnerEnum>(clsPsf,
"ImageOwnerEnum"), [](
auto& mod,
auto& enm) {
83 enm.value(
"COPY", Psf::ImageOwnerEnum::COPY);
84 enm.value(
"INTERNAL", Psf::ImageOwnerEnum::INTERNAL);