26 namespace lsst {
namespace meas {
namespace base {
31 xSigma(std::numeric_limits<
ErrElement>::quiet_NaN()),
32 ySigma(std::numeric_limits<
ErrElement>::quiet_NaN()),
33 x_y_Cov(std::numeric_limits<
ErrElement>::quiet_NaN())
52 xSigma = std::sqrt(matrix(0, 0));
53 ySigma = std::sqrt(matrix(1, 1));
59 std::string
const & name,
60 std::string
const & doc,
71 std::vector< afw::table::Key<ErrElement> >
sigma(2);
72 std::vector< afw::table::Key<ErrElement> > cov;
74 schema.
join(name,
"xSigma"),
"1-sigma uncertainty on x position",
"pixels"
77 schema.
join(name,
"ySigma"),
"1-sigma uncertainty on y position",
"pixels"
82 schema.
join(name,
"x_y_Cov"),
"uncertainty covariance in x and y",
"pixels^2"
93 std::vector<std::string> getNameVector() {
94 std::vector<std::string> v;
105 static std::vector<std::string> names = getNameVector();
108 }
catch (pex::exceptions::NotFoundError &) {}
Defines the fields and offsets for a table.
A proxy type for name lookups in a Schema.
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
A reusable struct for centroid measurements.
Centroid const getCentroid() const
Return a Point object containing the measured x and y.
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
The full covariance matrix is provided.
CentroidElement x
x (column) coordinate of the measured position
void setCentroid(Centroid const ¢roid)
Set the struct fields from the given Point object.
Key< T > addField(Field< T > const &field, bool doReplace=false)
Add a new field to the Schema, and return the associated Key.
A coordinate class intended to represent absolute positions.
afw::table::Key< double > sigma
CentroidResult()
Constructor; initializes everything to NaN.
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
virtual CentroidResult get(afw::table::BaseRecord const &record) const
Get a CentroidResult from the given record.
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 void set(afw::table::BaseRecord &record, CentroidResult const &value) const
Set a CentroidResult in the given record.
Base class for all records.
std::string join(std::string const &a, std::string const &b) const
Join strings using the field delimiter appropriate for this Schema's version.
Algorithm provides no uncertainy information at all.
CentroidCov const getCentroidErr() const
Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)
A FunctorKey for CentroidResult.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
CentroidElement y
y (row) coordinate of the measured position
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
afw::geom::Point< CentroidElement, 2 > Centroid
bool isValid() const
Return True if all the constituent sigma Keys are valid.
afw::table::PointKey< CentroidElement > _centroid
CentroidResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
afw::table::CovarianceMatrixKey< ErrElement, 2 > _centroidErr
afw::table::SourceRecord * record
void setCentroidErr(CentroidCov const &matrix)
Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x...