LSST Applications g0b6bd0c080+a72a5dd7e6,g1182afd7b4+2a019aa3bb,g17e5ecfddb+2b8207f7de,g1d67935e3f+06cf436103,g38293774b4+ac198e9f13,g396055baef+6a2097e274,g3b44f30a73+6611e0205b,g480783c3b1+98f8679e14,g48ccf36440+89c08d0516,g4b93dc025c+98f8679e14,g5c4744a4d9+a302e8c7f0,g613e996a0d+e1c447f2e0,g6c8d09e9e7+25247a063c,g7271f0639c+98f8679e14,g7a9cd813b8+124095ede6,g9d27549199+a302e8c7f0,ga1cf026fa3+ac198e9f13,ga32aa97882+7403ac30ac,ga786bb30fb+7a139211af,gaa63f70f4e+9994eb9896,gabf319e997+ade567573c,gba47b54d5d+94dc90c3ea,gbec6a3398f+06cf436103,gc6308e37c7+07dd123edb,gc655b1545f+ade567573c,gcc9029db3c+ab229f5caf,gd01420fc67+06cf436103,gd877ba84e5+06cf436103,gdb4cecd868+6f279b5b48,ge2d134c3d5+cc4dbb2e3f,ge448b5faa6+86d1ceac1d,gecc7e12556+98f8679e14,gf3ee170dca+25247a063c,gf4ac96e456+ade567573c,gf9f5ea5b4d+ac198e9f13,gff490e6085+8c2580be5c,w.2022.27
LSST Data Management Base Package
Detector.cc
Go to the documentation of this file.
1
2/*
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
33namespace lsst {
34namespace afw {
35namespace cameraGeom {
36
37namespace {
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.
44template <typename Iter>
45Iter 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
82bool Detector::hasTransform(CameraSys const &cameraSys) const { return _transformMap->contains(cameraSys); }
83
84bool Detector::hasTransform(CameraSysPrefix const &cameraSysPrefix) const {
85 return hasTransform(makeCameraSys(cameraSysPrefix));
86}
87
88template <typename FromSysT, typename ToSysT>
90 ToSysT const &toSys) const {
91 return _transformMap->getTransform(makeCameraSys(fromSys), makeCameraSys(toSys));
92}
93
94template <typename FromSysT, typename ToSysT>
95lsst::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
100template <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
110namespace {
111
112void 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
122void 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
140Detector::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
150namespace {
151
152class PersistenceHelper {
153public:
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
202private:
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
235public:
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),
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
297std::string Detector::getPersistenceName() const {
298 return "Detector";
299}
300
301std::string Detector::getPythonModule() const {
302 return "lsst.afw.cameraGeom";
303}
304
305void 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()));
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
371Detector::Builder::~Builder() noexcept = default;
372
373AmpVector 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
393namespace {
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//
400template <typename Iter>
401Iter 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
462Detector::InCameraBuilder::InCameraBuilder(Detector const & detector) :
463 Builder(detector.getFields(), rebuildAmplifiers(detector))
464{}
465
466Detector::InCameraBuilder::InCameraBuilder(std::string const & name, int id) :
467 Builder(name, id)
468{}
469
470
471std::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
492INSTANTIATE(CameraSys, CameraSys);
493INSTANTIATE(CameraSys, CameraSysPrefix);
494INSTANTIATE(CameraSysPrefix, CameraSys);
495INSTANTIATE(CameraSysPrefix, CameraSysPrefix);
496
497} // namespace cameraGeom
498
499namespace table {
500namespace io {
501
502template 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:429
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
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
uint64_t * ptr
Definition: RangeSet.cc:88
std::ostream * os
Definition: Schema.cc:557
table::Key< std::string > detectorName
#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
void append(std::shared_ptr< Amplifier::Builder > builder)
Append a new amplifier.
Definition: Detector.cc:351
std::shared_ptr< Amplifier::Builder > operator[](size_t i) const
Get the amplifier builder specified by index.
Definition: Detector.h:435
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
std::vector< std::shared_ptr< Amplifier const > > const & getAmplifiers() const
Return the sequence of Amplifiers directly.
Definition: Detector.h:270
bool hasTransform(CameraSys const &cameraSys) const
Can this object convert between PIXELS and the specified camera coordinate system?
Definition: Detector.cc:82
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,...
std::size_t size() const
Get the number of amplifiers.
Definition: Detector.h:299
std::shared_ptr< Amplifier const > operator[](size_t i) const
Get the amplifier specified by index.
Definition: Detector.h:287
std::shared_ptr< TransformMap const > getTransformMap() const
Get the transform registry.
Definition: Detector.h:267
Fields const & getFields() const override
Return a reference to a Fields struct.
Definition: Detector.h:306
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
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
Describe a detector's orientation in the focal plane.
Definition: Orientation.h:51
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
lsst::geom::Angle Angle
Definition: misc.h:33
PointKey< double > Point2DKey
Definition: aggregates.h:118
BoxKey< lsst::geom::Box2I > Box2IKey
Definition: aggregates.h:201
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)
Representation of a single edge in the graph defined by a TransformMap.
Definition: TransformMap.h:80