LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef AFW_TABLE_aggregates_h_INCLUDED
24 #define AFW_TABLE_aggregates_h_INCLUDED
104 bool isValid() const noexcept {
return _x.isValid() && _y.isValid(); }
125 template <
typename Box>
179 void set(
BaseRecord& record, Box
const& value)
const override;
227 : _ra(ra), _dec(
dec) {}
303 : _ixx(ixx), _iyy(iyy), _ixy(ixy) {}
406 return _qKey ==
other._qKey && _pKey ==
other._pKey;
431 template <
typename T,
int N>
452 std::string const& unit,
bool diagonalOnly =
false);
469 NameArray const& units,
bool diagonalOnly =
false);
552 template <
typename T>
559 template <
typename T>
587 template <
typename T,
int N>
588 struct hash<
lsst::afw::table::CovarianceMatrixKey<T, N>> {
595 #endif // !AFW_TABLE_aggregates_h_INCLUDED
void set(BaseRecord &record, lsst::geom::Point< T, 2 > const &value) const override
Set a Point in the given record.
~CovarianceMatrixKey() noexcept override
Key< T > getX() const noexcept
Return the underlying x Key.
QuadrupoleKey getCore() const noexcept
Return constituent FunctorKeys.
Eigen::Matrix< T, N, N > get(BaseRecord const &record) const override
Get a covariance matrix from the given record.
void set(BaseRecord &record, geom::ellipses::Ellipse const &value) const override
Set an Ellipse in the given record.
void set(BaseRecord &record, geom::ellipses::Quadrupole const &value) const override
Set a Quadrupole in the given record.
size_t operator()(argument_type const &obj) const noexcept
A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of PointKeys.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
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.
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
EllipseKey(EllipseKey const &) noexcept=default
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
bool operator!=(PointKey< T > const &other) const noexcept
lsst::geom::SpherePoint get(BaseRecord const &record) const override
Get an lsst::geom::SpherePoint from the given record.
std::size_t hash_value() const noexcept
Return a hash of this object.
std::size_t hash_value() const noexcept
Return a hash of this object.
CoordKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Key< double > getIyy() const noexcept
bool operator!=(QuadrupoleKey const &other) const noexcept
CovarianceMatrixKey & operator=(CovarianceMatrixKey const &)
Defines the fields and offsets for a table.
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey) noexcept
Construct from individual Keys.
geom::ellipses::Quadrupole get(BaseRecord const &record) const override
Get a Quadrupole from the given record.
Key< lsst::geom::Angle > getDec() const noexcept
std::size_t hash_value() const noexcept
Return a hash of this object.
PointKey< double > Point2DKey
size_t operator()(argument_type const &obj) const noexcept
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
PointKey(Key< T > const &x, Key< T > const &y) noexcept
Construct from a pair of Keys.
Key< lsst::geom::Angle > getRa() const noexcept
Return a constituent Key.
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() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
A FunctorKey used to get or set a lsst::geom::Point from an (x,y) pair of int or double Keys.
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
bool operator!=(EllipseKey const &other) const noexcept
size_t operator()(argument_type const &obj) const noexcept
PointKey< double > getCenter() const noexcept
T getElement(BaseRecord const &record, int i, int j) const
Return the element in row i and column j.
QuadrupoleKey(QuadrupoleKey const &) noexcept=default
CoordinateType
Enum used to set units for geometric FunctorKeys.
CovarianceMatrixKey()
Construct an invalid instance; must assign before subsequent use.
CovarianceMatrixKey(CovarianceMatrixKey &&)
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
bool operator==(BoxKey const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
void set(BaseRecord &record, Box const &value) const override
Set a Box in the given record.
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.
CoordKey(CoordKey &&) noexcept=default
void set(BaseRecord &record, Eigen::Matrix< T, N, N > const &value) const override
Set a covariance matrix in the given record (uses only the lower triangle of the given matrix)
ItemVariant const * other
Base class for all records.
CovarianceMatrixKey & operator=(CovarianceMatrixKey &&)
std::size_t hash_value() const noexcept
Return a hash of this object.
bool isValid() const noexcept
A class used as a handle to a particular field in a table.
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys.
PointKey< int > Point2IKey
CoordKey(Key< lsst::geom::Angle > const &ra, Key< lsst::geom::Angle > const &dec) noexcept
Construct from a pair of Keys.
geom::ellipses::Ellipse get(BaseRecord const &record) const override
Get an Ellipse from the given record.
CovarianceMatrixKey(CovarianceMatrixKey const &)
CoordKey(CoordKey const &) noexcept=default
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
std::vector< Key< T > > CovarianceKeyArray
Box get(BaseRecord const &record) const override
Get a Box from the given record.
BoxKey() noexcept=default
Default constructor; instance will not be usable unless subsequently assigned to.
A base class for image defects.
PointKey< Element > getMax() const noexcept
Return the underlying max PointKey.
size_t operator()(argument_type const &obj) const noexcept
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
std::vector< std::string > NameArray
QuadrupoleKey(QuadrupoleKey &&) noexcept=default
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
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.
EllipseKey(EllipseKey &&) noexcept=default
void setElement(BaseRecord &record, int i, int j, T value) const
Set the element in row i and column j.
size_t operator()(argument_type const &obj) const noexcept
size_t operator()(argument_type const &obj) const noexcept
A coordinate class intended to represent absolute positions (2-d specialization).
A proxy type for name lookups in a Schema.
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
lsst::geom::Point< T, 2 > get(BaseRecord const &record) const override
Get a Point from the given record.
Key< double > getIxx() const noexcept
Return a constituent Key.
bool isValid() const noexcept
Return True if both the min and max PointKeys are valid.
QuadrupoleKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
PointKey< Element > getMin() const noexcept
Return the underlying min PointKey.
typename Box::Element Element
Type of coordinate elements (i.e. int or double).
bool operator!=(CoordKey const &other) const noexcept
void set(BaseRecord &record, lsst::geom::SpherePoint const &value) const override
Set an lsst::geom::SpherePoint in the given record.
EllipseKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Point in an unspecified spherical coordinate system.
std::vector< Key< T > > ErrKeyArray
BoxKey(BoxKey const &) 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.
bool operator==(PointKey< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
PointKey(PointKey &&) noexcept=default
BoxKey(BoxKey &&) noexcept=default
bool operator!=(BoxKey const &other) const noexcept
PointKey(PointKey const &) noexcept=default
Key< double > getIxy() const noexcept
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
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.
std::size_t hash_value() const noexcept
Return a hash of this object.
Key< T > getY() const noexcept
Return the underlying y Key.
std::size_t hash_value() const noexcept
Return a hash of this object.