LSST Applications
21.0.0+04719a4bac,21.0.0-1-ga51b5d4+f5e6047307,21.0.0-11-g2b59f77+a9c1acf22d,21.0.0-11-ga42c5b2+86977b0b17,21.0.0-12-gf4ce030+76814010d2,21.0.0-13-g1721dae+760e7a6536,21.0.0-13-g3a573fe+768d78a30a,21.0.0-15-g5a7caf0+f21cbc5713,21.0.0-16-g0fb55c1+b60e2d390c,21.0.0-19-g4cded4ca+71a93a33c0,21.0.0-2-g103fe59+bb20972958,21.0.0-2-g45278ab+04719a4bac,21.0.0-2-g5242d73+3ad5d60fb1,21.0.0-2-g7f82c8f+8babb168e8,21.0.0-2-g8f08a60+06509c8b61,21.0.0-2-g8faa9b5+616205b9df,21.0.0-2-ga326454+8babb168e8,21.0.0-2-gde069b7+5e4aea9c2f,21.0.0-2-gecfae73+1d3a86e577,21.0.0-2-gfc62afb+3ad5d60fb1,21.0.0-25-g1d57be3cd+e73869a214,21.0.0-3-g357aad2+ed88757d29,21.0.0-3-g4a4ce7f+3ad5d60fb1,21.0.0-3-g4be5c26+3ad5d60fb1,21.0.0-3-g65f322c+e0b24896a3,21.0.0-3-g7d9da8d+616205b9df,21.0.0-3-ge02ed75+a9c1acf22d,21.0.0-4-g591bb35+a9c1acf22d,21.0.0-4-g65b4814+b60e2d390c,21.0.0-4-gccdca77+0de219a2bc,21.0.0-4-ge8a399c+6c55c39e83,21.0.0-5-gd00fb1e+05fce91b99,21.0.0-6-gc675373+3ad5d60fb1,21.0.0-64-g1122c245+4fb2b8f86e,21.0.0-7-g04766d7+cd19d05db2,21.0.0-7-gdf92d54+04719a4bac,21.0.0-8-g5674e7b+d1bd76f71f,master-gac4afde19b+a9c1acf22d,w.2021.13
LSST Data Management Base Package
|
A helper class for creating and modifying cameras. More...
#include <Camera.h>
Public Types | |
using | NameMap = std::unordered_map< std::string, std::shared_ptr< Detector::InCameraBuilder > > |
using | IdMap = std::map< int, std::shared_ptr< Detector::InCameraBuilder > > |
using | List = std::vector< std::shared_ptr< Detector::InCameraBuilder > > |
Public Member Functions | |
virtual | ~Builder () noexcept |
Builder (std::string const &name) | |
Construct a Builder for a completely new Camera with the given name. More... | |
Builder (Camera const &camera) | |
Construct a Builder with the state of an existing Camera. More... | |
std::shared_ptr< Camera const > | finish () const |
Construct a new Camera from the state of the Builder. More... | |
std::string | getName () const |
Return the name of the camera. More... | |
void | setName (std::string const &name) |
Set the name of the camera. More... | |
std::string | getPupilFactoryName () const |
Return the fully-qualified name of the Python class that provides this Camera's PupilFactory. More... | |
void | setPupilFactoryName (std::string const &pupilFactoryName) |
Set the fully-qualified name of the Python class that provides this Camera's PupilFactory. More... | |
void | setTransformFromFocalPlaneTo (CameraSys const &toSys, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > transform) |
Set the transformation from FOCAL_PLANE to the given coordinate system. More... | |
bool | discardTransformFromFocalPlaneTo (CameraSys const &toSys) |
Remove any transformation from FOCAL_PLANE to the given coordinate system. More... | |
std::shared_ptr< Detector::InCameraBuilder > | add (std::string const &name, int id) |
Add a new Detector with the given name and ID. More... | |
void | remove (std::string const &name) |
Remove the detector with the given name or ID. More... | |
void | remove (int id) |
NameMap const & | getNameMap () const noexcept |
Get a map keyed and ordered by name. More... | |
IdMap const & | getIdMap () const noexcept |
Get a map keyed and ordered by ID. More... | |
std::size_t | size () const noexcept |
Get the number of detectors. More... | |
bool | empty () const noexcept |
Determine if the collection contains any detectors. More... | |
std::shared_ptr< Detector::InCameraBuilder > | operator[] (std::string const &name) const |
Implement the [name] operator. More... | |
std::shared_ptr< Detector::InCameraBuilder > | operator[] (int id) const |
Implement the [id] operator. More... | |
std::shared_ptr< Detector::InCameraBuilder > | get (std::string const &name, std::shared_ptr< Detector::InCameraBuilder > def=nullptr) const |
Retrieve a detector by name, or fall back to a default. More... | |
std::shared_ptr< Detector::InCameraBuilder > | get (int id, std::shared_ptr< Detector::InCameraBuilder > def=nullptr) const |
Retrieve a detector by ID, or fall back to a default. More... | |
Protected Member Functions | |
void | add (std::shared_ptr< Detector::InCameraBuilder > detector) |
Add a detector to the collection. More... | |
A helper class for creating and modifying cameras.
Camera and Camera::Builder have no direct inheritance relationship, but both inherit from different specializations of DetectorCollectionBase, so their container-of-detectors interfaces can generally be used the same way in both Python and templated C++.
|
inherited |
Definition at line 53 of file DetectorCollection.h.
|
inherited |
Definition at line 54 of file DetectorCollection.h.
|
inherited |
Definition at line 52 of file DetectorCollection.h.
|
virtualdefaultnoexcept |
|
explicit |
|
explicit |
Construct a Builder with the state of an existing Camera.
Definition at line 206 of file Camera.cc.
|
protectedinherited |
Add a detector to the collection.
[in] | detector | New detector to add to the collection. |
pex::exceptions::RuntimeError | Thrown if the ID and/or name conflict with those of detectors already in the collection. |
Definition at line 135 of file DetectorCollection.cc.
std::shared_ptr< Detector::InCameraBuilder > lsst::afw::cameraGeom::Camera::Builder::add | ( | std::string const & | name, |
int | id | ||
) |
Add a new Detector with the given name and ID.
This is the only way to create a completely new detector (as opposed to a copy of an existing one), and it permanently sets that Detector's name and ID.
pex::exceptions::RuntimeError | Thrown if the ID and/or name conflict with those of detectors already in the collection. |
Definition at line 329 of file Camera.cc.
bool lsst::afw::cameraGeom::Camera::Builder::discardTransformFromFocalPlaneTo | ( | CameraSys const & | toSys | ) |
|
inlinenoexceptinherited |
Determine if the collection contains any detectors.
Definition at line 72 of file DetectorCollection.h.
std::shared_ptr< Camera const > lsst::afw::cameraGeom::Camera::Builder::finish | ( | ) | const |
Construct a new Camera from the state of the Builder.
Definition at line 246 of file Camera.cc.
|
inherited |
Retrieve a detector by ID, or fall back to a default.
[in] | id | detector id |
[in] | def | default detector to return. This defaults to nullptr . |
Definition at line 110 of file DetectorCollection.cc.
|
inherited |
Retrieve a detector by name, or fall back to a default.
[in] | name | detector name |
[in] | def | default detector to return. This defaults to nullptr . |
Definition at line 99 of file DetectorCollection.cc.
|
inlinenoexceptinherited |
Get a map keyed and ordered by ID.
Definition at line 62 of file DetectorCollection.h.
|
inline |
|
inlinenoexceptinherited |
Get a map keyed and ordered by name.
Definition at line 59 of file DetectorCollection.h.
|
inline |
|
inherited |
Implement the [id] operator.
[in] | id | detector name |
Definition at line 88 of file DetectorCollection.cc.
|
inherited |
Implement the [name] operator.
[in] | name | detector name |
Definition at line 80 of file DetectorCollection.cc.
|
inline |
Definition at line 284 of file Camera.h.
|
inline |
Remove the detector with the given name or ID.
Wrapped as __delitem__
in Python.
pex::exceptions::NotFoundError | if no such detector exists. |
Definition at line 283 of file Camera.h.
|
inline |
|
inline |
void lsst::afw::cameraGeom::Camera::Builder::setTransformFromFocalPlaneTo | ( | CameraSys const & | toSys, |
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > | transform | ||
) |
Set the transformation from FOCAL_PLANE to the given coordinate system.
toSys | Coordinate system this transform returns points in. |
transform | Transform from FOCAL_PLANE to toSys . |
If a transform already exists from FOCAL_PLANE to toSys
, it is overwritten.
Definition at line 299 of file Camera.cc.
|
inlinenoexceptinherited |
Get the number of detectors.
Renamed to __len__
in Python.
Definition at line 67 of file DetectorCollection.h.