35 py::module::import(
"lsst.afw.geom");
36 py::module::import(
"lsst.afw.image");
38 py::class_<ShapeletFunction, std::shared_ptr<ShapeletFunction>> clsShapeletFunction(mod,
41 clsShapeletFunction.def_readonly_static(
"FLUX_FACTOR", &ShapeletFunction::FLUX_FACTOR);
43 clsShapeletFunction.def(py::init<int, BasisTypeEnum>(),
"order"_a,
"basisType"_a);
44 clsShapeletFunction.def(
py::init<
int,
BasisTypeEnum, ndarray::Array<double, 1, 1>
const &>(),
"order"_a,
45 "basisType"_a,
"coefficients"_a);
46 clsShapeletFunction.def(py::init<int, BasisTypeEnum, double, afw::geom::Point2D const &>(),
"order"_a,
49 ndarray::Array<double, 1, 1>
const &>(),
50 "order"_a,
"basisType"_a,
"radius"_a,
"center"_a,
"coefficients"_a);
51 clsShapeletFunction.def(py::init<int, BasisTypeEnum, afw::geom::ellipses::Ellipse const &>(),
"order"_a,
52 "basisType"_a,
"ellipse"_a);
54 ndarray::Array<double const, 1, 1>
const &>(),
55 "order"_a,
"basisType"_a,
"ellipse"_a,
"coefficients"_a);
56 clsShapeletFunction.def(py::init<ShapeletFunction>());
58 clsShapeletFunction.def(
"getOrder", &ShapeletFunction::getOrder);
59 clsShapeletFunction.def(
"getEllipse", (afw::geom::ellipses::Ellipse & (ShapeletFunction::*)()) &
61 py::return_value_policy::reference_internal);
62 clsShapeletFunction.def(
"setEllipse", &ShapeletFunction::setEllipse);
63 clsShapeletFunction.def(
"getBasisType", &ShapeletFunction::getBasisType);
64 clsShapeletFunction.def(
"changeBasisType", &ShapeletFunction::changeBasisType);
65 clsShapeletFunction.def(
"normalize", &ShapeletFunction::normalize,
"value"_a = 1.0);
66 clsShapeletFunction.def(
"getCoefficients", (ndarray::Array<double, 1, 1>
const (ShapeletFunction::*)()) &
67 ShapeletFunction::getCoefficients);
69 clsShapeletFunction.def(
"evaluate", &ShapeletFunction::evaluate);
70 clsShapeletFunction.def(
"shiftInPlace", &ShapeletFunction::shiftInPlace);
71 clsShapeletFunction.def(
"transformInPlace", &ShapeletFunction::transformInPlace);
73 py::class_<ShapeletFunctionEvaluator, std::shared_ptr<ShapeletFunctionEvaluator>>
74 clsShapeletFunctionEvaluator(mod,
"ShapeletFunctionEvaluator");
76 clsShapeletFunctionEvaluator.def(py::init<ShapeletFunction const &>(),
"function"_a);
78 clsShapeletFunctionEvaluator.def(
"__call__",
79 (
double (ShapeletFunctionEvaluator::*)(
double,
double)
const) &
80 ShapeletFunctionEvaluator::operator());
81 clsShapeletFunctionEvaluator.def(
82 "__call__", (
double (ShapeletFunctionEvaluator::*)(
afw::geom::Point2D const &)
const) &
83 ShapeletFunctionEvaluator::operator());
84 clsShapeletFunctionEvaluator.def(
86 ShapeletFunctionEvaluator::operator());
87 clsShapeletFunctionEvaluator.def(
"__call__", (ndarray::Array<double, 1, 1> (ShapeletFunctionEvaluator::*)(
88 ndarray::Array<double const, 1>
const &,
89 ndarray::Array<double const, 1>
const &)
const) &
90 ShapeletFunctionEvaluator::operator());
92 clsShapeletFunctionEvaluator.def(
93 "addToImage", (
void (ShapeletFunctionEvaluator::*)(ndarray::Array<double, 2, 1>
const &,
97 clsShapeletFunctionEvaluator.def(
98 "addToImage", (
void (ShapeletFunctionEvaluator::*)(afw::image::Image<double> &)
const) &
99 ShapeletFunctionEvaluator::addToImage,
102 clsShapeletFunctionEvaluator.def(
"computeMoments", &ShapeletFunctionEvaluator::computeMoments);
103 clsShapeletFunctionEvaluator.def(
"update", &ShapeletFunctionEvaluator::update);
Point< double, 2 > Point2D
BasisTypeEnum
An enum that sets whether to use real-valued polar shapelets or Cartesian shapelets.
void convolve(OutImageT &convolvedImage, InImageT const &inImage, KernelT const &kernel, ConvolutionControl const &convolutionControl=ConvolutionControl())
Convolve an Image or MaskedImage with a Kernel, setting pixels of an existing output image...
void addToImage(boost::shared_ptr< afw::image::Image< double > > image, std::vector< boost::shared_ptr< afw::image::Image< double > >> const &imgVector, std::vector< double > const &weightVector)
Extent< double, 2 > Extent2D
UnaryFunctionT::result_type integrate(UnaryFunctionT func, typename UnaryFunctionT::argument_type const a, typename UnaryFunctionT::argument_type const b, double eps=1.0e-6)
The 1D integrator.