|
lsst.afw g714e0ed6de+196fb0684f
|
A helper class for creating and modifying cameras. More...
#include <Camera.h>
Public Types | |
| using | NameMap |
| using | NameMap |
| using | IdMap |
| using | IdMap |
| using | List |
| using | List |
Public Member Functions | |
| virtual | ~Builder () noexcept |
| Builder (std::string const &name) | |
| Construct a Builder for a completely new Camera with the given name. | |
| Builder (Camera const &camera) | |
| Construct a Builder with the state of an existing Camera. | |
| std::shared_ptr< Camera const > | finish () const |
| Construct a new Camera from the state of the Builder. | |
| std::string | getName () const |
| Return the name of the camera. | |
| void | setName (std::string const &name) |
| Set the name of the camera. | |
| std::string | getPupilFactoryName () const |
| Return the fully-qualified name of the Python class that provides this Camera's PupilFactory. | |
| void | setPupilFactoryName (std::string const &pupilFactoryName) |
| Set the fully-qualified name of the Python class that provides this Camera's PupilFactory. | |
| bool | getFocalPlaneParity () const noexcept |
| Return True if there is an x-axis flip from FOCAL_PLANE to FIELD_ANGLE, False otherwise. | |
| void | setFocalPlaneParity (bool flipX) |
| Set whether an x-axis flip should be included in the FOCAL_PLANE to FIELD_ANGLE transform. | |
| void | setTransformFromFocalPlaneTo (CameraSys const &toSys, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > transform) |
| Set the transformation from FOCAL_PLANE to the given coordinate system. | |
| bool | discardTransformFromFocalPlaneTo (CameraSys const &toSys) |
| Remove any transformation from FOCAL_PLANE to the given coordinate system. | |
| std::shared_ptr< Detector::InCameraBuilder > | add (std::string const &name, int id) |
| Add a new Detector with the given name and ID. | |
| void | remove (std::string const &name) |
| Remove the detector with the given name or ID. | |
| void | remove (int id) |
| NameMap const & | getNameMap () const noexcept |
| Get a map keyed and ordered by name. | |
| NameMap const & | getNameMap () const noexcept |
| Get a map keyed and ordered by name. | |
| IdMap const & | getIdMap () const noexcept |
| Get a map keyed and ordered by ID. | |
| IdMap const & | getIdMap () const noexcept |
| Get a map keyed and ordered by ID. | |
| std::size_t | size () const noexcept |
| Get the number of detectors. | |
| std::size_t | size () const noexcept |
| Get the number of detectors. | |
| bool | empty () const noexcept |
| Determine if the collection contains any detectors. | |
| bool | empty () const noexcept |
| Determine if the collection contains any detectors. | |
| std::shared_ptr< Detector::InCameraBuilder > | operator[] (std::string const &name) const |
| Implement the [name] operator. | |
| std::shared_ptr< Detector::InCameraBuilder > | operator[] (int id) const |
| Implement the [id] operator. | |
| std::shared_ptr< Detector::InCameraBuilder > | operator[] (std::string const &name) const |
| Implement the [name] operator. | |
| std::shared_ptr< Detector::InCameraBuilder > | operator[] (int id) const |
| Implement the [id] operator. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
Protected Member Functions | |
| void | add (std::shared_ptr< Detector::InCameraBuilder > detector) |
| Add a detector to the collection. | |
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 53 of file DetectorCollection.h.
|
inherited |
Definition at line 54 of file DetectorCollection.h.
|
inherited |
Definition at line 54 of file DetectorCollection.h.
|
inherited |
Definition at line 52 of file DetectorCollection.h.
|
inherited |
Definition at line 52 of file DetectorCollection.h.
|
virtualdefaultnoexcept |
|
explicit |
|
explicit |
| 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. |
|
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. |
| 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.
|
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 |
|
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. |
|
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. |
|
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.
|
inlinenoexcept |
Return True if there is an x-axis flip from FOCAL_PLANE to FIELD_ANGLE, False otherwise.
Cameras with an even number of reflective surfaces (e.g. LATISS) or a particular choice for the PIXEL coordinates (e.g. DECam) require this x-axis flip between their FOCAL_PLANE and FIELD_ANGLE coordinate systems to match our conventions.
|
inlinenoexceptinherited |
Get a map keyed and ordered by ID.
Definition at line 62 of file DetectorCollection.h.
|
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.
|
inlinenoexceptinherited |
Get a map keyed and ordered by name.
Definition at line 59 of file DetectorCollection.h.
|
inline |
Return the fully-qualified name of the Python class that provides this Camera's PupilFactory.
|
inherited |
Implement the [id] operator.
| [in] | id | detector name |
|
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 |
|
inherited |
Implement the [name] operator.
| [in] | name | detector name |
Definition at line 80 of file DetectorCollection.cc.
|
inline |
|
inline |
Remove the detector with the given name or ID.
Wrapped as __delitem__ in Python.
| pex::exceptions::NotFoundError | if no such detector exists. |
| void lsst::afw::cameraGeom::Camera::Builder::setFocalPlaneParity | ( | bool | flipX | ) |
Set whether an x-axis flip should be included in the FOCAL_PLANE to FIELD_ANGLE transform.
When a Camera is constructed from this Builder via the finish, method, the current parity of the FOCAL_PLANE to FIELD_ANGLE transform is checked. If the set focal plane parity is true but the transform has a positive determinant, or if the set focal plane parity is false but the transform has a negative determinant, the built camera's transform will compose an x-coordinate flip to the builder's transform. Note that there is no other checking that these coordinate systems have aligned axes or that any existing parity flip is along the X axis (as should be the case).
|
inline |
|
inline |
Set the fully-qualified name of the Python class that provides this Camera's PupilFactory.
| 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.
|
inlinenoexceptinherited |
Get the number of detectors.
Renamed to __len__ in Python.
Definition at line 67 of file DetectorCollection.h.
|
inlinenoexceptinherited |
Get the number of detectors.
Renamed to __len__ in Python.
Definition at line 67 of file DetectorCollection.h.