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
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
lsst::afw::cameraGeom Namespace Reference

Namespaces

 _amplifier
 
 _assembleImage
 
 _camera
 
 _cameraFactory
 
 _cameraGeomEnumDicts
 
 _detector
 
 _detectorCollection
 
 _makePixelToTanPixel
 
 _rotateBBoxBy90
 
 _transformConfig
 
 cameraConfig
 
 pupil
 
 testUtils
 
 utils
 

Classes

class  Amplifier
 Geometry and electronic information about raw amplifier images. More...
 
class  Camera
 An immutable representation of a camera. More...
 
class  CameraSysPrefix
 Camera coordinate system prefix. More...
 
class  CameraSys
 Camera coordinate system; used as a key in in TransformMap. More...
 
class  DetectorBase
 An abstract base class that provides common accessors for Detector and Detector::Builder. More...
 
class  Detector
 A representation of a detector in a mosaic camera. More...
 
class  DetectorCollectionBase
 An abstract base class for collections of Detectors and specific subclasses thereof. More...
 
class  DetectorCollection
 An immutable collection of Detectors that can be accessed by name or ID. More...
 
class  Orientation
 Describe a detector's orientation in the focal plane. More...
 
class  TransformMap
 A registry of 2-dimensional coordinate transforms for a specific camera. More...
 

Typedefs

using PyAmplifier = py::class_< Amplifier, std::shared_ptr< Amplifier > >
 
using PyAmplifierBuilder = py::class_< Amplifier::Builder, Amplifier, std::shared_ptr< Amplifier::Builder > >
 
using PyCamera = py::class_< Camera, DetectorCollection, std::shared_ptr< Camera > >
 
using PyCameraBuilder = py::class_< Camera::Builder, DetectorCollectionBase< Detector::InCameraBuilder >, std::shared_ptr< Camera::Builder > >
 

Enumerations

enum class  ReadoutCorner { LL , LR , UR , UL }
 Readout corner, in the frame of reference of the assembled image. More...
 
enum class  AssemblyState { RAW , SCIENCE }
 Assembly state of the amplifier, used to identify bounding boxes and component existence. More...
 
enum class  DetectorType { SCIENCE , FOCUS , GUIDER , WAVEFRONT }
 Type of imaging detector. More...
 

Functions

void swap (CameraSys &a, CameraSys &b)
 
std::ostreamoperator<< (std::ostream &os, CameraSysPrefix const &detSysPrefix)
 
std::ostreamoperator<< (std::ostream &os, CameraSys const &cameraSys)
 
std::ostreamoperator<< (std::ostream &os, TransformMap::Connection const &connection)
 
void wrapAmplifier (lsst::utils::python::WrapperCollection &wrappers)
 
void wrapCamera (lsst::utils::python::WrapperCollection &wrappers)
 
void wrapCameraSys (lsst::utils::python::WrapperCollection &)
 
void wrapDetector (lsst::utils::python::WrapperCollection &)
 
void wrapDetectorCollection (lsst::utils::python::WrapperCollection &)
 
void wrapOrientation (lsst::utils::python::WrapperCollection &)
 
void wrapTransformMap (lsst::utils::python::WrapperCollection &)
 
 PYBIND11_MODULE (_cameraGeom, mod)
 

Variables

CameraSys const FOCAL_PLANE = CameraSys("FocalPlane")
 Focal plane coordinates: Position on a 2-d planar approximation to the focal plane (x,y mm). More...
 
CameraSys const FIELD_ANGLE = CameraSys("FieldAngle")
 Field angle coordinates: Angle of a principal ray relative to the optical axis (x,y radians). More...
 
CameraSysPrefix const PIXELS = CameraSysPrefix("Pixels")
 Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels). More...
 
CameraSysPrefix const TAN_PIXELS = CameraSysPrefix("TanPixels")
 Tangent-plane pixels on the detector (x, y unbinned pixels) More...
 
CameraSysPrefix const ACTUAL_PIXELS = CameraSysPrefix("ActualPixels")
 The actual pixels where the photon lands and electrons are generated (x,y unbinned) This takes into account manufacturing defects, "tree ring" distortions and other such effects. More...
 
string NullLinearityType = "None"
 

Typedef Documentation

◆ PyAmplifier

Definition at line 40 of file _amplifier.cc.

◆ PyAmplifierBuilder

Definition at line 41 of file _amplifier.cc.

◆ PyCamera

