LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
LSSTDataManagementBasePackage
slots.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 #ifndef LSST_AFW_TABLE_slots_h_INCLUDED
3 #define LSST_AFW_TABLE_slots_h_INCLUDED
4 
6 
7 namespace lsst {
8 
9 namespace daf {
10 namespace base {
11 class PropertySet;
12 }
13 } // namespace daf
14 
15 namespace afw {
16 
17 namespace fits {
18 class Fits;
19 }; // namespace fits
20 
21 namespace table {
22 
48 public:
50  explicit SlotDefinition(std::string const &name) : _name(name) {}
51 
53  std::string getName() const { return _name; }
54 
60  std::string getAlias() const { return "slot_" + _name; }
61 
62  SlotDefinition(SlotDefinition const &) = default;
63  SlotDefinition(SlotDefinition &&) = default;
64  SlotDefinition &operator=(SlotDefinition const &) = default;
65  SlotDefinition &operator=(SlotDefinition &&) = default;
66  ~SlotDefinition() = default;
67 
68 protected:
70 };
71 
74 public:
75  typedef double MeasValue;
76  typedef double ErrValue;
77  typedef Key<double> MeasKey;
78  typedef Key<double> ErrKey;
79 
81  explicit FluxSlotDefinition(std::string const &name) : SlotDefinition(name) {}
82 
84  bool isValid() const { return _measKey.isValid(); }
85 
87  MeasKey getMeasKey() const { return _measKey; }
88 
90  ErrKey getErrKey() const { return _errKey; }
91 
93  Key<Flag> getFlagKey() const { return _flagKey; }
94 
105  void setKeys(std::string const &alias, Schema const &schema);
106 
107  FluxSlotDefinition(FluxSlotDefinition const &) = default;
109  FluxSlotDefinition &operator=(FluxSlotDefinition const &) = default;
110  FluxSlotDefinition &operator=(FluxSlotDefinition &&) = default;
111  ~FluxSlotDefinition() = default;
112 
113 private:
114  MeasKey _measKey;
115  ErrKey _errKey;
116  Key<Flag> _flagKey;
117 };
118 
121 public:
123  typedef Eigen::Matrix<float, 2, 2> ErrValue;
124  typedef Point2DKey MeasKey;
126 
129 
131  bool isValid() const { return _measKey.isValid(); }
132 
134  MeasKey getMeasKey() const { return _measKey; }
135 
137  ErrKey getErrKey() const { return _errKey; }
138 
140  Key<Flag> getFlagKey() const { return _flagKey; }
141 
152  void setKeys(std::string const &alias, Schema const &schema);
153 
156  CentroidSlotDefinition &operator=(CentroidSlotDefinition const &) = default;
157  CentroidSlotDefinition &operator=(CentroidSlotDefinition &&) = default;
158  ~CentroidSlotDefinition() = default;
159 
160 private:
161  MeasKey _measKey;
162  ErrKey _errKey;
163  Key<Flag> _flagKey;
164 };
165 
168 public:
170  typedef Eigen::Matrix<float, 3, 3> ErrValue;
173 
176 
178  bool isValid() const { return _measKey.isValid(); }
179 
181  MeasKey getMeasKey() const { return _measKey; }
182 
184  ErrKey getErrKey() const { return _errKey; }
185 
187  Key<Flag> getFlagKey() const { return _flagKey; }
188 
199  void setKeys(std::string const &alias, Schema const &schema);
200 
201  ShapeSlotDefinition(ShapeSlotDefinition const &) = default;
203  ShapeSlotDefinition &operator=(ShapeSlotDefinition const &) = default;
204  ShapeSlotDefinition &operator=(ShapeSlotDefinition &&) = default;
205  ~ShapeSlotDefinition() = default;
206 
207 private:
208  MeasKey _measKey;
209  ErrKey _errKey;
210  Key<Flag> _flagKey;
211 };
212 
219 struct SlotSuite {
227 
229  void handleAliasChange(std::string const &alias, Schema const &schema);
230 
232  explicit SlotSuite(Schema const &schema);
233 };
234 } // namespace table
235 } // namespace afw
236 } // namespace lsst
237 
238 #endif // !LSST_AFW_TABLE_slots_h_INCLUDED
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
Defines the fields and offsets for a table.
Definition: Schema.h:50
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:84
Key< double > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:78
QuadrupoleKey MeasKey
Key type used to access the slot measurement.
Definition: slots.h:171
CovarianceMatrixKey< float, 3 > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:172
FluxSlotDefinition defCalibFlux
Definition: slots.h:224
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:134
SlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "Centroid" or "PsfFlux") ...
Definition: slots.h:50
FluxSlotDefinition defPsfFlux
Definition: slots.h:220
CovarianceMatrixKey< float, 2 > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:125
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:187
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:87
CentroidSlotDefinition defCentroid
Definition: slots.h:225
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:181
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:137
Fits * fits
Definition: FitsWriter.cc:90
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
STL class.
Point2DKey MeasKey
Key type used to access the slot measurement.
Definition: slots.h:124
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:131
A base class for image defects.
ShapeSlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "Shape")
Definition: slots.h:175
Key< double > MeasKey
Key type used to access the slot measurement.
Definition: slots.h:77
ShapeSlotDefinition defShape
Definition: slots.h:226
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:184
table::Schema schema
Definition: Amplifier.cc:115
FluxSlotDefinition defModelFlux
Definition: slots.h:223
geom::ellipses::Quadrupole MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:169
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:140
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:93
FluxSlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "PsfFlux")
Definition: slots.h:81
lsst::geom::Point2D MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:122
Definition: __init__.py:1
Key specialization for Flag.
Definition: Flag.h:94
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
SlotDefinition specialization for centroids.
Definition: slots.h:120
std::string getName() const
Return the name of the slot (e.g. "Centroid" or "PsfFlux")
Definition: slots.h:53
std::string getAlias() const
Return the alias field prefix used to lookup Keys for the slot.
Definition: slots.h:60
CentroidSlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "Centroid")
Definition: slots.h:128
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
SlotDefinition specialization for shapes.
Definition: slots.h:167
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:282
FluxSlotDefinition defGaussianFlux
Definition: slots.h:222
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
SlotDefinition specialization for fluxes.
Definition: slots.h:73
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:178
FluxSlotDefinition defApFlux
Definition: slots.h:221
Base class for helper classes that define slots on SourceTable/SourceRecord.
Definition: slots.h:47
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:90
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123