LSST Applications g070148d5b3+33e5256705,g0d53e28543+25c8b88941,g0da5cf3356+2dd1178308,g1081da9e2a+62d12e78cb,g17e5ecfddb+7e422d6136,g1c76d35bf8+ede3a706f7,g295839609d+225697d880,g2e2c1a68ba+cc1f6f037e,g2ffcdf413f+853cd4dcde,g38293774b4+62d12e78cb,g3b44f30a73+d953f1ac34,g48ccf36440+885b902d19,g4b2f1765b6+7dedbde6d2,g5320a0a9f6+0c5d6105b6,g56b687f8c9+ede3a706f7,g5c4744a4d9+ef6ac23297,g5ffd174ac0+0c5d6105b6,g6075d09f38+66af417445,g667d525e37+2ced63db88,g670421136f+2ced63db88,g71f27ac40c+2ced63db88,g774830318a+463cbe8d1f,g7876bc68e5+1d137996f1,g7985c39107+62d12e78cb,g7fdac2220c+0fd8241c05,g96f01af41f+368e6903a7,g9ca82378b8+2ced63db88,g9d27549199+ef6ac23297,gabe93b2c52+e3573e3735,gb065e2a02a+3dfbe639da,gbc3249ced9+0c5d6105b6,gbec6a3398f+0c5d6105b6,gc9534b9d65+35b9f25267,gd01420fc67+0c5d6105b6,geee7ff78d7+a14128c129,gf63283c776+ede3a706f7,gfed783d017+0c5d6105b6,w.2022.47
LSST Data Management Base Package
Loading...
Searching...
No Matches
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
27
30#include "lsst/geom.h"
31
32namespace lsst {
33namespace afw {
34namespace geom {
35
36namespace ellipses {
37
38class Quadrupole;
39
40} // namespace ellipses
41} // namespace geom
42
43namespace table {
44
48template <typename T>
49class PointKey : public FunctorKey<lsst::geom::Point<T, 2> > {
50public:
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
93 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
112private:
113 Key<T> _x;
114 Key<T> _y;
115};
116
119
123template <typename T>
124class Point3Key : public FunctorKey<lsst::geom::Point<T, 3> > {
125public:
135 static Point3Key addFields(Schema& schema, std::string const& name, std::string const& doc,
136 std::string const& unit);
137
139 Point3Key() noexcept : _x(), _y(), _z() {}
140
142 Point3Key(Key<T> const& x, Key<T> const& y, Key<T> const& z) noexcept : _x(x), _y(y), _z(z) {}
143
144 Point3Key(Point3Key const&) noexcept = default;
145 Point3Key(Point3Key&&) noexcept = default;
146 Point3Key& operator=(Point3Key const&) noexcept = default;
147 Point3Key& operator=(Point3Key&&) noexcept = default;
148 ~Point3Key() noexcept override = default;
149
158 Point3Key(SubSchema const& s) : _x(s["x"]), _y(s["y"]), _z(s["z"]) {}
159
161 lsst::geom::Point<T, 3> get(BaseRecord const& record) const override;
162
164 void set(BaseRecord& record, lsst::geom::Point<T, 3> const& value) const override;
165
167
168 bool operator==(Point3Key<T> const& other) const noexcept {
169 return _x == other._x && _y == other._y && _z == other._z; }
170 bool operator!=(Point3Key<T> const& other) const noexcept { return !(*this == other); }
172
174 std::size_t hash_value() const noexcept {
175 // Completely arbitrary seed
176 return utils::hashCombine(137, _x, _y, _z);
177 }
178
180 bool isValid() const noexcept { return _x.isValid() && _y.isValid() && _z.isValid(); }
181
183 Key<T> getX() const noexcept { return _x; }
184
186 Key<T> getY() const noexcept { return _y; }
187
189 Key<T> getZ() const noexcept { return _z; }
190
191private:
192 Key<T> _x;
193 Key<T> _y;
194 Key<T> _z;
195};
196
199
205template <typename Box>
206class BoxKey : public FunctorKey<Box> {
207public:
209 using Element = typename Box::Element;
210
224 static BoxKey addFields(Schema& schema, std::string const& name, std::string const& doc,
225 std::string const& unit);
226
228 BoxKey() noexcept = default;
229
231 BoxKey(PointKey<Element> const& min, PointKey<Element> const& max) noexcept : _min(min), _max(max) {}
232
241 BoxKey(SubSchema const& s) : _min(s["min"]), _max(s["max"]) {}
242
243 BoxKey(BoxKey const&) noexcept = default;
244 BoxKey(BoxKey&&) noexcept = default;
245 BoxKey& operator=(BoxKey const&) noexcept = default;
246 BoxKey& operator=(BoxKey&&) noexcept = default;
247 ~BoxKey() noexcept override = default;
248
250 std::size_t hash_value() const noexcept {
251 // Completely arbitrary seed
252 return utils::hashCombine(17, _min, _max);
253 }
254
256 Box get(BaseRecord const& record) const override;
257
259 void set(BaseRecord& record, Box const& value) const override;
260
262
263 bool operator==(BoxKey const& other) const noexcept { return _min == other._min && _max == other._max; }
264 bool operator!=(BoxKey const& other) const noexcept { return !(*this == other); }
266
268 bool isValid() const noexcept { return _min.isValid() && _max.isValid(); }
269
271 PointKey<Element> getMin() const noexcept { return _min; }
272
274 PointKey<Element> getMax() const noexcept { return _max; }
275
276private:
279};
280
283
290class CoordKey : public FunctorKey<lsst::geom::SpherePoint> {
291public:
301
303 CoordKey() noexcept : _ra(), _dec() {}
304
307 : _ra(ra), _dec(dec) {}
308
317 CoordKey(SubSchema const& s) : _ra(s["ra"]), _dec(s["dec"]) {}
318
319 CoordKey(CoordKey const&) noexcept = default;
320 CoordKey(CoordKey&&) noexcept = default;
321 CoordKey& operator=(CoordKey const&) noexcept = default;
322 CoordKey& operator=(CoordKey&&) noexcept = default;
323 ~CoordKey() noexcept override = default;
324
326 lsst::geom::SpherePoint get(BaseRecord const& record) const override;
327
329 void set(BaseRecord& record, lsst::geom::SpherePoint const& value) const override;
330
332
333 bool operator==(CoordKey const& other) const noexcept { return _ra == other._ra && _dec == other._dec; }
334 bool operator!=(CoordKey const& other) const noexcept { return !(*this == other); }
336
338 std::size_t hash_value() const noexcept {
339 // Completely arbitrary seed
340 return utils::hashCombine(17, _ra, _dec);
341 }
342
343 bool isValid() const noexcept { return _ra.isValid() && _dec.isValid(); }
344
346
347 Key<lsst::geom::Angle> getRa() const noexcept { return _ra; }
348 Key<lsst::geom::Angle> getDec() const noexcept { return _dec; }
350
351private:
354};
355
358
362class QuadrupoleKey : public FunctorKey<lsst::afw::geom::ellipses::Quadrupole> {
363public:
375 static QuadrupoleKey addFields(Schema& schema, std::string const& name, std::string const& doc,
377
379 QuadrupoleKey() noexcept : _ixx(), _iyy(), _ixy() {}
380
382 QuadrupoleKey(Key<double> const& ixx, Key<double> const& iyy, Key<double> const& ixy) noexcept
383 : _ixx(ixx), _iyy(iyy), _ixy(ixy) {}
384
393 QuadrupoleKey(SubSchema const& s) : _ixx(s["xx"]), _iyy(s["yy"]), _ixy(s["xy"]) {}
394
395 QuadrupoleKey(QuadrupoleKey const&) noexcept = default;
396 QuadrupoleKey(QuadrupoleKey&&) noexcept = default;
397 QuadrupoleKey& operator=(QuadrupoleKey const&) noexcept = default;
398 QuadrupoleKey& operator=(QuadrupoleKey&&) noexcept = default;
399 ~QuadrupoleKey() noexcept override = default;
400
402 geom::ellipses::Quadrupole get(BaseRecord const& record) const override;
403
405 void set(BaseRecord& record, geom::ellipses::Quadrupole const& value) const override;
406
408
409 bool operator==(QuadrupoleKey const& other) const noexcept {
410 return _ixx == other._ixx && _iyy == other._iyy && _ixy == other._ixy;
411 }
412 bool operator!=(QuadrupoleKey const& other) const noexcept { return !(*this == other); }
414
416 std::size_t hash_value() const noexcept {
417 // Completely arbitrary seed
418 return utils::hashCombine(17, _ixx, _iyy, _ixy);
419 }
420
422 bool isValid() const noexcept { return _ixx.isValid() && _iyy.isValid() && _ixy.isValid(); }
423
425
426 Key<double> getIxx() const noexcept { return _ixx; }
427 Key<double> getIyy() const noexcept { return _iyy; }
428 Key<double> getIxy() const noexcept { return _ixy; }
430
431private:
432 Key<double> _ixx;
433 Key<double> _iyy;
434 Key<double> _ixy;
435};
436
440class EllipseKey : public FunctorKey<lsst::afw::geom::ellipses::Ellipse> {
441public:
452 static EllipseKey addFields(Schema& schema, std::string const& name, std::string const& doc,
453 std::string const& unit);
454
456 EllipseKey() noexcept : _qKey(), _pKey() {}
457
459 EllipseKey(QuadrupoleKey const& qKey, PointKey<double> const& pKey) noexcept : _qKey(qKey), _pKey(pKey) {}
460
469 EllipseKey(SubSchema const& s) : _qKey(s), _pKey(s) {}
470
471 EllipseKey(EllipseKey const&) noexcept = default;
472 EllipseKey(EllipseKey&&) noexcept = default;
473 EllipseKey& operator=(EllipseKey const&) noexcept = default;
474 EllipseKey& operator=(EllipseKey&&) noexcept = default;
475 ~EllipseKey() noexcept override = default;
476
478 geom::ellipses::Ellipse get(BaseRecord const& record) const override;
479
481 void set(BaseRecord& record, geom::ellipses::Ellipse const& value) const override;
482
484
485 bool operator==(EllipseKey const& other) const noexcept {
486 return _qKey == other._qKey && _pKey == other._pKey;
487 }
488 bool operator!=(EllipseKey const& other) const noexcept { return !(*this == other); }
490
492 std::size_t hash_value() const noexcept {
493 // Completely arbitrary seed
494 return utils::hashCombine(17, _qKey, _pKey);
495 }
496
498 bool isValid() const noexcept { return _qKey.isValid() && _pKey.isValid(); }
499
501
502 QuadrupoleKey getCore() const noexcept { return _qKey; }
503 PointKey<double> getCenter() const noexcept { return _pKey; }
505
506private:
507 QuadrupoleKey _qKey;
508 PointKey<double> _pKey;
509};
510
511template <typename T, int N>
512class CovarianceMatrixKey : public FunctorKey<Eigen::Matrix<T, N, N> > {
513public:
517
532 std::string const& unit, bool diagonalOnly = false);
533
549 NameArray const& units, bool diagonalOnly = false);
550
553
572 explicit CovarianceMatrixKey(ErrKeyArray const& err,
574
586 CovarianceMatrixKey(SubSchema const& s, NameArray const& names);
587
592 ~CovarianceMatrixKey() noexcept override;
593
595 Eigen::Matrix<T, N, N> get(BaseRecord const& record) const override;
596
598 void set(BaseRecord& record, Eigen::Matrix<T, N, N> const& value) const override;
599
601 T getElement(BaseRecord const& record, int i, int j) const;
602
604 void setElement(BaseRecord& record, int i, int j, T value) const;
605
612 bool isValid() const noexcept;
613
615
616 bool operator==(CovarianceMatrixKey const& other) const noexcept;
617 bool operator!=(CovarianceMatrixKey const& other) const noexcept { return !(*this == other); }
619
621 std::size_t hash_value() const noexcept;
622
623private:
624 ErrKeyArray _err;
626};
627} // namespace table
628} // namespace afw
629} // namespace lsst
630
631namespace std {
632template <typename T>
633struct hash<lsst::afw::table::PointKey<T>> {
636 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
637};
638
639template <typename T>
640struct hash<lsst::afw::table::BoxKey<T>> {
643 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
644};
645
646template <>
647struct hash<lsst::afw::table::CoordKey> {
650 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
651};
652
653template <>
654struct hash<lsst::afw::table::QuadrupoleKey> {
657 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
658};
659
660template <>
661struct hash<lsst::afw::table::EllipseKey> {
664 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
665};
666
667template <typename T, int N>
668struct hash<lsst::afw::table::CovarianceMatrixKey<T, N>> {
671 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
672};
673} // namespace std
674
675#endif // !AFW_TABLE_aggregates_h_INCLUDED
table::Key< std::string > name
Definition: Amplifier.cc:116
int min
int max
double x
double z
Definition: Match.cc:44
double dec
Definition: Match.cc:41
std::string prefix
Definition: SchemaMapper.cc:72
int y
Definition: SpanSet.cc:48
table::Schema schema
Definition: python.h:134
Base class for all records.
Definition: BaseRecord.h:31
A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of Point3Keys.
Definition: aggregates.h:206
BoxKey(BoxKey const &) noexcept=default
bool operator!=(BoxKey const &other) const noexcept
Definition: aggregates.h:264
bool isValid() const noexcept
Return True if both the min and max PointKeys are valid.
Definition: aggregates.h:268
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:250
Box get(BaseRecord const &record) const override
Get a Box from the given record.
Definition: aggregates.cc:94
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:86
PointKey< Element > getMin() const noexcept
Return the underlying min PointKey.
Definition: aggregates.h:271
PointKey< Element > getMax() const noexcept
Return the underlying max PointKey.
Definition: aggregates.h:274
typename Box::Element Element
Type of coordinate elements (i.e. int or double).
Definition: aggregates.h:209
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.
Definition: aggregates.h:263
BoxKey(BoxKey &&) noexcept=default
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
Definition: aggregates.h:241
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
Definition: aggregates.h:290
bool operator!=(CoordKey const &other) const noexcept
Definition: aggregates.h:334
CoordKey(Key< lsst::geom::Angle > const &ra, Key< lsst::geom::Angle > const &dec) noexcept
Construct from a pair of Keys.
Definition: aggregates.h:306
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:109
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
Definition: aggregates.h:317
CoordKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:303
Key< lsst::geom::Angle > getDec() const noexcept
Definition: aggregates.h:348
Key< lsst::geom::Angle > getRa() const noexcept
Return a constituent Key.
Definition: aggregates.h:347
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:338
CoordKey(CoordKey &&) noexcept=default
bool isValid() const noexcept
Definition: aggregates.h:343
CoordKey(CoordKey const &) noexcept=default
lsst::geom::SpherePoint get(BaseRecord const &record) const override
Get an lsst::geom::SpherePoint from the given record.
Definition: aggregates.cc:115
CovarianceMatrixKey()
Construct an invalid instance; must assign before subsequent use.
CovarianceMatrixKey(CovarianceMatrixKey const &)
Eigen::Matrix< T, N, N > get(BaseRecord const &record) const override
Get a covariance matrix from the given record.
Definition: aggregates.cc:285
void setElement(BaseRecord &record, int i, int j, T value) const
Set the element in row i and column j.
Definition: aggregates.cc:375
CovarianceMatrixKey & operator=(CovarianceMatrixKey &&)
T getElement(BaseRecord const &record, int i, int j) const
Return the element in row i and column j.
Definition: aggregates.cc:362
~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.
Definition: aggregates.cc:167
std::vector< Key< T > > ErrKeyArray
Definition: aggregates.h:514
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.cc:355
std::vector< Key< T > > CovarianceKeyArray
Definition: aggregates.h:515
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
Definition: aggregates.cc:320
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.
Definition: aggregates.h:440
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.
Definition: aggregates.cc:148
PointKey< double > getCenter() const noexcept
Definition: aggregates.h:503
geom::ellipses::Ellipse get(BaseRecord const &record) const override
Get an Ellipse from the given record.
Definition: aggregates.cc:155
EllipseKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:456
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:492
bool operator!=(EllipseKey const &other) const noexcept
Definition: aggregates.h:488
EllipseKey(EllipseKey const &) noexcept=default
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
Definition: aggregates.h:469
QuadrupoleKey getCore() const noexcept
Return constituent FunctorKeys.
Definition: aggregates.h:502
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition: aggregates.h:498
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey) noexcept
Construct from individual Keys.
Definition: aggregates.h:459
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
Definition: FunctorKey.h:74
A class used as a handle to a particular field in a table.
Definition: Key.h:53
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Definition: Key.h:97
A FunctorKey used to get or set a lsst::geom::Point3 from an (x,y,z) tuple of int or double Keys.
Definition: aggregates.h:124
Key< T > getX() const noexcept
Return the underlying x Key.
Definition: aggregates.h:183
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:174
bool operator!=(Point3Key< T > const &other) const noexcept
Definition: aggregates.h:170
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.
Definition: aggregates.h:168
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.
Definition: aggregates.cc:60
Key< T > getY() const noexcept
Return the underlying y Key.
Definition: aggregates.h:186
Point3Key() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:139
Key< T > getZ() const noexcept
Return the underlying y Key.
Definition: aggregates.h:189
lsst::geom::Point< T, 3 > get(BaseRecord const &record) const override
Get a Point from the given record.
Definition: aggregates.cc:69
Point3Key(Key< T > const &x, Key< T > const &y, Key< T > const &z) noexcept
Construct from a pair of Keys.
Definition: aggregates.h:142
bool isValid() const noexcept
Return True if all of the x, y, and z Keys are valid.
Definition: aggregates.h:180
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
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:98
PointKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:64
Key< T > getY() const noexcept
Return the underlying y Key.
Definition: aggregates.h:110
PointKey(PointKey const &) noexcept=default
PointKey(PointKey &&) noexcept=default
bool operator!=(PointKey< T > const &other) const noexcept
Definition: aggregates.h:94
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
PointKey(Key< T > const &x, Key< T > const &y) noexcept
Construct from a pair of Keys.
Definition: aggregates.h:67
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
Key< T > getX() const noexcept
Return the underlying x Key.
Definition: aggregates.h:107
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
Definition: aggregates.h:104
lsst::geom::Point< T, 2 > get(BaseRecord const &record) const override
Get a Point from the given record.
Definition: aggregates.cc:44
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
Definition: aggregates.h:362
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition: aggregates.h:416
Key< double > getIxx() const noexcept
Return a constituent Key.
Definition: aggregates.h:426
geom::ellipses::Quadrupole get(BaseRecord const &record) const override
Get a Quadrupole from the given record.
Definition: aggregates.cc:136
QuadrupoleKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition: aggregates.h:379
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
Definition: aggregates.h:393
QuadrupoleKey(QuadrupoleKey const &) noexcept=default
Key< double > getIxy() const noexcept
Definition: aggregates.h:428
Key< double > getIyy() const noexcept
Definition: aggregates.h:427
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:126
QuadrupoleKey(Key< double > const &ixx, Key< double > const &iyy, Key< double > const &ixy) noexcept
Construct from individual Keys.
Definition: aggregates.h:382
QuadrupoleKey(QuadrupoleKey &&) noexcept=default
bool operator!=(QuadrupoleKey const &other) const noexcept
Definition: aggregates.h:412
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition: aggregates.h:422
Defines the fields and offsets for a table.
Definition: Schema.h:51
A proxy type for name lookups in a Schema.
Definition: Schema.h:367
A coordinate class intended to represent absolute positions.
Definition: Point.h:169
Point in an unspecified spherical coordinate system.
Definition: SpherePoint.h:57
daf::base::PropertySet * set
Definition: fits.cc:927
CoordinateType
Enum used to set units for geometric FunctorKeys.
Definition: aggregates.h:357
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
Definition: hashCombine.h:35
STL namespace.
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:643
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:650
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:671
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:664
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:636
size_t operator()(argument_type const &obj) const noexcept
Definition: aggregates.h:657