Definition at line 40 of file _camera.cc.

◆ PyCameraBuilder

Definition at line 41 of file _camera.cc.

Enumeration Type Documentation

◆ AssemblyState

Assembly state of the amplifier, used to identify bounding boxes and component existence.

Enumerator
RAW 
SCIENCE 

Definition at line 48 of file Amplifier.h.

◆ DetectorType

Type of imaging detector.

Enumerator
SCIENCE 
FOCUS 
GUIDER 
WAVEFRONT 

Definition at line 44 of file Detector.h.

◆ ReadoutCorner

Readout corner, in the frame of reference of the assembled image.

Enumerator
LL 
LR 
UR 
UL 

Definition at line 38 of file Amplifier.h.

Function Documentation

◆ operator<<() [1/3]

std::ostream & lsst::afw::cameraGeom::operator<< ( std::ostream os,
CameraSys const &  cameraSys 
)

Definition at line 52 of file CameraSys.cc.

52  {
53  os << "CameraSys(" << cameraSys.getSysName();
54  if (cameraSys.hasDetectorName()) {
55  os << ", " << cameraSys.getDetectorName();
56  }
57  os << ")";
58  return os;
59 }
std::ostream * os
Definition: Schema.cc:746

◆ operator<<() [2/3]

std::ostream & lsst::afw::cameraGeom::operator<< ( std::ostream os,
CameraSysPrefix const &  detSysPrefix 
)

Definition at line 47 of file CameraSys.cc.

47  {
48  os << "CameraSysPrefix(" << camSysPrefix.getSysName() << ")";
49  return os;
50 }

◆ operator<<() [3/3]

std::ostream & lsst::afw::cameraGeom::operator<< ( std::ostream os,
TransformMap::Connection const &  connection 
)

Definition at line 170 of file TransformMap.cc.

170  {
171  return os << connection.fromSys << "->" << connection.toSys;
172 }

◆ PYBIND11_MODULE()

lsst::afw::cameraGeom::PYBIND11_MODULE ( _cameraGeom  ,
mod   
)

Definition at line 38 of file _cameraGeom.cc.

