24 #ifndef LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED 25 #define LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED 55 xErr(
std::sqrt(matrix(0, 0))),
56 yErr(
std::sqrt(matrix(1, 1))),
57 x_y_Cov(matrix(0, 1)) {}
61 : x(x_), y(y_), xErr(xErr_), yErr(yErr_), x_y_Cov(0.0) {}
110 : _centroid(centroid), _centroidErr(centroidErr) {}
132 return _centroid == other._centroid && _centroidErr == other._centroidErr;
138 bool isValid()
const {
return _centroid.isValid() && _centroidErr.isValid(); }
209 double maxDistFromPeak = -1.0);
218 bool _doFootprintCheck;
219 double _maxDistFromPeak;
229 #endif // !LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED
ErrElement yErr
standard deviation of y
Centroid const getCentroid() const
Return a Point object containing the measured x and y.
geom::Point< CentroidElement > getPoint()
Return the 2D point type corresponding to this result.
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
afw::table::PointKey< CentroidElement > getCentroid() const
Return a FunctorKey to just the centroid value.
A reusable struct for centroid measurements.
bool isValid() const
Return True if the centroid key is valid.
CentroidResult(CentroidElement x_, CentroidElement y_, CentroidCov const &matrix)
Constructor; initializes everything from values.
ErrElement xErr
standard deviation of x
afw::table::CovarianceMatrixKey< ErrElement, 2 > getCentroidErr() const
Return a FunctorKey to just the uncertainty matrix.
CentroidElement x
x (column) coordinate of the measured position
afw::table::Key< CentroidElement > getY() const
Return a Key for the y coordinate.
ItemVariant const * other
void setCentroid(Centroid const ¢roid)
Set the struct fields from the given Point object.
bool operator!=(CentroidResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
CentroidResultKey(afw::table::PointKey< CentroidElement > const ¢roid, afw::table::CovarianceMatrixKey< ErrElement, 2 > const ¢roidErr)
Construct from a pair of Keys.
CentroidResult()
Constructor; initializes everything to NaN.
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
table::Key< table::Array< std::uint8_t > > wcs
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
afw::table::Key< CentroidElement > getX() const
Return a Key for the x coordinate.
CentroidResult(CentroidElement x_, CentroidElement y_, ErrElement xErr_, ErrElement yErr_)
Constructor; initializes everything from values.
A FunctorKey for CentroidResult.
CentroidElement y
y (row) coordinate of the measured position
CentroidResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
CentroidCov const getCentroidErr() const
Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)
void setCentroidErr(CentroidCov const &matrix)
Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x...