24 #ifndef LSST_AFW_MATH_ChebyshevBoundedField_h_INCLUDED 25 #define LSST_AFW_MATH_ChebyshevBoundedField_h_INCLUDED 29 #include "lsst/pex/config.h" 42 LSST_CONTROL_FIELD(
orderX,
int,
"maximum Chebyshev function order in x");
44 LSST_CONTROL_FIELD(
orderY,
int,
"maximum Chebyshev function order in y");
47 "if true, only include terms where the sum of the x and y order " 48 "is less than or equal to max(orderX, orderY)");
116 ndarray::Array<double const, 2, 2>
const&
coefficients);
128 static std::shared_ptr<ChebyshevBoundedField> fit(
afw::geom::Box2I const& bbox,
129 ndarray::Array<double const,1>
const &
x,
130 ndarray::Array<double const,1>
const & y,
131 ndarray::Array<double const,1>
const & z,
132 Control
const& ctrl);
146 static std::shared_ptr<ChebyshevBoundedField> fit(
afw::geom::Box2I const& bbox,
147 ndarray::Array<double const,1>
const &
x,
148 ndarray::Array<double const,1>
const & y,
149 ndarray::Array<double const,1>
const & z,
150 ndarray::Array<double const,1>
const & w,
151 Control
const& ctrl);
166 template <
typename T>
167 static std::shared_ptr<ChebyshevBoundedField> fit(
image::Image<T> const&
image, Control
const& ctrl);
177 std::shared_ptr<ChebyshevBoundedField>
truncate(Control
const& ctrl)
const;
185 std::shared_ptr<ChebyshevBoundedField> relocate(
geom::Box2I const& bbox)
const;
188 virtual double evaluate(
geom::Point2D const & position)
const;
196 virtual double mean()
const;
202 virtual std::shared_ptr<BoundedField>
operator*(
double const scale)
const;
208 virtual std::string getPersistenceName()
const;
210 virtual std::string getPythonModule()
const;
220 ndarray::Array<double const,2,2> _coefficients;
222 virtual std::string toString()
const;
228 #endif // !LSST_AFW_MATH_ChebyshevBoundedField_h_INCLUDED Extent< int, N > truncate(Extent< double, N > const &input)
Return the component-wise truncation (round towards zero).
An object passed to Persistable::write to allow it to persist itself.
virtual double evaluate(geom::Point2D const &position) const =0
Evaluate the field at the given point.
def scale(algorithm, min, max=None, frame=None)
A control object used when fitting ChebyshevBoundedField to data (see ChebyshevBoundedField::fit) ...
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
ndarray::Array< double const, 2, 2 > getCoefficients() const
Return the coefficient matrix.
An integer coordinate rectangle.
int computeSize() const
Return the number of nonzero coefficients in the Chebyshev function defined by this object...
ChebyshevBoundedFieldControl Control
int orderY
"maximum Chebyshev function order in y" ;
A base class for image defects.
virtual bool isPersistable() const
ChebyshevBoundedField is always persistable.
bool triangular
"if true, only include terms where the sum of the x and y order " "is less than or equal to max(order...
A BoundedField based on 2-d Chebyshev polynomials of the first kind.
std::shared_ptr< BoundedField > operator*(double const scale, std::shared_ptr< BoundedField const > bf)
ChebyshevBoundedFieldControl()
An abstract base class for 2-d functions defined on an integer bounding boxes.
ndarray::Array< double const, 2, 2 > coefficients
A CRTP facade class for subclasses of Persistable.
A class to represent a 2-dimensional array of pixels.
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.
int orderX
"maximum Chebyshev function order in x" ;