38  {
39  lsst::utils::python::WrapperCollection wrappers(mod, "lsst.afw.cameraGeom");
40  wrapAmplifier(wrappers);
41  wrapDetectorCollection(wrappers);
42  wrapDetector(wrappers);
43  wrapCamera(wrappers);
44  wrapCameraSys(wrappers);
45  wrapOrientation(wrappers);
46  wrapTransformMap(wrappers);
47  wrappers.finish();
48 }
A helper class for subdividing pybind11 module across multiple translation units (i....
Definition: python.h:242
void wrapDetectorCollection(lsst::utils::python::WrapperCollection &)
void wrapTransformMap(lsst::utils::python::WrapperCollection &)
void wrapCameraSys(lsst::utils::python::WrapperCollection &)
Definition: _cameraSys.cc:65
void wrapOrientation(lsst::utils::python::WrapperCollection &)
Definition: _orientation.cc:36
void wrapDetector(lsst::utils::python::WrapperCollection &)
Definition: _detector.cc:195
void wrapAmplifier(lsst::utils::python::WrapperCollection &wrappers)
Definition: _amplifier.cc:43
void wrapCamera(lsst::utils::python::WrapperCollection &wrappers)
Definition: _camera.cc:48

◆ swap()

void lsst::afw::cameraGeom::swap ( CameraSys a,
CameraSys b 
)
inline

Definition at line 157 of file CameraSys.h.

157  {
158  a.swap(b);
159 }
table::Key< int > b
table::Key< int > a

◆ wrapAmplifier()

void lsst::afw::cameraGeom::wrapAmplifier ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 43 of file _amplifier.cc.

43  {
44  wrappers.addInheritanceDependency("lsst.afw.table");
45  wrappers.wrapType(py::enum_<ReadoutCorner>(wrappers.module, "ReadoutCorner"), [](auto &mod, auto &enm) {
46  enm.value("LL", ReadoutCorner::LL);
47  enm.value("LR", ReadoutCorner::LR);
48  enm.value("UR", ReadoutCorner::UR);
49  enm.value("UL", ReadoutCorner::UL);
50  });
51  wrappers.wrapType(py::enum_<AssemblyState>(wrappers.module, "AssemblyState"), [](auto &mod, auto &enm) {
52  enm.value("RAW", AssemblyState::RAW);
53  enm.value("SCIENCE", AssemblyState::SCIENCE);
54  });
55  auto amplifier = wrappers.wrapType(PyAmplifier(wrappers.module, "Amplifier"), [](auto &mod, auto &cls) {
56  cls.def_static("getRecordSchema", &Amplifier::getRecordSchema);
57  cls.def("toRecord", &Amplifier::toRecord);
58  cls.def("rebuild", &Amplifier::rebuild);
59  cls.def("getName", &Amplifier::getName);
60  cls.def("getBBox", &Amplifier::getBBox);
61  cls.def("getGain", &Amplifier::getGain);
62  cls.def("getReadNoise", &Amplifier::getReadNoise);
63  cls.def("getSaturation", &Amplifier::getSaturation);
64  cls.def("getSuspectLevel", &Amplifier::getSuspectLevel);
65  cls.def("getReadoutCorner", &Amplifier::getReadoutCorner);
66  cls.def("getLinearityCoeffs", &Amplifier::getLinearityCoeffs);
67  cls.def("getLinearityType", &Amplifier::getLinearityType);
68  cls.def("getLinearityThreshold", &Amplifier::getLinearityThreshold);
69  cls.def("getLinearityMaximum", &Amplifier::getLinearityMaximum);
70  cls.def("getLinearityUnits", &Amplifier::getLinearityUnits);
71  cls.def("getRawBBox", &Amplifier::getRawBBox);
72  cls.def("getRawDataBBox", &Amplifier::getRawDataBBox);
73  cls.def("getRawFlipX", &Amplifier::getRawFlipX);
74  cls.def("getRawFlipY", &Amplifier::getRawFlipY);
75  cls.def("getRawXYOffset", &Amplifier::getRawXYOffset);
76  cls.def("getRawHorizontalOverscanBBox", &Amplifier::getRawHorizontalOverscanBBox);
77  cls.def("getRawVerticalOverscanBBox", &Amplifier::getRawVerticalOverscanBBox);
78  cls.def("getRawPrescanBBox", &Amplifier::getRawPrescanBBox);
79  cls.def("getRawSerialOverscanBBox", &Amplifier::getRawSerialOverscanBBox);
80  cls.def("getRawParallelOverscanBBox", &Amplifier::getRawParallelOverscanBBox);
81  cls.def("getRawSerialPrescanBBox", &Amplifier::getRawSerialPrescanBBox);
82  cls.def("getRawHorizontalPrescanBBox", &Amplifier::getRawHorizontalPrescanBBox);
83  });
84  wrappers.wrapType(PyAmplifierBuilder(amplifier, "Builder"), [](auto &mod, auto &cls) {
85  cls.def_static("fromRecord", &Amplifier::Builder::fromRecord);
86  cls.def(py::init());
87  cls.def("finish", &Amplifier::Builder::finish);
88  cls.def("assign", [](Amplifier::Builder &self, Amplifier const &other) { self = other; });
89  cls.def("setName", &Amplifier::Builder::setName, "name"_a);
90  cls.def("setBBox", &Amplifier::Builder::setBBox, "bbox"_a);
91  cls.def("setGain", &Amplifier::Builder::setGain, "gain"_a);
92  cls.def("setReadNoise", &Amplifier::Builder::setReadNoise, "readNoise"_a);
93  cls.def("setSaturation", &Amplifier::Builder::setSaturation, "saturation"_a);
94  cls.def("setSuspectLevel", &Amplifier::Builder::setSuspectLevel, "suspectLevel"_a);
95  cls.def("setReadoutCorner", &Amplifier::Builder::setReadoutCorner, "corner"_a);
96  cls.def("setLinearityCoeffs", &Amplifier::Builder::setLinearityCoeffs, "coeffs"_a);
97  // Backwards compatibility: accept std::vector (list in Python) in
98  // addition to ndarray::Array (np.ndarray)
99  cls.def("setLinearityCoeffs", [](Amplifier::Builder &self, std::vector<double> const &coeffs) {
100  ndarray::Array<double, 1, 1> array = ndarray::allocate(coeffs.size());
101  std::copy(coeffs.begin(), coeffs.end(), array.begin());
102  self.setLinearityCoeffs(array);
103  });
104  cls.def("setLinearityType", &Amplifier::Builder::setLinearityType, "type"_a);
105  cls.def("setLinearityThreshold", &Amplifier::Builder::setLinearityThreshold, "threshold"_a);
106  cls.def("setLinearityMaximum", &Amplifier::Builder::setLinearityMaximum, "maximum"_a);
107  cls.def("setLinearityUnits", &Amplifier::Builder::setLinearityUnits, "units"_a);
108  cls.def("setRawBBox", &Amplifier::Builder::setRawBBox, "bbox"_a);
109  cls.def("setRawDataBBox", &Amplifier::Builder::setRawDataBBox, "bbox"_a);
110  cls.def("setRawFlipX", &Amplifier::Builder::setRawFlipX, "rawFlipX"_a);
111  cls.def("setRawFlipY", &Amplifier::Builder::setRawFlipY, "rawFlipY"_a);
112  cls.def("setRawXYOffset", &Amplifier::Builder::setRawXYOffset, "offset"_a);
113  cls.def("setRawHorizontalOverscanBBox", &Amplifier::Builder::setRawHorizontalOverscanBBox, "bbox"_a);
114  cls.def("setRawVerticalOverscanBBox", &Amplifier::Builder::setRawVerticalOverscanBBox, "bbox"_a);
115  cls.def("setRawPrescanBBox", &Amplifier::Builder::setRawPrescanBBox, "bbox"_a);
116  cls.def("setRawSerialOverscanBBox", &Amplifier::Builder::setRawSerialOverscanBBox, "bbox"_a);
117  cls.def("setRawParallelOverscanBBox", &Amplifier::Builder::setRawParallelOverscanBBox, "bbox"_a);
118  cls.def("setRawSerialPrescanBBox", &Amplifier::Builder::setRawSerialPrescanBBox, "bbox"_a);
119  cls.def("setRawHorizontalPrescanBBox", &Amplifier::Builder::setRawHorizontalPrescanBBox, "bbox"_a);
120  });
121 }
ItemVariant const * other
Definition: Schema.cc:56
T begin(T... args)
pybind11::module module
The module object passed to the PYBIND11_MODULE block that contains this WrapperCollection.
Definition: python.h:448
PyType wrapType(PyType cls, ClassWrapperCallback function, bool setModuleName=true)
Add a type (class or enum) wrapper, deferring method and other attribute definitions until finish() i...
Definition: python.h:391
void addInheritanceDependency(std::string const &name)
Indicate an external module that provides a base class for a subsequent addType call.
Definition: python.h:343
T copy(T... args)
T end(T... args)
py::class_< Amplifier::Builder, Amplifier, std::shared_ptr< Amplifier::Builder > > PyAmplifierBuilder
Definition: _amplifier.cc:41
py::class_< Amplifier, std::shared_ptr< Amplifier > > PyAmplifier
Definition: _amplifier.cc:40
def init()
Definition: tests.py:59
T size(T... args)

◆ wrapCamera()

void lsst::afw::cameraGeom::wrapCamera ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 48 of file _camera.cc.

48  {
49  wrappers.addInheritanceDependency("lsst.afw.table.io");
50  wrappers.addSignatureDependency("lsst.afw.cameraGeom");
51  auto camera = wrappers.wrapType(PyCamera(wrappers.module, "Camera"), [](auto &mod, auto &cls) {
52  cls.def("rebuild", &Camera::rebuild);
53  cls.def("getName", &Camera::getName);
54  cls.def("getPupilFactoryName", &Camera::getPupilFactoryName);
55  cls.def("findDetectors", &Camera::findDetectors, "point"_a, "cameraSys"_a);
56  cls.def("findDetectorsList", &Camera::findDetectorsList, "pointList"_a, "cameraSys"_a);
57  // transform methods are wrapped with lambdas that translate exceptions for backwards compatibility
58  cls.def(
59  "getTransform",
60  [](Camera const &self, CameraSys const &fromSys, CameraSys const &toSys) {
61  try {
62  return self.getTransform(fromSys, toSys);
63  } catch (pex::exceptions::NotFoundError &err) {
64  PyErr_SetString(PyExc_KeyError, err.what());
65  throw py::error_already_set();
66  }
67  },
68  "fromSys"_a, "toSys"_a);
69  cls.def("getTransformMap", &Camera::getTransformMap);
70  cls.def(
71  "transform",
72  [](Camera const &self, lsst::geom::Point2D const &point, CameraSys const &fromSys,
73  CameraSys const &toSys) {
74  try {
75  return self.transform(point, fromSys, toSys);
76  } catch (pex::exceptions::NotFoundError &err) {
77  PyErr_SetString(PyExc_KeyError, err.what());
78  throw py::error_already_set();
79  }
80  },
81  "point"_a, "fromSys"_a, "toSys"_a);
82  cls.def(
83  "transform",
84  [](Camera const &self, std::vector<lsst::geom::Point2D> const &points,
85  CameraSys const &fromSys, CameraSys const &toSys) {
86  try {
87  return self.transform(points, fromSys, toSys);
88  } catch (pex::exceptions::NotFoundError &err) {
89  PyErr_SetString(PyExc_KeyError, err.what());
90  throw py::error_already_set();
91  }
92  },
93  "points"_a, "fromSys"_a, "toSys"_a);
95  });
96  wrappers.wrapType(PyCameraBuilder(camera, "Builder"), [](auto &mod, auto &cls) {
97  cls.def(py::init<std::string const &>(), "name"_a);
98  cls.def(py::init<Camera const &>(), "camera"_a);
99  cls.def("finish", &Camera::Builder::finish);
100  cls.def("getName", &Camera::Builder::getName);
101  cls.def("setName", &Camera::Builder::setName);
102  cls.def("getPupilFactoryName", &Camera::Builder::getPupilFactoryName);
103  cls.def("setPupilFactoryName", &Camera::Builder::setPupilFactoryName);
104  cls.def("setPupilFactoryClass", [](Camera::Builder &self, py::object pupilFactoryClass) {
105  std::string pupilFactoryName = "lsst.afw.cameraGeom.pupil.PupilFactory";
106  if (!pupilFactoryClass.is(py::none())) {
107  pupilFactoryName = py::str("{}.{}").format(pupilFactoryClass.attr("__module__"),
108  pupilFactoryClass.attr("__name__"));
109  }
110  self.setPupilFactoryName(pupilFactoryName);
111  });
112  cls.def("setTransformFromFocalPlaneTo", &Camera::Builder::setTransformFromFocalPlaneTo, "toSys"_a,
113  "transform"_a);
114  cls.def("discardTransformFromFocalPlaneTo", &Camera::Builder::discardTransformFromFocalPlaneTo);
115  cls.def("add", &Camera::Builder::add);
116  cls.def("__delitem__", py::overload_cast<int>(&Camera::Builder::remove));
117  cls.def("__delitem__", py::overload_cast<std::string const &>(&Camera::Builder::remove));
118  });
119 }
table::Key< std::string > pupilFactoryName
Definition: Camera.cc:124
void addSignatureDependency(std::string const &name)
Indicate an external module that provides a type used in function/method signatures.
Definition: python.h:357
py::class_< Camera, DetectorCollection, std::shared_ptr< Camera > > PyCamera
Definition: _camera.cc:40
py::class_< Camera::Builder, DetectorCollectionBase< Detector::InCameraBuilder >, std::shared_ptr< Camera::Builder > > PyCameraBuilder
Definition: _camera.cc:42
std::string const & getName() const noexcept
Return a filter's name.
Definition: Filter.h:78
void addPersistableMethods(pybind11::class_< Class, Args... > &cls)
Add table::io::Persistable and PersistableFacade methods to the pybind11 wrapper for a class.
Definition: python.h:55

◆ wrapCameraSys()

void lsst::afw::cameraGeom::wrapCameraSys ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 65 of file _cameraSys.cc.

65  {
66  /* Module level */
67  wrappers.wrapType(py::class_<CameraSysPrefix>(wrappers.module, "CameraSysPrefix"),
68  [](auto &mod, auto &cls) {
69  declareCommonSysMethods<CameraSysPrefix>(cls);
70  cls.def(py::init<std::string const &>(), "sysName"_a);
71  });
72  wrappers.wrapType(py::class_<CameraSys>(wrappers.module, "CameraSys"), [](auto &mod, auto &cls) {
73  declareCommonSysMethods<CameraSys>(cls);
74  /* Constructors */
75  cls.def(py::init<std::string const &>(), "sysName"_a);
76  cls.def(py::init<std::string const &, std::string const &>(), "sysName"_a, "detectorName"_a = "");
77  cls.def(py::init<CameraSysPrefix const &, std::string const &>(), "sysPrefix"_a,
78  "detectorName"_a = "");
79  /* Members */
80  cls.def("getDetectorName", &CameraSys::getDetectorName);
81  cls.def("hasDetectorName", &CameraSys::hasDetectorName);
82  });
83 
84  // The following must come after the associated pybind11 class is declared
85  // (e.g. FOCAL_PLANE is a CameraSys, so clsCameraSys must have been declared
86  wrappers.wrap([](auto &mod) {
87  mod.attr("FOCAL_PLANE") = py::cast(FOCAL_PLANE);
88  mod.attr("FIELD_ANGLE") = py::cast(FIELD_ANGLE);
89  mod.attr("PIXELS") = py::cast(PIXELS);
90  mod.attr("TAN_PIXELS") = py::cast(TAN_PIXELS);
91  mod.attr("ACTUAL_PIXELS") = py::cast(ACTUAL_PIXELS);
92  });
93 }
void wrap(WrapperCallback function)
Add a set of wrappers without defining a class.
Definition: python.h:369
CameraSys const FIELD_ANGLE
Field angle coordinates: Angle of a principal ray relative to the optical axis (x,...
Definition: CameraSys.cc:32
CameraSysPrefix const TAN_PIXELS
Tangent-plane pixels on the detector (x, y unbinned pixels)
Definition: CameraSys.cc:36
CameraSys const FOCAL_PLANE
Focal plane coordinates: Position on a 2-d planar approximation to the focal plane (x,...
Definition: CameraSys.cc:30
CameraSysPrefix const PIXELS
Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels).
Definition: CameraSys.cc:34
CameraSysPrefix const ACTUAL_PIXELS
The actual pixels where the photon lands and electrons are generated (x,y unbinned) This takes into a...
Definition: CameraSys.cc:38

◆ wrapDetector()

void lsst::afw::cameraGeom::wrapDetector ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 195 of file _detector.cc.

195  {
196  wrappers.addInheritanceDependency("lsst.afw.typehandling");
197  wrappers.wrapType(py::enum_<DetectorType>(wrappers.module, "DetectorType"), [](auto &mod, auto &enm) {
198  enm.value("SCIENCE", DetectorType::SCIENCE);
199  enm.value("FOCUS", DetectorType::FOCUS);
200  enm.value("GUIDER", DetectorType::GUIDER);
201  enm.value("WAVEFRONT", DetectorType::WAVEFRONT);
202  });
203  declareDetectorBase(wrappers);
204  declareDetector(wrappers);
205 }

◆ wrapDetectorCollection()

void lsst::afw::cameraGeom::wrapDetectorCollection ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 66 of file _detectorCollection.cc.

66  {
67  wrappers.addInheritanceDependency("lsst.afw.table.io");
68  wrappers.wrapType(
69  PyDetectorCollectionBase<Detector const>(wrappers.module, "DetectorCollectionDetectorBase"),
70  [](auto &mod, auto &cls) { declareDetectorCollectionBase(cls); });
71  wrappers.wrapType(PyDetectorCollection(wrappers.module, "DetectorCollection"), [](auto &mod, auto &cls) {
72  ;
73  cls.def(py::init<DetectorCollection::List>());
74  cls.def("getFpBBox", &DetectorCollection::getFpBBox);
75  table::io::python::addPersistableMethods(cls);
76  });
77 
78  wrappers.wrapType(PyDetectorCollectionBase<Detector::InCameraBuilder>(wrappers.module,
79  "DetectorCollectionBuilderBase"),
80  [](auto &mod, auto &cls) { declareDetectorCollectionBase(cls); });
81 }

◆ wrapOrientation()

void lsst::afw::cameraGeom::wrapOrientation ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 36 of file _orientation.cc.

36  {
37  wrappers.addSignatureDependency("lsst.geom");
38  wrappers.wrapType(py::class_<Orientation>(wrappers.module, "Orientation"), [](auto &mod, auto &cls) {
39  /* Constructors */
40  cls.def(py::init<lsst::geom::Point2D, lsst::geom::Point2D, lsst::geom::Angle, lsst::geom::Angle,
41  lsst::geom::Angle>(),
42  "fpPosition"_a = lsst::geom::Point2D(0, 0), "refPoint"_a = lsst::geom::Point2D(-0.5, -0.5),
43  "yaw"_a = lsst::geom::Angle(0), "pitch"_a = lsst::geom::Angle(0),
44  "roll"_a = lsst::geom::Angle(0));
45 
46  /* Operators */
47 
48  /* Members */
49  cls.def("getFpPosition", &Orientation::getFpPosition);
50  cls.def("getReferencePoint", &Orientation::getReferencePoint);
51  cls.def("getYaw", &Orientation::getYaw);
52  cls.def("getPitch", &Orientation::getPitch);
53  cls.def("getRoll", &Orientation::getRoll);
54  cls.def("getNQuarter", &Orientation::getNQuarter);
55  cls.def("makePixelFpTransform", &Orientation::makePixelFpTransform, "pixelSizeMm"_a);
56  cls.def("makeFpPixelTransform", &Orientation::makeFpPixelTransform, "pixelSizeMm"_a);
57  cls.def("getFpPosition", &Orientation::getFpPosition);
58  cls.def("getFpPosition", &Orientation::getFpPosition);
59  cls.def("getFpPosition", &Orientation::getFpPosition);
60  cls.def("getFpPosition", &Orientation::getFpPosition);
61  });
62 }

◆ wrapTransformMap()

void lsst::afw::cameraGeom::wrapTransformMap ( lsst::utils::python::WrapperCollection wrappers)

Definition at line 94 of file _transformMap.cc.

94 { declareTransformMap(wrappers); }

Variable Documentation

◆ ACTUAL_PIXELS

CameraSysPrefix const lsst::afw::cameraGeom::ACTUAL_PIXELS = CameraSysPrefix("ActualPixels")

The actual pixels where the photon lands and electrons are generated (x,y unbinned) This takes into account manufacturing defects, "tree ring" distortions and other such effects.

This is a detector prefix; call Detector.makeCameraSys(ACTUAL_PIXELS) to make a full CameraSys.

Definition at line 38 of file CameraSys.cc.

◆ FIELD_ANGLE

CameraSys const lsst::afw::cameraGeom::FIELD_ANGLE = CameraSys("FieldAngle")

Field angle coordinates: Angle of a principal ray relative to the optical axis (x,y radians).

The orientation of the x,y axes is the same as FOCAL_PLANE.

Definition at line 32 of file CameraSys.cc.

◆ FOCAL_PLANE

CameraSys const lsst::afw::cameraGeom::FOCAL_PLANE = CameraSys("FocalPlane")

Focal plane coordinates: Position on a 2-d planar approximation to the focal plane (x,y mm).

The origin and orientation may be defined by the camera team, but we strongly recommend that the origin be on the optical axis and (if using CCD detectors) that the X axis be aligned along CCD rows.

Note
Location and orientation of detectors are defined in a 3-d version of FOCAL_PLANE coordinates (the z axis is also relevant). Rectilinear x, y (and z when talking about the location of a detector) on the camera focal plane (mm). For z=0 choose a convenient point near the focus at x, y = 0.

Definition at line 30 of file CameraSys.cc.

◆ NullLinearityType

string lsst.afw.cameraGeom.NullLinearityType = "None"

Definition at line 38 of file __init__.py.

◆ PIXELS

CameraSysPrefix const lsst::afw::cameraGeom::PIXELS = CameraSysPrefix("Pixels")

Pixel coordinates: Nominal position on the entry surface of a given detector (x, y unbinned pixels).

For CCD detectors the x axis must be along rows (the direction of the serial register). This is required for our interpolation algorithm to interpolate across bad columns.

This ignores manufacturing imperfections, "tree ring" distortions and all other such effects. It is a uniform grid of rectangular (usually square) pixels.

Warning
This is a detector prefix; call Detector.makeCameraSys(PIXELS) to make a full CameraSys.

Definition at line 34 of file CameraSys.cc.

◆ TAN_PIXELS

CameraSysPrefix const lsst::afw::cameraGeom::TAN_PIXELS = CameraSysPrefix("TanPixels")

Tangent-plane pixels on the detector (x, y unbinned pixels)

Converting from PIXELS to TAN_PIXELS has the effect of removing optical distortion (and the distortion due to rectangular pixels) with the point at the center of the detector being unaffected by the transformation.

In detail, PIXELS->TAN_PIXELS is PIXELS->FIELD_ANGLE plus an affine transformation, such that:

  • The x,y axes are parallel to the detector axes
  • The dimensions are nominal pixels at the center of the focal plane (where nominal pixels size is mean of x, y pixel size).
  • The point at the center of the detector has the same value in PIXELS and TAN_PIXELS

This is a detector prefix; call Detector.makeCameraSys(TAN_PIXELS) to make a full CameraSys.

Definition at line 36 of file CameraSys.cc.