Class Camera::Builder

Nested Relationships

This class is a nested type of Class Camera.

Inheritance Relationships

Base Type

Class Documentation

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.

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.

void setTransformFromFocalPlaneTo(CameraSys const &toSys, std::shared_ptr<afw::geom::TransformPoint2ToPoint2 const> transform)

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 to toSys.

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.