24 #ifndef LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED
25 #define LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED
30 namespace lsst {
namespace meas {
namespace base {
59 xxSigma(std::sqrt(matrix(0, 0))),
60 yySigma(std::sqrt(matrix(1, 1))),
61 xySigma(std::sqrt(matrix(2, 2))),
131 std::string
const &
name,
132 std::string
const & doc,
220 #endif // !LSST_MEAS_BASE_ShapeUtilities_h_INCLUDED
Key< double > getIxy() const
Return a constituent Key.
An ellipse core with quadrupole moments as parameters.
Defines the fields and offsets for a table.
afw::table::Key< ShapeElement > getIxx() const
Return a Key for the xx moment.
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.
ShapeTrMatrix makeShapeTransformMatrix(afw::geom::LinearTransform const &xform)
Construct a matrix suitable for transforming second moments.
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
table::Key< std::string > name
ShapeResult(ShapeElement _xx, ShapeElement _yy, ShapeElement _xy, ErrElement _xxSigma, ErrElement _yySigma, ErrElement _xySigma)
Constructor; initializes everything from values.
Eigen::Matrix< ErrElement, 3, 3, Eigen::DontAlign > ShapeCov
afw::table::CovarianceMatrixKey< ErrElement, 3 > getShapeErr() const
Return a FunctorKey to just the uncertainty matrix.
Key< double > getIyy() const
Return a constituent Key.
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
afw::table::Key< ShapeElement > getIyy() const
Return a Key for the yy moment.
afw::table::Schema schema
ShapeResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
bool isValid() const
Return True if all the constituent Keys are valid.
afw::geom::ellipses::Quadrupole getQuadrupole()
Key< double > getIxx() const
Return a constituent Key.
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
Shape const getShape() const
Return an afw::geom::ellipses object corresponding to xx, yy, xy.
A FunctorKey for ShapeResult.
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.
virtual void set(afw::table::BaseRecord &record, ShapeResult const &value) const
Set a ShapeResult in the given record.
bool operator!=(ShapeResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
afw::table::QuadrupoleKey _shape
ShapeResult()
Constructor; initializes everything to NaN.
bool isValid() const
Return True if the shape key is valid.
ShapeResult(ShapeElement _xx, ShapeElement _yy, ShapeElement _xy, ShapeCov const &matrix)
Constructor; initializes everything from values.
afw::table::QuadrupoleKey getShape() const
Return a FunctorKey to just the shape value.
Base class for all records.
A class used as a handle to a particular field in a table.
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
bool isValid() const
Return True if all the constituent sigma Keys are valid.
bool operator==(ShapeResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
void setShape(Shape const &shape)
Set struct elements from the given Quadrupole object.
Eigen::Matrix< ShapeElement, 3, 3, Eigen::DontAlign > ShapeTrMatrix
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
ShapeCov const getShapeErr() const
Return the 3x3 symmetric covariance matrix, with rows and columns ordered (xx, yy, xy)
afw::table::CovarianceMatrixKey< ErrElement, 3 > _shapeErr
afw::table::Key< ShapeElement > getIxy() const
Return a Key for the xy moment.
static ShapeResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc, UncertaintyEnum uncertainty, afw::table::CoordinateType coordType=afw::table::CoordinateType::PIXEL)
Add the appropriate fields to a Schema, and return a ShapeResultKey that manages them.