24 #ifndef LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED 25 #define LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED 62 xxSigma(
std::sqrt(matrix(0, 0))),
63 yySigma(
std::sqrt(matrix(1, 1))),
64 xySigma(
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)) {}
135 : _shape(shape), _shapeErr(shapeErr) {}
157 return _shape == other._shape && _shapeErr == other._shapeErr;
163 bool isValid()
const {
return _shape.isValid() && _shapeErr.isValid(); }
211 #endif // !LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED
Eigen::Matrix< ErrElement, 3, 3, Eigen::DontAlign > ShapeCov
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
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
afw::table::Schema schema
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.
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
ShapeTrMatrix makeShapeTransformMatrix(geom::LinearTransform const &xform)
Construct a matrix suitable for transforming second moments.
ItemVariant const * other
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
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 uncertainty 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()
Constructor; initializes everything to NaN.
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.
ShapeResult(ShapeElement xx_, ShapeElement yy_, ShapeElement xy_, ErrElement xxSigma_, ErrElement yySigma_, ErrElement xySigma_)
Constructor; initializes everything from values.
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
void setShape(Shape const &shape)
Set struct elements from the given Quadrupole object.
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)