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;
table::Key< std::string > name
Implementation of the Photometric Calibration class.
table::Key< table::Array< std::uint8_t > > wcs
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
The photometric calibration of an exposure.
Base class for all records.
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
Key< T > getX() const noexcept
Return the underlying x Key.
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
Key< T > getY() const noexcept
Return the underlying y Key.
Defines the fields and offsets for a table.
A mapping between the keys of two Schemas, used to copy data between them.
Record class that contains measurements made on a single exposure.
A proxy type for name lookups in a Schema.
A coordinate class intended to represent absolute positions.
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...
A FunctorKey for CentroidResult.
bool operator==(CentroidResultKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Keys.
afw::table::CovarianceMatrixKey< ErrElement, 2 > getCentroidErr() const
Return a FunctorKey to just the uncertainty matrix.
virtual void set(afw::table::BaseRecord &record, CentroidResult const &value) const
Set a CentroidResult in the given record.
bool operator!=(CentroidResultKey const &other) const
afw::table::Key< CentroidElement > getY() const
Return a Key for the y coordinate.
CentroidResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
afw::table::Key< CentroidElement > getX() const
Return a Key for the x coordinate.
afw::table::PointKey< CentroidElement > getCentroid() const
Return a FunctorKey to just the centroid value.
virtual CentroidResult get(afw::table::BaseRecord const &record) const
Get a CentroidResult from the given record.
bool isValid() const
Return True if the centroid key is valid.
CentroidResultKey(afw::table::PointKey< CentroidElement > const ¢roid, afw::table::CovarianceMatrixKey< ErrElement, 2 > const ¢roidErr)
Construct from a pair of Keys.
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.
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
UnitVector3d centroid(VertexIterator const begin, VertexIterator const end)
A base class for image defects.
A reusable struct for centroid measurements.
CentroidElement y
y (row) coordinate of the measured position
Centroid const getCentroid() const
Return a Point object containing the measured x and y.
CentroidElement x
x (column) coordinate of the measured position
void setCentroidErr(CentroidCov const &matrix)
Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x,...
CentroidResult(CentroidElement x_, CentroidElement y_, CentroidCov const &matrix)
Constructor; initializes everything from values.
CentroidCov const getCentroidErr() const
Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)
void setCentroid(Centroid const ¢roid)
Set the struct fields from the given Point object.
ErrElement yErr
standard deviation of y
CentroidResult()
Constructor; initializes everything to NaN.
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
CentroidResult(CentroidElement x_, CentroidElement y_, ErrElement xErr_, ErrElement yErr_)
Constructor; initializes everything from values.
ErrElement xErr
standard deviation of x
geom::Point< CentroidElement > getPoint()
Return the 2D point type corresponding to this result.