LSST Applications  21.0.0+04719a4bac,21.0.0-1-ga51b5d4+ae94e5adf4,21.0.0-10-g2408eff+ad7fe00a3b,21.0.0-10-g560fb7b+5d30037bff,21.0.0-10-gcf60f90+7fd8e8fd04,21.0.0-11-g25eff31+491f1498e8,21.0.0-11-gd78879e+d13a45ff19,21.0.0-12-g1e69a3f+69d54d99d8,21.0.0-17-g6590b197+c8c705a94e,21.0.0-2-g103fe59+29086b68f8,21.0.0-2-g1367e85+d793a9824f,21.0.0-2-g45278ab+04719a4bac,21.0.0-2-g5242d73+d793a9824f,21.0.0-2-g7f82c8f+7178d1fb8b,21.0.0-2-g8f08a60+fd0b970de5,21.0.0-2-g8faa9b5+3b24369756,21.0.0-2-ga326454+7178d1fb8b,21.0.0-2-gde069b7+ca45a81b40,21.0.0-2-gecfae73+3609a557ba,21.0.0-2-gfc62afb+d793a9824f,21.0.0-22-g2a5702db6+f385fa6f38,21.0.0-3-g357aad2+673ab9f056,21.0.0-3-g4be5c26+d793a9824f,21.0.0-3-g65f322c+45176dc65e,21.0.0-3-g7d9da8d+3b24369756,21.0.0-3-ge02ed75+d05e6d1be4,21.0.0-4-g591bb35+d05e6d1be4,21.0.0-4-g65b4814+5d30037bff,21.0.0-4-gccdca77+a631590478,21.0.0-4-ge8a399c+7f1b116a8b,21.0.0-5-gb7b9a9f+d793a9824f,21.0.0-5-gd00fb1e+de3bd29da1,21.0.0-55-g0be6b205+66ae927d20,21.0.0-6-g2d4f3f3+04719a4bac,21.0.0-7-g04766d7+510a52a951,21.0.0-7-g98eecf7+adb4d61a8d,21.0.0-9-g39e06b5+d05e6d1be4,master-gac4afde19b+d05e6d1be4,w.2021.12
LSST Data Management Base Package
Detector.cc
Go to the documentation of this file.
1 /*
3  * Developed for the LSST Data Management System.
4  * This product includes software developed by the LSST Project
5  * (https://www.lsst.org).
6  * See the COPYRIGHT file at the top-level directory of this distribution
7  * for details of code ownership.
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 GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 #include <sstream>
23 #include <utility>
24 #include <unordered_set>
25 
32 
33 namespace lsst {
34 namespace afw {
35 namespace cameraGeom {
36 
37 namespace {
38 
40 
41 // Find the amplifier with the given name in an iterator range.
42 //
43 // @tparam Iter iterator that dererences to a [smart] pointer to Amplifier.
44 template <typename Iter>
45 Iter findAmpIterByName(Iter first, Iter last, std::string const & name) {
46  auto iter = std::find_if(first, last, [&name](auto const & ptr) { return ptr->getName() == name; });
47  if (iter == last) {
48  throw LSST_EXCEPT(
49  pex::exceptions::InvalidParameterError,
50  (boost::format("Amplifier with name %s not found.") % name).str()
51  );
52  }
53  return iter;
54 }
55 
56 } // anonymous
57 
59  return std::make_shared<PartialRebuilder>(*this);
60 }
61 
64  auto nativeToCameraSys = _transformMap->getTransform(getNativeCoordSys(), cameraSys);
65  return nativeToCameraSys->applyForward(nativeCorners);
66 }
67 
69  return getCorners(makeCameraSys(cameraSysPrefix));
70 }
71 
73  auto ctrPix = lsst::geom::Box2D(getBBox()).getCenter();
74  auto transform = getTransform(PIXELS, cameraSys);
75  return transform->applyForward(ctrPix);
76 }
77 
79  return getCenter(makeCameraSys(cameraSysPrefix));
80 }
81 
82 bool Detector::hasTransform(CameraSys const &cameraSys) const { return _transformMap->contains(cameraSys); }
83 
84 bool Detector::hasTransform(CameraSysPrefix const &cameraSysPrefix) const {
85  return hasTransform(makeCameraSys(cameraSysPrefix));
86 }
87 
88 template <typename FromSysT, typename ToSysT>
90  ToSysT const &toSys) const {
91  return _transformMap->getTransform(makeCameraSys(fromSys), makeCameraSys(toSys));
92 }
93 
94 template <typename FromSysT, typename ToSysT>
95 lsst::geom::Point2D Detector::transform(lsst::geom::Point2D const &point, FromSysT const &fromSys,
96  ToSysT const &toSys) const {
97  return _transformMap->transform(point, makeCameraSys(fromSys), makeCameraSys(toSys));
98 }
99 
100 template <typename FromSysT, typename ToSysT>
102  FromSysT const &fromSys, ToSysT const &toSys) const {
103  return _transformMap->transform(points, makeCameraSys(fromSys), makeCameraSys(toSys));
104 }
105 
107  return *findAmpIterByName(_amplifiers.begin(), _amplifiers.end(), name);
108 }
109 
110 namespace {
111 
112 void checkForDuplicateAmpNames(AmpVector const & amplifiers) {
113  std::unordered_set<std::string> amplifierNames;
114  for (auto const &ptr : amplifiers) {
115  if (!amplifierNames.insert(ptr->getName()).second) {
117  (boost::format("Multiple amplifiers with name %s") % ptr->getName()).str());
118  }
119  }
120 }
121 
122 void checkCrosstalkShape(Detector::CrosstalkMatrix const & crosstalk, std::size_t nAmps,
123  std::string const & detectorName) {
124  auto shape = crosstalk.getShape();
125  assert(shape.size() == 2); // we've declared this as a 2D array
126  if (shape[0] != shape[1]) {
128  os << "Non-square crosstalk matrix: " << crosstalk << " for detector \"" << detectorName << "\"";
130  }
131  if (shape[0] != nAmps) {
133  os << "Wrong size crosstalk matrix: " << crosstalk << " for detector \"" << detectorName << "\"";
135  }
136 }
137 
138 } // anonymous
139 
140 Detector::Detector(Fields fields, std::shared_ptr<TransformMap const> transformMap,
141  AmpVector &&amplifiers) :
142  _fields(std::move(fields)), _transformMap(std::move(transformMap)), _amplifiers(std::move(amplifiers))
143 {
144  checkForDuplicateAmpNames(_amplifiers);
145  if (hasCrosstalk()) {
146  checkCrosstalkShape(getCrosstalk(), _amplifiers.size(), getName());
147  }
148 }
149 
150 namespace {
151 
152 class PersistenceHelper {
153 public:
154 
155  static PersistenceHelper const & get() {
156  static PersistenceHelper const instance;
157  return instance;
158  }
159 
160  table::Schema schema;
161  table::Key<std::string> name;
162  table::Key<int> id;
163  table::Key<int> type;
164  table::Key<std::string> serial;
169  table::Key<lsst::geom::Angle> yaw;
170  table::Key<lsst::geom::Angle> pitch;
171  table::Key<lsst::geom::Angle> roll;
172  table::Key<int> transformMap;
173  table::Key<table::Array<float>> crosstalk;
174  table::Key<std::string> physicalType;
175 
176  PersistenceHelper(table::Schema const & existing) :
177  schema(existing),
178  name(schema["name"]),
179  id(schema["id"]),
180  type(schema["type"]),
181  serial(schema["serial"]),
182  bbox(schema["bbox"]),
183  pixelSize(schema["pixelSize"]),
184  fpPosition(schema["fpPosition"]),
185  refPoint(schema["refPoint"]),
186  yaw(schema["yaw"]),
187  pitch(schema["pitch"]),
188  roll(schema["roll"]),
189  transformMap(schema["transformMap"]),
190  crosstalk(schema["crosstalk"])
191  {
192  auto setKeyIfPresent = [this](auto & key, std::string const & name) {
193  try {
194  key = schema[name];
195  } catch (pex::exceptions::NotFoundError &) {}
196  };
197  // This field was not part of the original Detector minimal
198  // schema, but needed to be added
199  setKeyIfPresent(physicalType, "physicalType");
200  }
201 
202 private:
203 
204  PersistenceHelper() :
205  schema(),
206  name(schema.addField<std::string>("name", "Name of the detector", "", 0)),
207  id(schema.addField<int>("id", "Integer ID for the detector", "")),
208  type(schema.addField<int>("type", "Raw DetectorType enum value", "")),
209  serial(schema.addField<std::string>("serial", "Serial name of the detector", "", 0)),
210  bbox(table::Box2IKey::addFields(schema, "bbox", "Detector bounding box", "pixel")),
211  pixelSize(table::Point2DKey::addFields(schema, "pixelSize", "Physical pixel size", "mm")),
212  fpPosition(table::Point2DKey::addFields(schema, "fpPosition",
213  "Focal plane position of reference point", "mm")),
214  refPoint(table::Point2DKey::addFields(schema, "refPoint",
215  "Pixel position of reference point", "pixel")),
216  yaw(schema.addField<lsst::geom::Angle>("yaw", "Rotation about Z (X to Y), 1st rotation")),
217  pitch(schema.addField<lsst::geom::Angle>("pitch", "Rotation about Y' (Z'=Z to X'), 2nd rotation")),
218  roll(schema.addField<lsst::geom::Angle>("roll", "Rotation about X'' (Y''=Y' to Z''), 3rd rotation")),
219  transformMap(schema.addField<int>("transformMap", "Archive ID of TransformMap", "")),
220  crosstalk(schema.addField<table::Array<float>>("crosstalk", "Crosstalk matrix, flattened", "", 0)),
221  physicalType(schema.addField<std::string>("physicalType", "Physical type of the detector", "", 0))
222  {}
223 
224  PersistenceHelper(PersistenceHelper const &) = delete;
225  PersistenceHelper(PersistenceHelper &&) = delete;
226 
227  PersistenceHelper & operator=(PersistenceHelper const &) = delete;
228  PersistenceHelper & operator=(PersistenceHelper &&) = delete;
229 
230 };
231 
232 } // anonymous
233 
235 public:
236 
237  Factory() : PersistableFactory("Detector") {}
238 
240  CatalogVector const& catalogs) const override {
241  // N.b. can't use "auto const keys" as cctor is deleted
242  auto const & keys = PersistenceHelper(catalogs.front().getSchema());
243 
244  LSST_ARCHIVE_ASSERT(catalogs.size() == 2u);
245  LSST_ARCHIVE_ASSERT(catalogs.front().getSchema() == keys.schema);
246  LSST_ARCHIVE_ASSERT(catalogs.front().size() == 1u);
247  auto const & record = catalogs.front().front();
248 
249  AmpVector amps;
250  amps.reserve(catalogs.back().size());
251  for (auto const & record : catalogs.back()) {
252  amps.push_back(Amplifier::Builder::fromRecord(record).finish());
253  }
254 
255  auto flattenedMatrix = record.get(keys.crosstalk);
256  ndarray::Array<float, 2, 2> crosstalk;
257  if (!flattenedMatrix.isEmpty()) {
258  crosstalk = ndarray::allocate(amps.size(), amps.size());
259  ndarray::flatten<1>(crosstalk) = flattenedMatrix;
260  }
261 
262  // get values for not-always-present fields if present
263  const auto physicalType = keys.physicalType.isValid() ? record.get(keys.physicalType) : "";
264  Fields fields = {
265  record.get(keys.name),
266  record.get(keys.id),
267  static_cast<DetectorType>(record.get(keys.type)),
268  record.get(keys.serial),
269  record.get(keys.bbox),
270  Orientation(
271  record.get(keys.fpPosition),
272  record.get(keys.refPoint),
273  record.get(keys.yaw),
274  record.get(keys.pitch),
275  record.get(keys.roll)
276  ),
277  lsst::geom::Extent2D(record.get(keys.pixelSize)),
278  crosstalk,
280  };
281 
283  new Detector(
284  std::move(fields),
285  archive.get<TransformMap>(record.get(keys.transformMap)),
286  std::move(amps)
287  )
288  );
289  }
290 
291  static Factory const registration;
292 
293 };
294 
296 
297 std::string Detector::getPersistenceName() const {
298  return "Detector";
299 }
300 
301 std::string Detector::getPythonModule() const {
302  return "lsst.afw.cameraGeom";
303 }
304 
305 void Detector::write(OutputArchiveHandle& handle) const {
306  auto const & keys = PersistenceHelper::get();
307 
308  auto cat = handle.makeCatalog(keys.schema);
309  auto record = cat.addNew();
310  record->set(keys.name, getName());
311  record->set(keys.id, getId());
312  record->set(keys.type, static_cast<int>(getType()));
313  record->set(keys.serial, getSerial());
314  record->set(keys.bbox, getBBox());
315  record->set(keys.pixelSize, lsst::geom::Point2D(getPixelSize()));
316  auto orientation = getOrientation();
317  record->set(keys.fpPosition, orientation.getFpPosition());
318  record->set(keys.refPoint, orientation.getReferencePoint());
319  record->set(keys.yaw, orientation.getYaw());
320  record->set(keys.pitch, orientation.getPitch());
321  record->set(keys.roll, orientation.getRoll());
322  record->set(keys.transformMap, handle.put(getTransformMap()));
323 
324  auto flattenMatrix = [](ndarray::Array<float const, 2> const & matrix) {
325  // copy because the original isn't guaranteed to have
326  // row-major contiguous elements
327  ndarray::Array<float, 2, 2> copied = ndarray::copy(matrix);
328  // make a view to the copy
329  ndarray::Array<float, 1, 1> flattened = ndarray::flatten<1>(copied);
330  return flattened;
331  };
332 
333  record->set(keys.crosstalk, flattenMatrix(getCrosstalk()));
334  record->set(keys.physicalType, getPhysicalType());
335  handle.saveCatalog(cat);
336 
337  auto ampCat = handle.makeCatalog(Amplifier::getRecordSchema());
338  ampCat.reserve(getAmplifiers().size());
339  for (auto const & amp : getAmplifiers()) {
340  auto record = ampCat.addNew();
341  amp->toRecord(*record);
342  }
343  handle.saveCatalog(ampCat);
344 }
345 
346 
348  return *findAmpIterByName(_amplifiers.begin(), _amplifiers.end(), name);
349 }
350 
352  _amplifiers.push_back(std::move(builder));
353 }
354 
356  Detector const & detector
357 ) {
359  result.reserve(detector.size());
360  for (auto const & ampPtr : detector) {
361  result.push_back(std::make_shared<Amplifier::Builder>(*ampPtr));
362  }
363  return result;
364 }
365 
367  _fields.name = name;
368  _fields.id = id;
369 }
370 
371 Detector::Builder::~Builder() noexcept = default;
372 
373 AmpVector Detector::Builder::finishAmplifiers() const {
374  AmpVector result;
375  result.reserve(_amplifiers.size());
376  for (auto const & ampBuilderPtr : _amplifiers) {
377  result.push_back(ampBuilderPtr->finish());
378  }
379  return result;
380 }
381 
382 
384  Builder(detector._fields, rebuildAmplifiers(detector)),
385  _transformMap(detector.getTransformMap())
386 {}
387 
389  return std::shared_ptr<Detector>(new Detector(getFields(), _transformMap, finishAmplifiers()));
390 }
391 
392 
393 namespace {
394 
395 // Return the first connection in the given range that has toSys as its "to"
396 // endpoint.
397 //
398 // @tparam Iter Iterator that dereferences to `Connection const &`.
399 //
400 template <typename Iter>
401 Iter findConnection(Iter first, Iter last, CameraSys const & toSys) {
402  return std::find_if(
403  first, last,
404  [&toSys](auto const & connection) {
405  return connection.toSys == toSys;
406  }
407  );
408 }
409 
410 } // anonymous
411 
412 
414  CameraSysPrefix const & toSys,
416 ) {
417  return setTransformFromPixelsTo(makeCameraSys(toSys), std::move(transform));
418 }
419 
421  CameraSys const & toSys,
423 ) {
424  if (toSys.getDetectorName() != getName()) {
425  throw LSST_EXCEPT(
427  (boost::format("Cannot add coordinate system for detector '%s' to detector '%s'.") %
428  toSys.getDetectorName() % getName()).str()
429  );
430  }
431  auto iter = findConnection(_connections.begin(), _connections.end(), toSys);
432  if (iter == _connections.end()) {
433  _connections.push_back(
435  );
436  } else {
437  iter->transform = transform;
438  }
439 }
440 
442  return discardTransformFromPixelsTo(makeCameraSys(toSys));
443 }
444 
446  if (toSys.getDetectorName() != getName()) {
447  throw LSST_EXCEPT(
449  (boost::format("Cannot add coordinate system for detector '%s' to detector '%s'.") %
450  toSys.getDetectorName() % getName()).str()
451  );
452  }
453  auto iter = findConnection(_connections.begin(), _connections.end(), toSys);
454  if (iter != _connections.end()) {
455  _connections.erase(iter);
456  return true;
457  }
458  return false;
459 }
460 
461 
462 Detector::InCameraBuilder::InCameraBuilder(Detector const & detector) :
463  Builder(detector.getFields(), rebuildAmplifiers(detector))
464 {}
465 
466 Detector::InCameraBuilder::InCameraBuilder(std::string const & name, int id) :
467  Builder(name, id)
468 {}
469 
470 
471 std::shared_ptr<Detector const> Detector::InCameraBuilder::finish(
473 ) const {
474  auto amplifiers = finishAmplifiers();
476  new Detector(getFields(), std::move(transformMap), std::move(amplifiers))
477  );
478 }
479 
480 
481 //
482 // Explicit instantiations
483 //
484 #define INSTANTIATE(FROMSYS, TOSYS) \
485  template std::shared_ptr<geom::TransformPoint2ToPoint2> Detector::getTransform(FROMSYS const &, \
486  TOSYS const &) const; \
487  template lsst::geom::Point2D Detector::transform(lsst::geom::Point2D const &, FROMSYS const &, \
488  TOSYS const &) const; \
489  template std::vector<lsst::geom::Point2D> Detector::transform(std::vector<lsst::geom::Point2D> const &, \
490  FROMSYS const &, TOSYS const &) const;
491 
492 INSTANTIATE(CameraSys, CameraSys);
493 INSTANTIATE(CameraSys, CameraSysPrefix);
494 INSTANTIATE(CameraSysPrefix, CameraSys);
495 INSTANTIATE(CameraSysPrefix, CameraSysPrefix);
496 
497 } // namespace cameraGeom
498 
499 namespace table {
500 namespace io {
501 
502 template class PersistableFacade<cameraGeom::Detector>;
503 
504 } // namespace io
505 } // namespace table
506 
507 
508 } // namespace afw
509 } // namespace lsst
py::object result
Definition: _schema.cc:430
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
uint64_t * ptr
Definition: RangeSet.cc:88
Key< U > key
Definition: Schema.cc:281
std::ostream * os
Definition: Schema.cc:746
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:48
T back(T... args)
static Builder fromRecord(table::BaseRecord const &record)
Construct a new Builder object from the fields in the given record.
Definition: Amplifier.cc:286
static table::Schema getRecordSchema()
Return the schema used in the afw.table representation of amplifiers.
Definition: Amplifier.cc:267
Camera coordinate system; used as a key in in TransformMap.
Definition: CameraSys.h:83
std::string getDetectorName() const
Get detector name, or "" if not a detector-specific coordinate system.
Definition: CameraSys.h:120
Camera coordinate system prefix.
Definition: CameraSys.h:44
A helper class for Detector that allows amplifiers and most fields to be modified.
Definition: Detector.h:362
static std::vector< std::shared_ptr< Amplifier::Builder > > rebuildAmplifiers(Detector const &detector)
Create a vector of Amplifier::Builders from the Amplifiers in a Detector.
Definition: Detector.cc:355
std::shared_ptr< Amplifier::Builder > operator[](size_t i) const
Get the amplifier builder specified by index.
Definition: Detector.h:435
void append(std::shared_ptr< Amplifier::Builder > builder)
Append a new amplifier.
Definition: Detector.cc:351
std::shared_ptr< table::io::Persistable > read(InputArchive const &archive, CatalogVector const &catalogs) const override
Construct a new object from the given InputArchive and vector of catalogs.
Definition: Detector.cc:239
void setTransformFromPixelsTo(CameraSysPrefix const &toSys, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > transform)
Set the transformation from PIXELS to the given coordinate system.
Definition: Detector.cc:413
bool discardTransformFromPixelsTo(CameraSysPrefix const &toSys)
Remove any transformation from PIXELS to the given coordinate system.
Definition: Detector.cc:441
PartialRebuilder(Detector const &detector)
Construct a PartialRebuilder initialized to the state of the given Detector.
Definition: Detector.cc:383
std::shared_ptr< Detector const > finish() const
Construct a new Detector from the current state of the Builder.
Definition: Detector.cc:388
lsst::geom::Box2I getBBox() const
Get the bounding box.
Definition: Detector.h:85
lsst::geom::Extent2D getPixelSize() const
Get size of pixel along (mm)
Definition: Detector.h:91
std::string getName() const
Get the detector name.
Definition: Detector.h:64
CameraSys getNativeCoordSys() const
The "native" coordinate system of this detector.
Definition: Detector.h:123
bool hasCrosstalk() const
Have we got crosstalk coefficients?
Definition: Detector.h:94
int getId() const
Get the detector ID.
Definition: Detector.h:67
std::string getPhysicalType() const
Get the detector's physical type.
Definition: Detector.h:82
Orientation getOrientation() const
Get detector's orientation in the focal plane.
Definition: Detector.h:88
std::string getSerial() const
Get the detector serial "number".
Definition: Detector.h:73
CameraSys makeCameraSys(CameraSys const &cameraSys) const
Get a coordinate system from a coordinate system (return input unchanged and untested)
Definition: Detector.h:110
CrosstalkMatrix getCrosstalk() const
Get the crosstalk coefficients.
Definition: Detector.h:100
ndarray::Array< float const, 2 > CrosstalkMatrix
Definition: Detector.h:59
DetectorType getType() const
Return the purpose of this detector.
Definition: Detector.h:70
A representation of a detector in a mosaic camera.
Definition: Detector.h:185
Fields const & getFields() const override
Return a reference to a Fields struct.
Definition: Detector.h:306
bool hasTransform(CameraSys const &cameraSys) const
Can this object convert between PIXELS and the specified camera coordinate system?
Definition: Detector.cc:82
std::size_t size() const
Get the number of amplifiers.
Definition: Detector.h:299
std::shared_ptr< TransformMap const > getTransformMap() const
Get the transform registry.
Definition: Detector.h:267
std::vector< std::shared_ptr< Amplifier const > > const & getAmplifiers() const
Return the sequence of Amplifiers directly.
Definition: Detector.h:270
lsst::geom::Point2D transform(lsst::geom::Point2D const &point, FromSysT const &fromSys, ToSysT const &toSys) const
Transform a point from one camera system to another.
Definition: Detector.cc:95
std::vector< lsst::geom::Point2D > getCorners(CameraSys const &cameraSys) const
Get the corners of the detector in the specified camera coordinate system.
Definition: Detector.cc:62
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 > getTransform(FromSysT const &fromSys, ToSysT const &toSys) const
Get a Transform from one camera coordinate system, or camera coordinate system prefix,...
lsst::geom::Point2D getCenter(CameraSys const &cameraSys) const
Get the center of the detector in the specified camera coordinate system.
Definition: Detector.cc:72
std::shared_ptr< PartialRebuilder > rebuild() const
Return a Builder object initialized with the state of this Detector.
Definition: Detector.cc:58
std::shared_ptr< Amplifier const > operator[](size_t i) const
Get the amplifier specified by index.
Definition: Detector.h:287
Describe a detector's orientation in the focal plane.
Definition: Orientation.h:52
A registry of 2-dimensional coordinate transforms for a specific camera.
Definition: TransformMap.h:62
A vector of catalogs used by Persistable.
Definition: CatalogVector.h:29
A multi-catalog archive object used to load table::io::Persistable objects.
Definition: InputArchive.h:31
std::shared_ptr< Persistable > get(int id) const
Load the Persistable with the given ID and return it.
A base class for factory classes used to reconstruct objects from records.
Definition: Persistable.h:228
PersistableFactory(std::string const &name)
Constructor for the factory.
Definition: Persistable.cc:74
A floating-point coordinate rectangle geometry.
Definition: Box.h:413
Point2D const getCenter() const noexcept
Return true if the box contains no points.
Definition: Box.h:549
std::vector< Point2D > getCorners() const
Get the corner points.
Definition: Box.cc:496
Reports invalid arguments.
Definition: Runtime.h:66
T find_if(T... args)
T front(T... args)
T insert(T... args)
T move(T... args)
CameraSysPrefix const PIXELS
Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels).
Definition: CameraSys.cc:34
DetectorType
Type of imaging detector.
Definition: Detector.h:44
FilterProperty & operator=(FilterProperty const &)=default
BoxKey< lsst::geom::Box2I > Box2IKey
Definition: aggregates.h:201
lsst::geom::Angle Angle
Definition: misc.h:33
PointKey< double > Point2DKey
Definition: aggregates.h:118
Extent< double, 2 > Extent2D
Definition: Extent.h:400
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174
int orientation(UnitVector3d const &a, UnitVector3d const &b, UnitVector3d const &c)
orientation computes and returns the orientations of 3 unit vectors a, b and c.
Definition: orientation.cc:135
A base class for image defects.
STL namespace.
T size(T... args)
table::Key< std::string > name
Definition: Detector.cc:161
table::Key< int > id
Definition: Detector.cc:162
table::Point2DKey refPoint
Definition: Detector.cc:168
table::Box2IKey bbox
Definition: Detector.cc:165
table::Key< lsst::geom::Angle > yaw
Definition: Detector.cc:169
table::Schema schema
Definition: Detector.cc:160
table::Key< lsst::geom::Angle > roll
Definition: Detector.cc:171
#define INSTANTIATE(FROMSYS, TOSYS)
Definition: Detector.cc:484
table::Key< std::string > physicalType
Definition: Detector.cc:174
table::Key< int > type
Definition: Detector.cc:163
table::Key< int > transformMap
Definition: Detector.cc:172
table::Point2DKey fpPosition
Definition: Detector.cc:167
table::Point2DKey pixelSize
Definition: Detector.cc:166
table::Key< lsst::geom::Angle > pitch
Definition: Detector.cc:170
table::Key< std::string > serial
Definition: Detector.cc:164
table::Key< table::Array< float > > crosstalk
Definition: Detector.cc:173
table::Key< int > detector
table::Key< std::string > detectorName
Representation of a single edge in the graph defined by a TransformMap.
Definition: TransformMap.h:80