lsst.meas.base
20.0.0-3-g750bffe+e05f822de9
|
Go to the documentation of this file.
24 #ifndef LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED
25 #define LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED
110 : _centroid(centroid), _centroidErr(centroidErr) {}
132 return _centroid ==
other._centroid && _centroidErr ==
other._centroidErr;
214 double maxDistFromPeak = -1.0);
225 bool _doFootprintCheck;
226 double _maxDistFromPeak;
239 #endif // !LSST_MEAS_BASE_CentroidUtilities_h_INCLUDED
void setCentroidErr(CentroidCov const &matrix)
Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x,...
Key< T > getX() const noexcept
virtual void set(afw::table::BaseRecord &record, CentroidResult const &value) const
Set a CentroidResult in the given record.
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
geom::Point< CentroidElement > getPoint()
Return the 2D point type corresponding to this result.
afw::table::PointKey< CentroidElement > getCentroid() const
Return a FunctorKey to just the centroid value.
table::Key< table::Array< std::uint8_t > > wcs
void setCentroid(Centroid const ¢roid)
Set the struct fields from the given Point object.
CentroidResult(CentroidElement x_, CentroidElement y_, CentroidCov const &matrix)
Constructor; initializes everything from values.
A FunctorKey for CentroidResult.
afw::table::CovarianceMatrixKey< ErrElement, 2 > getCentroidErr() const
Return a FunctorKey to just the uncertainty matrix.
CentroidElement x
x (column) coordinate of the measured position
A reusable struct for centroid measurements.
CentroidResult()
Constructor; initializes everything to NaN.
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
static CentroidResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc, UncertaintyEnum uncertainty)
Add the appropriate fields to a Schema, and return a CentroidResultKey that manages them.
virtual CentroidResult get(afw::table::BaseRecord const &record) const
Get a CentroidResult from the given record.
ErrElement xErr
standard deviation of x
bool isValid() const noexcept
bool isValid() const noexcept
CentroidChecker(afw::table::Schema &schema, std::string const &name, bool inside=true, double maxDistFromPeak=-1.0)
Check source record produced by a centroid algorithm called "name".
bool operator()(afw::table::SourceRecord &record) const
Set the centroid to the first footprint if the centroid is either more than _dist pixels from the foo...
ItemVariant const * other
bool operator!=(CentroidResultKey const &other) const
bool isValid() const
Return True if the centroid key is valid.
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
CentroidElement y
y (row) coordinate of the measured position
CentroidCov const getCentroidErr() const
Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)
afw::table::Key< CentroidElement > getX() const
Return a Key for the x coordinate.
CentroidResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
CentroidResultKey(afw::table::PointKey< CentroidElement > const ¢roid, afw::table::CovarianceMatrixKey< ErrElement, 2 > const ¢roidErr)
Construct from a pair of Keys.
CentroidResult(CentroidElement x_, CentroidElement y_, ErrElement xErr_, ErrElement yErr_)
Constructor; initializes everything from values.
Centroid const getCentroid() const
Return a Point object containing the measured x and y.
afw::table::Key< CentroidElement > getY() const
Return a Key for the y coordinate.
ErrElement yErr
standard deviation of y
bool operator==(CentroidResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
Key< T > getY() const noexcept