25 #ifndef LSST_AFW_MATH_BoundedField_h_INCLUDED 26 #define LSST_AFW_MATH_BoundedField_h_INCLUDED 87 virtual ndarray::Array<double, 1, 1>
evaluate(ndarray::Array<double const, 1>
const&
x,
88 ndarray::Array<double const, 1>
const&
y)
const;
102 virtual double mean()
const;
128 template <
typename T>
146 template <
typename T>
148 int yStep = 1)
const;
164 template <
typename T>
181 template <
typename T>
204 return os << bf.toString() <<
" on " << bf.
getBBox();
222 #endif // !LSST_AFW_MATH_BoundedField_h_INCLUDED
virtual double mean() const
Compute the mean of this function over its bounding-box.
virtual std::shared_ptr< BoundedField > operator*(double const scale) const =0
Return a scaled BoundedField.
def scale(algorithm, min, max=None, frame=None)
void multiplyImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Multiply an image by the field in-place.
A base class for objects that can be persisted via afw::table::io Archive classes.
BoundedField & operator=(BoundedField const &)=delete
BoundedField(BoundedField const &)=default
A base class for image defects.
lsst::geom::Box2I getBBox() const
Return the bounding box that defines the region where the field is valid.
virtual bool operator==(BoundedField const &rhs) const =0
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal...
double evaluate(double x, double y) const
Evaluate the field at the given point.
void fillImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Assign the field to an image, overwriting values already present.
BoundedField(lsst::geom::Box2I const &bbox)
~BoundedField() override=default
friend std::ostream & operator<<(std::ostream &os, BoundedField const &bf)
An abstract base class for 2-d functions defined on an integer bounding boxes.
void divideImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Divide an image by the field in-place.
virtual double evaluate(lsst::geom::Point2D const &position) const =0
Evaluate the field at the given point.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
void addToImage(image::Image< T > &image, double scaleBy=1.0, bool overlapOnly=false, int xStep=1, int yStep=1) const
Add the field or a constant multiple of it to an image in-place.
A CRTP facade class for subclasses of Persistable.
An integer coordinate rectangle.
A class to represent a 2-dimensional array of pixels.
std::shared_ptr< BoundedField > operator/(double scale) const
bool operator!=(BoundedField const &rhs) const
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal...
virtual double integrate() const
Compute the integral of this function over its bounding-box.