24 #ifndef LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED 25 #define LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED 62 xxErr(
std::sqrt(matrix(0, 0))),
63 yyErr(
std::sqrt(matrix(1, 1))),
64 xyErr(
std::sqrt(matrix(2, 2))),
65 xx_yy_Cov(matrix(0, 1)),
66 xx_xy_Cov(matrix(0, 2)),
67 yy_xy_Cov(matrix(1, 2)) {}
136 : _shape(shape), _shapeErr(shapeErr) {}
158 return _shape == other._shape && _shapeErr == other._shapeErr;
164 bool isValid()
const {
return _shape.isValid() && _shapeErr.isValid(); }
212 #endif // !LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED An ellipse core with quadrupole moments as parameters.
Defines the fields and offsets for a table.
Eigen::Matrix< ErrElement, 3, 3, Eigen::DontAlign > ShapeCov
A proxy type for name lookups in a Schema.
ShapeResultKey(afw::table::QuadrupoleKey const &shape, afw::table::CovarianceMatrixKey< ErrElement, 3 > const &shapeErr)
Construct from a pair of Keys.
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ShapeElement xy
image or model second moment for xy^2
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
ErrElement xxErr
standard deviation of xx
Shape const getShape() const
Return an afw::geom::ellipses object corresponding to xx, yy, xy.
ShapeResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
afw::geom::ellipses::Quadrupole getQuadrupole()
afw::table::Key< ShapeElement > getIyy() const
Return a Key for the yy moment.
ShapeTrMatrix makeShapeTransformMatrix(geom::LinearTransform const &xform)
Construct a matrix suitable for transforming second moments.
ShapeElement xx
image or model second moment for x^2
A FunctorKey for ShapeResult.
afw::table::Key< ShapeElement > getIxx() const
Return a Key for the xx moment.
bool operator!=(ShapeResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
void setShapeErr(ShapeCov const &matrix)
Set the struct standard deviation elements from the given matrix, with rows and columns ordered (xx...
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
A reusable struct for moments-based shape measurements.
ShapeResult(ShapeElement xx_, ShapeElement yy_, ShapeElement xy_, ErrElement xxErr_, ErrElement yyErr_, ErrElement xyErr_)
Constructor; initializes everything from values.
A base class for image defects.
ShapeResult()
Constructor; initializes everything to NaN.
ErrElement xyErr
standard deviation of xy
Eigen::Matrix< ShapeElement, 3, 3, Eigen::DontAlign > ShapeTrMatrix
ShapeResult(ShapeElement xx_, ShapeElement yy_, ShapeElement xy_, ShapeCov const &matrix)
Constructor; initializes everything from values.
bool isValid() const
Return True if the shape key is valid.
afw::table::CovarianceMatrixKey< ErrElement, 3 > getShapeErr() const
Return a FunctorKey to just the uncertainty matrix.
CoordinateType
Enum used to set units for geometric FunctorKeys.
ShapeElement yy
image or model second moment for y^2
Base class for all records.
A class used as a handle to a particular field in a table.
ItemVariant const * other
ErrElement yyErr
standard deviation of yy
void setShape(Shape const &shape)
Set struct elements from the given Quadrupole object.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
afw::table::Key< ShapeElement > getIxy() const
Return a Key for the xy moment.
afw::table::QuadrupoleKey getShape() const
Return a FunctorKey to just the shape value.
ShapeCov const getShapeErr() const
Return the 3x3 symmetric covariance matrix, with rows and columns ordered (xx, yy, xy)