23#ifndef AFW_TABLE_aggregates_h_INCLUDED
24#define AFW_TABLE_aggregates_h_INCLUDED
45template <
typename T,
int N>
46class CovarianceMatrixKey;
171 return _x == other._x && _y == other._y && _z == other._z; }
207template <
typename Box>
261 void set(
BaseRecord& record, Box
const& value)
const override;
265 bool operator==(
BoxKey const& other)
const noexcept {
return _min == other._min && _max == other._max; }
314 : _ra(ra), _dec(
dec) {}
417 return _ixx == other._ixx && _iyy == other._iyy && _ixy == other._ixy;
493 return _qKey == other._qKey && _pKey == other._pKey;
518template <
typename T,
int N>
695template <
typename T,
int N>
696struct hash<
lsst::afw::table::CovarianceMatrixKey<T, N>> {
Tag types used to declare specialized field types.
Base class for all records.
A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of Point3Keys.
BoxKey(BoxKey const &) noexcept=default
bool operator!=(BoxKey const &other) const noexcept
bool isValid() const noexcept
Return True if both the min and max PointKeys are valid.
std::size_t hash_value() const noexcept
Return a hash of this object.
Box get(BaseRecord const &record) const override
Get a Box from the given record.
static BoxKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add _min_x, _min_y, _max_x, _max_y fields to a Schema, and return a BoxKey that points to them.
PointKey< Element > getMin() const noexcept
Return the underlying min PointKey.
PointKey< Element > getMax() const noexcept
Return the underlying max PointKey.
typename Box::Element Element
Type of coordinate elements (i.e. int or double).
BoxKey() noexcept=default
Default constructor; instance will not be usable unless subsequently assigned to.
bool operator==(BoxKey const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
BoxKey(BoxKey &&) noexcept=default
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
CoordErrKey(ErrKeyArray const &err, CovarianceKeyArray const &cov=CovarianceKeyArray())
static CoordErrKey addFields(Schema &schema, std::string const &name, std::string const &unit, bool diagonalOnly=false)
CoordErrKey(SubSchema const &s, std::string const &name)
static CoordErrKey addFields(Schema &schema, std::string const &name, NameArray const &units, bool diagonalOnly=false)
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
bool operator!=(CoordKey const &other) const noexcept
CoordKey(Key< lsst::geom::Angle > const &ra, Key< lsst::geom::Angle > const &dec) noexcept
Construct from a pair of Keys.
static CoordKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)
Add a pair of _ra, _dec fields to a Schema, and return a CoordKey that points to them.
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
CoordKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Key< lsst::geom::Angle > getDec() const noexcept
static ErrorKey addErrorFields(Schema &schema)
Key< lsst::geom::Angle > getRa() const noexcept
Return a constituent Key.
std::size_t hash_value() const noexcept
Return a hash of this object.
static ErrorKey getErrorKey(Schema const &schema)
CoordKey(CoordKey &&) noexcept=default
bool isValid() const noexcept
CoordKey(CoordKey const &) noexcept=default
lsst::geom::SpherePoint get(BaseRecord const &record) const override
Get an lsst::geom::SpherePoint from the given record.
std::vector< Key< T > > CovarianceKeyArray
CovarianceMatrixKey()
Construct an invalid instance; must assign before subsequent use.
std::vector< Key< T > > ErrKeyArray
CovarianceMatrixKey(CovarianceMatrixKey const &)
Eigen::Matrix< T, N, N > get(BaseRecord const &record) const override
Get a covariance matrix from the given record.
void setElement(BaseRecord &record, int i, int j, T value) const
Set the element in row i and column j.
CovarianceMatrixKey & operator=(CovarianceMatrixKey &&)
T getElement(BaseRecord const &record, int i, int j) const
Return the element in row i and column j.
~CovarianceMatrixKey() noexcept override
CovarianceMatrixKey(CovarianceMatrixKey &&)
static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, std::string const &unit, bool diagonalOnly=false)
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
std::size_t hash_value() const noexcept
Return a hash of this object.
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
CovarianceMatrixKey & operator=(CovarianceMatrixKey const &)
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys.
EllipseKey(EllipseKey &&) noexcept=default
static EllipseKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a set of _xx, _yy, _xy, _x, _y fields to a Schema, and return an EllipseKey that points to them.
PointKey< double > getCenter() const noexcept
geom::ellipses::Ellipse get(BaseRecord const &record) const override
Get an Ellipse from the given record.
EllipseKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
std::size_t hash_value() const noexcept
Return a hash of this object.
bool operator!=(EllipseKey const &other) const noexcept
EllipseKey(EllipseKey const &) noexcept=default
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
QuadrupoleKey getCore() const noexcept
Return constituent FunctorKeys.
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey) noexcept
Construct from individual Keys.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
A FunctorKey used to get or set a lsst::geom::Point3 from an (x,y,z) tuple of int or double Keys.
Key< T > getX() const noexcept
Return the underlying x Key.
std::size_t hash_value() const noexcept
Return a hash of this object.
bool operator!=(Point3Key< T > const &other) const noexcept
Point3Key(Point3Key const &) noexcept=default
Point3Key(Point3Key &&) noexcept=default
bool operator==(Point3Key< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x, y, and z Keys.
static Point3Key addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a pair of _x, _y, _z fields to a Schema, and return a Point3Key that points to them.
Key< T > getY() const noexcept
Return the underlying y Key.
Point3Key() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Key< T > getZ() const noexcept
Return the underlying y Key.
lsst::geom::Point< T, 3 > get(BaseRecord const &record) const override
Get a Point from the given record.
Point3Key(Key< T > const &x, Key< T > const &y, Key< T > const &z) noexcept
Construct from a pair of Keys.
bool isValid() const noexcept
Return True if all of the x, y, and z Keys are valid.
A FunctorKey used to get or set a lsst::geom::Point from an (x,y) pair of int or double Keys.
std::size_t hash_value() const noexcept
Return a hash of this object.
PointKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Key< T > getY() const noexcept
Return the underlying y Key.
PointKey(PointKey const &) noexcept=default
PointKey(PointKey &&) noexcept=default
bool operator!=(PointKey< T > const &other) const noexcept
static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a pair of _x, _y fields to a Schema, and return a PointKey that points to them.
PointKey(Key< T > const &x, Key< T > const &y) noexcept
Construct from a pair of Keys.
bool operator==(PointKey< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
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.
lsst::geom::Point< T, 2 > get(BaseRecord const &record) const override
Get a Point from the given record.
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
std::size_t hash_value() const noexcept
Return a hash of this object.
Key< double > getIxx() const noexcept
Return a constituent Key.
geom::ellipses::Quadrupole get(BaseRecord const &record) const override
Get a Quadrupole from the given record.
QuadrupoleKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
QuadrupoleKey(QuadrupoleKey const &) noexcept=default
Key< double > getIxy() const noexcept
Key< double > getIyy() const noexcept
static QuadrupoleKey addFields(Schema &schema, std::string const &name, std::string const &doc, CoordinateType coordType=CoordinateType::PIXEL)
Add a set of quadrupole subfields to a schema and return a QuadrupoleKey that points to them.
QuadrupoleKey(Key< double > const &ixx, Key< double > const &iyy, Key< double > const &ixy) noexcept
Construct from individual Keys.
QuadrupoleKey(QuadrupoleKey &&) noexcept=default
bool operator!=(QuadrupoleKey const &other) const noexcept
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Defines the fields and offsets for a table.
A proxy type for name lookups in a Schema.
A coordinate class intended to represent absolute positions.
Point in an unspecified spherical coordinate system.
daf::base::PropertySet * set
CoordinateType
Enum used to set units for geometric FunctorKeys.
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept