lsst.afw  14.0-23-g38c323faa+3
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::base
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 protected:
64 };
65 
68 public:
69  typedef double MeasValue;
70  typedef double ErrValue;
71  typedef Key<double> MeasKey;
72  typedef Key<double> ErrKey;
73 
75  explicit FluxSlotDefinition(std::string const& name) : SlotDefinition(name) {}
76 
78  bool isValid() const { return _measKey.isValid(); }
79 
81  MeasKey getMeasKey() const { return _measKey; }
82 
84  ErrKey getErrKey() const { return _errKey; }
85 
87  Key<Flag> getFlagKey() const { return _flagKey; }
88 
99  void setKeys(std::string const& alias, Schema const& schema);
100 
101 private:
102  MeasKey _measKey;
103  ErrKey _errKey;
104  Key<Flag> _flagKey;
105 };
106 
109 public:
111  typedef Eigen::Matrix<float, 2, 2> ErrValue;
112  typedef Point2DKey MeasKey;
114 
117 
119  bool isValid() const { return _measKey.isValid(); }
120 
122  MeasKey getMeasKey() const { return _measKey; }
123 
125  ErrKey getErrKey() const { return _errKey; }
126 
128  Key<Flag> getFlagKey() const { return _flagKey; }
129 
140  void setKeys(std::string const& alias, Schema const& schema);
141 
142 private:
143  MeasKey _measKey;
144  ErrKey _errKey;
145  Key<Flag> _flagKey;
146 };
147 
150 public:
152  typedef Eigen::Matrix<float, 3, 3> ErrValue;
155 
158 
160  bool isValid() const { return _measKey.isValid(); }
161 
163  MeasKey getMeasKey() const { return _measKey; }
164 
166  ErrKey getErrKey() const { return _errKey; }
167 
169  Key<Flag> getFlagKey() const { return _flagKey; }
170 
181  void setKeys(std::string const& alias, Schema const& schema);
182 
183 private:
184  MeasKey _measKey;
185  ErrKey _errKey;
186  Key<Flag> _flagKey;
187 };
188 
195 struct SlotSuite {
203 
205  void handleAliasChange(std::string const& alias, Schema const& schema);
206 
208  explicit SlotSuite(Schema const& schema);
209 };
210 }
211 }
212 } // lsst::afw::table
213 
214 #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:46
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:78
table::Key< std::string > name
Definition: ApCorrMap.cc:71
Key< double > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:72
QuadrupoleKey MeasKey
Key type used to access the slot measurement.
Definition: slots.h:153
std::string const & _name
Definition: Mask.cc:566
CovarianceMatrixKey< float, 3 > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:154
FluxSlotDefinition defCalibFlux
Definition: slots.h:200
afw::table::Schema schema
Definition: GaussianPsf.cc:43
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:122
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:196
CovarianceMatrixKey< float, 2 > ErrKey
Key type used to access the slot uncertainty.
Definition: slots.h:113
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:169
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:81
CentroidSlotDefinition defCentroid
Definition: slots.h:201
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:163
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:125
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:195
STL class.
Point2DKey MeasKey
Key type used to access the slot measurement.
Definition: slots.h:112
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:119
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:157
Key< double > MeasKey
Key type used to access the slot measurement.
Definition: slots.h:71
ShapeSlotDefinition defShape
Definition: slots.h:202
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:166
FluxSlotDefinition defModelFlux
Definition: slots.h:199
geom::ellipses::Quadrupole MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:151
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:128
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:87
FluxSlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "PsfFlux")
Definition: slots.h:75
FluxSlotDefinition defInstFlux
Definition: slots.h:198
Key specialization for Flag.
Definition: Flag.h:79
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:152
SlotDefinition specialization for centroids.
Definition: slots.h:108
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:116
geom::Point2D MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:110
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:70
SlotDefinition specialization for shapes.
Definition: slots.h:149
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:183
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:69
SlotDefinition specialization for fluxes.
Definition: slots.h:67
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:160
FluxSlotDefinition defApFlux
Definition: slots.h:197
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:84
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:111