LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
aggregates.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008-2014 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 #ifndef AFW_TABLE_aggregates_h_INCLUDED
24 #define AFW_TABLE_aggregates_h_INCLUDED
25 
26 #include "lsst/utils/hashCombine.h"
27 
29 #include "lsst/afw/table/Schema.h"
30 #include "lsst/geom.h"
31 
32 namespace lsst {
33 namespace afw {
34 namespace geom {
35 
36 namespace ellipses {
37 
38 class Quadrupole;
39 
40 } // namespace ellipses
41 } // namespace geom
42 
43 namespace table {
44 
48 template <typename T>
49 class PointKey : public FunctorKey<lsst::geom::Point<T, 2> > {
50 public:
60  static PointKey addFields(Schema& schema, std::string const& name, std::string const& doc,
61  std::string const& unit);
62 
64  PointKey() noexcept : _x(), _y() {}
65 
67  PointKey(Key<T> const& x, Key<T> const& y) noexcept : _x(x), _y(y) {}
68 
69  PointKey(PointKey const&) noexcept = default;
70  PointKey(PointKey&&) noexcept = default;
71  PointKey& operator=(PointKey const&) noexcept = default;
72  PointKey& operator=(PointKey&&) noexcept = default;
73  ~PointKey() noexcept override = default;
74 
83  PointKey(SubSchema const& s) : _x(s["x"]), _y(s["y"]) {}
84 
86  lsst::geom::Point<T, 2> get(BaseRecord const& record) const override;
87 
89  void set(BaseRecord& record, lsst::geom::Point<T, 2> const& value) const override;
90 
92  bool operator==(PointKey<T> const& other) const noexcept { return _x == other._x && _y == other._y; }
94  bool operator!=(PointKey<T> const& other) const noexcept { return !(*this == other); }
96 
98  std::size_t hash_value() const noexcept {
99  // Completely arbitrary seed
100  return utils::hashCombine(17, _x, _y);
101  }
102 
104  bool isValid() const noexcept { return _x.isValid() && _y.isValid(); }
105 
107  Key<T> getX() const noexcept { return _x; }
108 
110  Key<T> getY() const noexcept { return _y; }
111 
112 private:
113  Key<T> _x;
114  Key<T> _y;
115 };
116 
119 
125 template <typename Box>
126 class BoxKey : public FunctorKey<Box> {
127 public:
129  using Element = typename Box::Element;
130 
144  static BoxKey addFields(Schema& schema, std::string const& name, std::string const& doc,
145  std::string const& unit);
146 
148  BoxKey() noexcept = default;
149 
151  BoxKey(PointKey<Element> const& min, PointKey<Element> const& max) noexcept : _min(min), _max(max) {}
152 
161  BoxKey(SubSchema const& s) : _min(s["min"]), _max(s["max"]) {}
162 
163  BoxKey(BoxKey const&) noexcept = default;
164  BoxKey(BoxKey&&) noexcept = default;
165  BoxKey& operator=(BoxKey const&) noexcept = default;
166  BoxKey& operator=(BoxKey&&) noexcept = default;
167  ~BoxKey() noexcept override = default;
168 
170  std::size_t hash_value() const noexcept {
171  // Completely arbitrary seed
172  return utils::hashCombine(17, _min, _max);
173  }
174 
176  Box get(BaseRecord const& record) const override;
177 
179  void set(BaseRecord& record, Box const& value) const override;
180 
182  bool operator==(BoxKey const& other) const noexcept { return _min == other._min && _max == other._max; }
184  bool operator!=(BoxKey const& other) const noexcept { return !(*this == other); }
186 
188  bool isValid() const noexcept { return _min.isValid() && _max.isValid(); }
189 
191  PointKey<Element> getMin() const noexcept { return _min; }
192 
194  PointKey<Element> getMax() const noexcept { return _max; }
195 
196 private:
197  PointKey<Element> _min;
198  PointKey<Element> _max;
199 };
200 
203 
210 class CoordKey : public FunctorKey<lsst::geom::SpherePoint> {
211 public:
221 
223  CoordKey() noexcept : _ra(), _dec() {}
224 
227  : _ra(ra), _dec(dec) {}
228 
237  CoordKey(SubSchema const& s) : _ra(s["ra"]), _dec(s["dec"]) {}
238 
239  CoordKey(CoordKey const&) noexcept = default;
240  CoordKey(CoordKey&&) noexcept = default;
241  CoordKey& operator=(CoordKey const&) noexcept = default;
242  CoordKey& operator=(CoordKey&&) noexcept = default;
243  ~CoordKey() noexcept override = default;
244 
246  lsst::geom::SpherePoint get(BaseRecord const& record) const override;
247 
249  void set(BaseRecord& record, lsst::geom::SpherePoint const& value) const override;
250 
252  bool operator==(CoordKey const& other) const noexcept { return _ra == other._ra && _dec == other._dec; }
254  bool operator!=(CoordKey const& other) const noexcept { return !(*this == other); }
256 
258  std::size_t hash_value() const noexcept {
259  // Completely arbitrary seed
260  return utils::hashCombine(17, _ra, _dec);
261  }
262 
263  bool isValid() const noexcept { return _ra.isValid() && _dec.isValid(); }
264 
266  Key<lsst::geom::Angle> getRa() const noexcept { return _ra; }
268  Key<lsst::geom::Angle> getDec() const noexcept { return _dec; }
270 
271 private:
274 };
275 
278 
282 class QuadrupoleKey : public FunctorKey<lsst::afw::geom::ellipses::Quadrupole> {
283 public:
295  static QuadrupoleKey addFields(Schema& schema, std::string const& name, std::string const& doc,
297 
299  QuadrupoleKey() noexcept : _ixx(), _iyy(), _ixy() {}
300 
302  QuadrupoleKey(Key<double> const& ixx, Key<double> const& iyy, Key<double> const& ixy) noexcept
303  : _ixx(ixx), _iyy(iyy), _ixy(ixy) {}
304 
313  QuadrupoleKey(SubSchema const& s) : _ixx(s["xx"]), _iyy(s["yy"]), _ixy(s["xy"]) {}
314 
315  QuadrupoleKey(QuadrupoleKey const&) noexcept = default;
316  QuadrupoleKey(QuadrupoleKey&&) noexcept = default;
317  QuadrupoleKey& operator=(QuadrupoleKey const&) noexcept = default;
318  QuadrupoleKey& operator=(QuadrupoleKey&&) noexcept = default;
319  ~QuadrupoleKey() noexcept override = default;
320 
322  geom::ellipses::Quadrupole get(BaseRecord const& record) const override;
323 
325  void set(BaseRecord& record, geom::ellipses::Quadrupole const& value) const override;
326 
328  bool operator==(QuadrupoleKey const& other) const noexcept {
330  return _ixx == other._ixx && _iyy == other._iyy && _ixy == other._ixy;
331  }
332  bool operator!=(QuadrupoleKey const& other) const noexcept { return !(*this == other); }
334 
336  std::size_t hash_value() const noexcept {
337  // Completely arbitrary seed
338  return utils::hashCombine(17, _ixx, _iyy, _ixy);
339  }
340 
342  bool isValid() const noexcept { return _ixx.isValid() && _iyy.isValid() && _ixy.isValid(); }
343 
345  Key<double> getIxx() const noexcept { return _ixx; }
347  Key<double> getIyy() const noexcept { return _iyy; }
348  Key<double> getIxy() const noexcept { return _ixy; }
350 
351 private:
352  Key<double> _ixx;
353  Key<double> _iyy;
354  Key<double> _ixy;
355 };
356 
360 class EllipseKey : public FunctorKey<lsst::afw::geom::ellipses::Ellipse> {
361 public:
372  static EllipseKey addFields(Schema& schema, std::string const& name, std::string const& doc,
373  std::string const& unit);
374 
376  EllipseKey() noexcept : _qKey(), _pKey() {}
377 
379  EllipseKey(QuadrupoleKey const& qKey, PointKey<double> const& pKey) noexcept : _qKey(qKey), _pKey(pKey) {}
380 
389  EllipseKey(SubSchema const& s) : _qKey(s), _pKey(s) {}
390 
391  EllipseKey(EllipseKey const&) noexcept = default;
392  EllipseKey(EllipseKey&&) noexcept = default;
393  EllipseKey& operator=(EllipseKey const&) noexcept = default;
394  EllipseKey& operator=(EllipseKey&&) noexcept = default;
395  ~EllipseKey() noexcept override = default;
396 
398  geom::ellipses::Ellipse get(BaseRecord const& record) const override;
399 
401  void set(BaseRecord& record, geom::ellipses::Ellipse const& value) const override;
402 
404  bool operator==(EllipseKey const& other) const noexcept {
406  return _qKey == other._qKey && _pKey == other._pKey;
407  }
408  bool operator!=(EllipseKey const& other) const noexcept { return !(*this == other); }
410 
412  std::size_t hash_value() const noexcept {
413  // Completely arbitrary seed
414  return utils::hashCombine(17, _qKey, _pKey);
415  }
416 
418  bool isValid() const noexcept { return _qKey.isValid() && _pKey.isValid(); }
419 
421  QuadrupoleKey getCore() const noexcept { return _qKey; }
423  PointKey<double> getCenter() const noexcept { return _pKey; }
425 
426 private:
427  QuadrupoleKey _qKey;
428  PointKey<double> _pKey;
429 };
430 
431 template <typename T, int N>
432 class CovarianceMatrixKey : public FunctorKey<Eigen::Matrix<T, N, N> > {
433 public:
437 
451  static CovarianceMatrixKey addFields(Schema& schema, std::string const& prefix, NameArray const& names,
452  std::string const& unit, bool diagonalOnly = false);
453 
468  static CovarianceMatrixKey addFields(Schema& schema, std::string const& prefix, NameArray const& names,
469  NameArray const& units, bool diagonalOnly = false);
470 
473 
492  explicit CovarianceMatrixKey(ErrKeyArray const& err,
493  CovarianceKeyArray const& cov = CovarianceKeyArray());
494 
506  CovarianceMatrixKey(SubSchema const& s, NameArray const& names);
507 
512  ~CovarianceMatrixKey() noexcept override;
513 
515  Eigen::Matrix<T, N, N> get(BaseRecord const& record) const override;
516 
518  void set(BaseRecord& record, Eigen::Matrix<T, N, N> const& value) const override;
519 
521  T getElement(BaseRecord const& record, int i, int j) const;
522 
524  void setElement(BaseRecord& record, int i, int j, T value) const;
525 
532  bool isValid() const noexcept;
533 
535  bool operator==(CovarianceMatrixKey const& other) const noexcept;
537  bool operator!=(CovarianceMatrixKey const& other) const noexcept { return !(*this == other); }
539 
541  std::size_t hash_value() const noexcept;
542 
543 private:
544  ErrKeyArray _err;
545  CovarianceKeyArray _cov;
546 };
547 } // namespace table
548 } // namespace afw
549 } // namespace lsst
550 
551 namespace std {
552 template <typename T>
553 struct hash<lsst::afw::table::PointKey<T>> {
556  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
557 };
558 
559 template <typename T>
560 struct hash<lsst::afw::table::BoxKey<T>> {
563  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
564 };
565 
566 template <>
567 struct hash<lsst::afw::table::CoordKey> {
570  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
571 };
572 
573 template <>
574 struct hash<lsst::afw::table::QuadrupoleKey> {
577  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
578 };
579 
580 template <>
581 struct hash<lsst::afw::table::EllipseKey> {
584  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
585 };
586 
587 template <typename T, int N>
588 struct hash<lsst::afw::table::CovarianceMatrixKey<T, N>> {
591  size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
592 };
593 } // namespace std
594 
595 #endif // !AFW_TABLE_aggregates_h_INCLUDED
y
int y
Definition: SpanSet.cc:49
schema
table::Schema schema
Definition: Amplifier.cc:115
lsst::afw::table::PointKey::set
void set(BaseRecord &record, lsst::geom::Point< T, 2 > const &value) const override
Set a Point in the given record.
Definition: aggregates.cc:49
lsst::afw::table::CovarianceMatrixKey::~CovarianceMatrixKey
~CovarianceMatrixKey() noexcept override
lsst::afw::table::CoordinateType::CELESTIAL
@ CELESTIAL
lsst::afw::table::PointKey::getX
Key< T > getX() const noexcept
Return the underlying x Key.
Definition: aggregates.h:107
lsst::afw::table::EllipseKey::getCore
QuadrupoleKey getCore() const noexcept
Return constituent FunctorKeys.
Definition: aggregates.h:422
lsst::afw::table::CovarianceMatrixKey::get
Eigen::Matrix< T, N, N > get(BaseRecord const &record) const override
Get a covariance matrix from the given record.
Definition: aggregates.cc:259
lsst::afw::table::CoordinateType::PIXEL
@ PIXEL
lsst::afw::table::EllipseKey::set
void set(BaseRecord &record, geom::ellipses::Ellipse const &value) const override
Set an Ellipse in the given record.
Definition: aggregates.cc:133
lsst::afw::table::QuadrupoleKey::set
void set(BaseRecord &record, geom::ellipses::Quadrupole const &value) const override
Set a Quadrupole in the given record.
Definition: aggregates.cc:114
std::string
STL class.
std::hash< lsst::afw::table::QuadrupoleKey >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:577
ellipses
lsst::afw::table::BoxKey
A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of PointKeys.
Definition: aggregates.h:126
lsst::afw::table::FunctorKey
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
Definition: FunctorKey.h:74
lsst::afw::table::PointKey::addFields
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.
Definition: aggregates.cc:36
lsst::afw::table::CoordKey
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
Definition: aggregates.h:210
std::vector
STL class.
lsst::afw::table::EllipseKey::EllipseKey
EllipseKey(EllipseKey const &) noexcept=default
lsst::afw::table::EllipseKey::EllipseKey
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
Definition: aggregates.h:389
dec
double dec
Definition: Match.cc:41
lsst::afw::table::PointKey::operator!=
bool operator!=(PointKey< T > const &other) const noexcept
Definition: aggregates.h:94
lsst::afw::table::CoordKey::get
lsst::geom::SpherePoint get(BaseRecord const &record) const override
Get an lsst::geom::SpherePoint from the given record.
Definition: aggregates.cc:89
lsst::afw::table::PointKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:98
lsst::afw
Definition: imageAlgorithm.dox:1
lsst::afw::table::CovarianceMatrixKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.cc:329
lsst::afw::table::CoordKey::CoordKey
CoordKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:223
lsst::afw::table::QuadrupoleKey::getIyy
Key< double > getIyy() const noexcept
Definition: aggregates.h:347
lsst::afw::table::QuadrupoleKey::operator!=
bool operator!=(QuadrupoleKey const &other) const noexcept
Definition: aggregates.h:332
lsst::afw::table::CovarianceMatrixKey::operator=
CovarianceMatrixKey & operator=(CovarianceMatrixKey const &)
lsst::afw::table::Schema
Defines the fields and offsets for a table.
Definition: Schema.h:50
lsst::afw::table::EllipseKey::EllipseKey
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey) noexcept
Construct from individual Keys.
Definition: aggregates.h:379
lsst::afw::table::QuadrupoleKey::get
geom::ellipses::Quadrupole get(BaseRecord const &record) const override
Get a Quadrupole from the given record.
Definition: aggregates.cc:110
lsst::afw::table::CoordKey::getDec
Key< lsst::geom::Angle > getDec() const noexcept
Definition: aggregates.h:268
lsst::afw::table::BoxKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:170
lsst::afw::geom.transform.transformContinued.name
string name
Definition: transformContinued.py:32
lsst::afw::table::Point2DKey
PointKey< double > Point2DKey
Definition: aggregates.h:118
std::hash< lsst::afw::table::EllipseKey >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:584
lsst::afw::table::EllipseKey::isValid
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition: aggregates.h:418
lsst::afw::table::PointKey::PointKey
PointKey(Key< T > const &x, Key< T > const &y) noexcept
Construct from a pair of Keys.
Definition: aggregates.h:67
lsst::afw::table::CovarianceMatrixKey
Definition: aggregates.h:432
lsst::afw::table::CoordKey::getRa
Key< lsst::geom::Angle > getRa() const noexcept
Return a constituent Key.
Definition: aggregates.h:267
lsst::afw::table::BoxKey::addFields
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.
Definition: aggregates.cc:60
lsst::afw::table::PointKey::PointKey
PointKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:64
lsst::afw::table::CovarianceMatrixKey::isValid
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
Definition: aggregates.cc:294
lsst::afw::table::PointKey
A FunctorKey used to get or set a lsst::geom::Point from an (x,y) pair of int or double Keys.
Definition: aggregates.h:49
lsst::afw::table::PointKey::isValid
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
Definition: aggregates.h:104
lsst::afw::table::EllipseKey::operator!=
bool operator!=(EllipseKey const &other) const noexcept
Definition: aggregates.h:408
std::hash< lsst::afw::table::BoxKey< T > >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:563
lsst::afw::table::EllipseKey::getCenter
PointKey< double > getCenter() const noexcept
Definition: aggregates.h:423
hashCombine.h
lsst::afw::table::CovarianceMatrixKey::getElement
T getElement(BaseRecord const &record, int i, int j) const
Return the element in row i and column j.
Definition: aggregates.cc:336
lsst::afw::table::QuadrupoleKey::QuadrupoleKey
QuadrupoleKey(QuadrupoleKey const &) noexcept=default
lsst::afw::table::CoordinateType
CoordinateType
Enum used to set units for geometric FunctorKeys.
Definition: aggregates.h:277
lsst::afw::table::CovarianceMatrixKey::CovarianceMatrixKey
CovarianceMatrixKey()
Construct an invalid instance; must assign before subsequent use.
Definition: aggregates.cc:185
lsst::afw::table::CovarianceMatrixKey::CovarianceMatrixKey
CovarianceMatrixKey(CovarianceMatrixKey &&)
lsst::afw::table::QuadrupoleKey
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
Definition: aggregates.h:282
lsst::afw::table::BoxKey::operator==
bool operator==(BoxKey const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
Definition: aggregates.h:183
FunctorKey.h
lsst::afw::table::BoxKey::set
void set(BaseRecord &record, Box const &value) const override
Set a Box in the given record.
Definition: aggregates.cc:73
x
double x
Definition: ChebyshevBoundedField.cc:277
lsst::afw::table::QuadrupoleKey::addFields
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.
Definition: aggregates.cc:100
lsst::afw::table::QuadrupoleKey::QuadrupoleKey
QuadrupoleKey(Key< double > const &ixx, Key< double > const &iyy, Key< double > const &ixy) noexcept
Construct from individual Keys.
Definition: aggregates.h:302
lsst::afw::table::CoordKey::CoordKey
CoordKey(CoordKey &&) noexcept=default
lsst::afw::table::CovarianceMatrixKey::set
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)
Definition: aggregates.cc:278
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::afw::table::BaseRecord
Base class for all records.
Definition: BaseRecord.h:31
lsst::afw::table::CovarianceMatrixKey::operator=
CovarianceMatrixKey & operator=(CovarianceMatrixKey &&)
lsst::afw::table::QuadrupoleKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:336
lsst::afw::table::CoordKey::isValid
bool isValid() const noexcept
Definition: aggregates.h:263
lsst::afw::table::Key
A class used as a handle to a particular field in a table.
Definition: fwd.h:45
lsst::afw::table::Key::isValid
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Definition: Key.h:97
lsst::afw::table::EllipseKey
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys.
Definition: aggregates.h:360
lsst::afw::table::Point2IKey
PointKey< int > Point2IKey
Definition: aggregates.h:117
lsst::afw::table::CoordKey::CoordKey
CoordKey(Key< lsst::geom::Angle > const &ra, Key< lsst::geom::Angle > const &dec) noexcept
Construct from a pair of Keys.
Definition: aggregates.h:226
lsst::afw::table::EllipseKey::get
geom::ellipses::Ellipse get(BaseRecord const &record) const override
Get an Ellipse from the given record.
Definition: aggregates.cc:129
lsst::afw::table::CovarianceMatrixKey::CovarianceMatrixKey
CovarianceMatrixKey(CovarianceMatrixKey const &)
max
int max
Definition: BoundedField.cc:104
lsst::afw::table::CoordKey::CoordKey
CoordKey(CoordKey const &) noexcept=default
lsst::afw::table::QuadrupoleKey::QuadrupoleKey
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
Definition: aggregates.h:313
lsst::afw::table::CovarianceMatrixKey::CovarianceKeyArray
std::vector< Key< T > > CovarianceKeyArray
Definition: aggregates.h:435
lsst::afw::table::BoxKey::get
Box get(BaseRecord const &record) const override
Get a Box from the given record.
Definition: aggregates.cc:68
lsst::afw::table::BoxKey::BoxKey
BoxKey() noexcept=default
Default constructor; instance will not be usable unless subsequently assigned to.
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::afw::table::BoxKey::getMax
PointKey< Element > getMax() const noexcept
Return the underlying max PointKey.
Definition: aggregates.h:194
std::hash< lsst::afw::table::CoordKey >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:570
lsst::meas::modelfit::Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: common.h:45
lsst::afw::table::CovarianceMatrixKey::NameArray
std::vector< std::string > NameArray
Definition: aggregates.h:436
lsst::afw::table::QuadrupoleKey::QuadrupoleKey
QuadrupoleKey(QuadrupoleKey &&) noexcept=default
lsst::geom
Definition: AffineTransform.h:36
lsst::utils::hashCombine
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
Definition: hashCombine.h:35
lsst::afw::table::CovarianceMatrixKey::addFields
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.
Definition: aggregates.cc:141
lsst::afw::table::EllipseKey::EllipseKey
EllipseKey(EllipseKey &&) noexcept=default
lsst::afw::table::CovarianceMatrixKey::setElement
void setElement(BaseRecord &record, int i, int j, T value) const
Set the element in row i and column j.
Definition: aggregates.cc:349
std::hash< lsst::afw::table::CovarianceMatrixKey< T, N > >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:591
std::hash< lsst::afw::table::PointKey< T > >::operator()
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:556
lsst::geom::Point< T, 2 >
A coordinate class intended to represent absolute positions (2-d specialization).
Definition: Point.h:211
min
int min
Definition: BoundedField.cc:103
lsst::afw::table::SubSchema
A proxy type for name lookups in a Schema.
Definition: Schema.h:357
std
STL namespace.
lsst::afw::table::BoxKey::BoxKey
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
Definition: aggregates.h:161
lsst::afw::table::PointKey::get
lsst::geom::Point< T, 2 > get(BaseRecord const &record) const override
Get a Point from the given record.
Definition: aggregates.cc:44
lsst::afw::table::QuadrupoleKey::getIxx
Key< double > getIxx() const noexcept
Return a constituent Key.
Definition: aggregates.h:346
lsst::afw::table::BoxKey::isValid
bool isValid() const noexcept
Return True if both the min and max PointKeys are valid.
Definition: aggregates.h:188
lsst::afw::table::QuadrupoleKey::QuadrupoleKey
QuadrupoleKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:299
std::size_t
lsst::afw::table::BoxKey::getMin
PointKey< Element > getMin() const noexcept
Return the underlying min PointKey.
Definition: aggregates.h:191
Schema.h
lsst::afw::table::BoxKey< lsst::geom::Box2I >::Element
typename Box::Element Element
Type of coordinate elements (i.e. int or double).
Definition: aggregates.h:129
lsst::afw::table::CoordKey::operator!=
bool operator!=(CoordKey const &other) const noexcept
Definition: aggregates.h:254
lsst::afw::table::CoordKey::set
void set(BaseRecord &record, lsst::geom::SpherePoint const &value) const override
Set an lsst::geom::SpherePoint in the given record.
Definition: aggregates.cc:93
lsst::afw::table::EllipseKey::EllipseKey
EllipseKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:376
lsst::geom::SpherePoint
Point in an unspecified spherical coordinate system.
Definition: SpherePoint.h:57
lsst::afw::table::CovarianceMatrixKey::ErrKeyArray
std::vector< Key< T > > ErrKeyArray
Definition: aggregates.h:434
lsst::afw::table::BoxKey::BoxKey
BoxKey(BoxKey const &) noexcept=default
lsst::afw::table::EllipseKey::addFields
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.
Definition: aggregates.cc:122
lsst::afw::table::PointKey::operator==
bool operator==(PointKey< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
Definition: aggregates.h:93
geom.h
prefix
std::string prefix
Definition: SchemaMapper.cc:79
lsst::afw::table::PointKey::PointKey
PointKey(PointKey &&) noexcept=default
lsst::afw::table::BoxKey::BoxKey
BoxKey(BoxKey &&) noexcept=default
lsst::afw::table::BoxKey::operator!=
bool operator!=(BoxKey const &other) const noexcept
Definition: aggregates.h:184
lsst::afw::table::PointKey::PointKey
PointKey(PointKey const &) noexcept=default
lsst::afw::table::QuadrupoleKey::getIxy
Key< double > getIxy() const noexcept
Definition: aggregates.h:348
lsst::afw::table::CoordKey::CoordKey
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
Definition: aggregates.h:237
std::hash
lsst::afw::table::QuadrupoleKey::isValid
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition: aggregates.h:342
lsst::afw::table::CoordKey::addFields
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.
Definition: aggregates.cc:83
lsst::afw::table::CoordKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:258
lsst::afw::table::PointKey::getY
Key< T > getY() const noexcept
Return the underlying y Key.
Definition: aggregates.h:110
lsst::afw::table::EllipseKey::hash_value
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:412