LSST Applications  21.0.0+c4f5df5339,21.0.0+e70536a077,21.0.0-1-ga51b5d4+7c60f8a6ea,21.0.0-10-gcf60f90+74aa0801fd,21.0.0-12-g63909ac9+643a1044a5,21.0.0-15-gedb9d5423+1041c3824f,21.0.0-2-g103fe59+a356b2badb,21.0.0-2-g1367e85+6d3f3f41db,21.0.0-2-g45278ab+e70536a077,21.0.0-2-g5242d73+6d3f3f41db,21.0.0-2-g7f82c8f+8d7c04eab9,21.0.0-2-g8f08a60+9c9a9cfcc8,21.0.0-2-ga326454+8d7c04eab9,21.0.0-2-gde069b7+bedfc5e1fb,21.0.0-2-gecfae73+6cb6558258,21.0.0-2-gfc62afb+6d3f3f41db,21.0.0-3-g21c7a62+f6e98b25aa,21.0.0-3-g357aad2+bd62456bea,21.0.0-3-g4be5c26+6d3f3f41db,21.0.0-3-g65f322c+03a4076c01,21.0.0-3-g7d9da8d+c4f5df5339,21.0.0-3-gaa929c8+c6b98066dc,21.0.0-3-gc44e71e+a26d5c1aea,21.0.0-3-ge02ed75+04b527a9d5,21.0.0-35-g64f566ff+b27e5ef93e,21.0.0-4-g591bb35+04b527a9d5,21.0.0-4-g88306b8+8773047b2e,21.0.0-4-gc004bbf+80a0b7acb7,21.0.0-4-gccdca77+a5c54364a0,21.0.0-4-ge8fba5a+ccfc328107,21.0.0-5-gdf36809+87b8d260e6,21.0.0-6-g00874e7+7eeda2b6ba,21.0.0-6-g2d4f3f3+e70536a077,21.0.0-6-g4e60332+04b527a9d5,21.0.0-6-g5ef7dad+f53629abd8,21.0.0-7-gc8ca178+b63e69433b,21.0.0-8-gfbe0b4b+c6b98066dc,w.2021.06
LSST Data Management Base Package
Typedefs | Functions
chebyshevBoundedField.cc File Reference
#include <pybind11/pybind11.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>
#include "ndarray/pybind11.h"
#include "lsst/pex/config/python.h"
#include "lsst/afw/table/io/python.h"
#include "lsst/afw/table/io/Persistable.h"
#include "lsst/afw/math/BoundedField.h"
#include "lsst/afw/math/ChebyshevBoundedField.h"

Go to the source code of this file.

Typedefs

using ClsField = py::class_< ChebyshevBoundedField, std::shared_ptr< ChebyshevBoundedField >, BoundedField >
 

Functions

template<typename PixelT >
void declareTemplates (ClsField &cls)
 
 PYBIND11_MODULE (chebyshevBoundedField, mod)
 

Typedef Documentation

◆ ClsField

Definition at line 40 of file chebyshevBoundedField.cc.

Function Documentation

◆ declareTemplates()

template<typename PixelT >
void declareTemplates ( ClsField cls)

Definition at line 44 of file chebyshevBoundedField.cc.

44  {
47  ChebyshevBoundedField::fit);
48 }
A class to represent a 2-dimensional array of pixels.
Definition: Image.h:58
A control object used when fitting ChebyshevBoundedField to data (see ChebyshevBoundedField::fit)

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( chebyshevBoundedField  ,
mod   
)

Definition at line 50 of file chebyshevBoundedField.cc.

50  {
51  /* Module level */
52  py::class_<ChebyshevBoundedFieldControl> clsChebyshevBoundedFieldControl(mod,
53  "ChebyshevBoundedFieldControl");
54  ClsField clsChebyshevBoundedField(mod, "ChebyshevBoundedField");
55 
56  /* Member types and enums */
58 
59  /* Constructors */
60  clsChebyshevBoundedFieldControl.def(py::init<>());
61  clsChebyshevBoundedField.def(
62  py::init<lsst::geom::Box2I const &, ndarray::Array<double const, 2, 2> const &>());
63 
64  /* Operators are defined only in the BoundedField base class;
65  we let Python inheritance provide them here. */
66 
67  /* Members */
68  LSST_DECLARE_CONTROL_FIELD(clsChebyshevBoundedFieldControl, ChebyshevBoundedFieldControl, orderX);
69  LSST_DECLARE_CONTROL_FIELD(clsChebyshevBoundedFieldControl, ChebyshevBoundedFieldControl, orderY);
70  LSST_DECLARE_CONTROL_FIELD(clsChebyshevBoundedFieldControl, ChebyshevBoundedFieldControl, triangular);
71 
72  clsChebyshevBoundedFieldControl.def("computeSize", &ChebyshevBoundedFieldControl::computeSize);
73 
74  clsChebyshevBoundedField.def("getCoefficients", &ChebyshevBoundedField::getCoefficients);
75  clsChebyshevBoundedField.def_static(
77  lsst::geom::Box2I const &, ndarray::Array<double const, 1> const &,
78  ndarray::Array<double const, 1> const &, ndarray::Array<double const, 1> const &,
79  Control const &)) &
80  ChebyshevBoundedField::fit);
81  clsChebyshevBoundedField.def_static(
83  lsst::geom::Box2I const &, ndarray::Array<double const, 1> const &,
84  ndarray::Array<double const, 1> const &, ndarray::Array<double const, 1> const &,
85  ndarray::Array<double const, 1> const &, Control const &)) &
86  ChebyshevBoundedField::fit);
87 
88  clsChebyshevBoundedField.def("truncate", &ChebyshevBoundedField::truncate);
89 
90  // Pybind11 resolves overloads by picking the first one that might work
91  declareTemplates<double>(clsChebyshevBoundedField);
92  declareTemplates<float>(clsChebyshevBoundedField);
93 }
An integer coordinate rectangle.
Definition: Box.h:55
Extent< int, N > truncate(Extent< double, N > const &input) noexcept
Return the component-wise truncation (round towards zero).
Definition: Extent.cc:100
int computeSize(int order)
Return the size of the coefficient vector for the given order.
Definition: constants.h:97
def init()
Definition: tests.py:59
#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.
Definition: python.h:50
py::class_< ChebyshevBoundedField, std::shared_ptr< ChebyshevBoundedField >, BoundedField > ClsField
table::Key< int > orderX