Class Camera¶
Defined in File Camera.h
Inheritance Relationships¶
Base Types¶
public lsst::afw::cameraGeom::DetectorCollection(Class DetectorCollection)public lsst::afw::table::io::PersistableFacade< Camera >(Template Class PersistableFacade)
Class Documentation¶
- 
class 
Camera: public lsst::afw::cameraGeom::DetectorCollection, public lsst::afw::table::io::PersistableFacade<Camera>¶ An immutable representation of a camera.
Cameras are created (and modified, when necessary) via the Camera::Builder helper class.
Public Types
- 
using 
DetectorList= DetectorCollection::List¶ 
Public Functions
- 
virtual 
~Camera()¶ 
- 
Camera::Builder 
rebuild() const¶ Create a Camera::Builder object initialized with this camera’s state.
This is simply a shortcut for
Camera::Builder(*this).
- 
std::string 
getName() const¶ Return the name of the camera
- 
std::string 
getPupilFactoryName() const¶ Return the fully-qualified name of the Python class that provides this Camera’s PupilFactory.
- 
DetectorList 
findDetectors(lsst::geom::Point2D const &point, CameraSys const &cameraSys) const¶ Find the detectors that cover a point in any camera system
- Return
 a list of zero or more Detectors that overlap the specified point
- Parameters
 [in] point: position to use in lookup (lsst::geom::Point2D)[in] cameraSys: camera coordinate system ofpoint
- 
std::vector<DetectorList> 
findDetectorsList(std::vector<lsst::geom::Point2D> const &pointList, CameraSys const &cameraSys) const¶ Find the detectors that cover a list of points in any camera system
- Return
 a list of lists; each list contains the names of all detectors which contain the corresponding point
- Parameters
 [in] pointList: a list of points (lsst::geom::Point2D)[in] cameraSys: the camera coordinate system of the points inpointList
- 
std::shared_ptr<afw::geom::TransformPoint2ToPoint2> 
getTransform(CameraSys const &fromSys, CameraSys const &toSys) const¶ Get a transform from one CameraSys to another
- Return
 an afw::geom::TransformPoint2ToPoint2 that transforms from
fromSystotoSysin the forward direction- Parameters
 - Exceptions
 lsst::pex::exceptions::InvalidParameterError: if no transform is available.KeyError: if an unknown detector is specified
- 
std::shared_ptr<TransformMap const> 
getTransformMap() const¶ Obtain the transform registry.
- Return
 _transformMap a TransformMap
- Note
 _transformMap is immutable, so this should be safe.
- 
lsst::geom::Point2D 
transform(lsst::geom::Point2D const &point, CameraSys const &fromSys, CameraSys const &toSys) const¶ Transform a point from one camera coordinate system to another
- 
std::vector<lsst::geom::Point2D> 
transform(std::vector<lsst::geom::Point2D> const &points, CameraSys const &fromSys, CameraSys const &toSys) const¶ Transform a vector of points from one camera coordinate system to another
- 
bool 
isPersistable() const¶ Cameras are always persistable.
Protected Functions
- 
void 
write(OutputArchiveHandle &handle) const¶ Write the object to one or more catalogs.
The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.
- 
class 
Builder: public lsst::afw::cameraGeom::DetectorCollectionBase<Detector::InCameraBuilder>¶ 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++.
Unnamed Group
- 
void 
remove(std::string const &name)¶ Remove the detector with the given name or ID.
Wrapped as
__delitem__in Python.- Exceptions
 pex::exceptions::NotFoundError: if no such detector exists.
- 
void 
remove(int id)¶ 
Public Functions
- 
virtual 
~Builder()¶ 
- 
Builder(std::string const &name)¶ Construct a Builder for a completely new Camera with the given name.
- 
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.
Set the transformation from FOCAL_PLANE to the given coordinate system.
If a transform already exists from FOCAL_PLANE to
toSys, it is overwritten.- Parameters
 toSys: Coordinate system this transform returns points in.transform: Transform from FOCAL_PLANE totoSys.
- 
bool 
discardTransformFromFocalPlaneTo(CameraSys const &toSys)¶ Remove any transformation from FOCAL_PLANE to the given coordinate system.
- Return
 true if a transform was removed; false otherwise.
- Parameters
 toSys: Coordinate system this transform returns points in.
- 
std::shared_ptr<Detector::InCameraBuilder> 
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.
Strong for pex::exceptions::RuntimeError, none otherwise.
- Exceptions
 pex::exceptions::RuntimeError: Thrown if the ID and/or name conflict with those of detectors already in the collection.
- 
void 
 
- 
using