26 #include <pybind11/pybind11.h>
27 #include <pybind11/stl.h>
39 namespace py = pybind11;
40 using namespace py::literals;
44 namespace cameraGeom {
47 py::module mod(
"_detector",
"Python wrapper for afw _detector library");
50 py::class_<Detector, std::shared_ptr<Detector>>
cls(mod,
"Detector");
53 py::enum_<DetectorType>(mod,
"DetectorType")
64 "name"_a,
"id"_a,
"type"_a,
"serial"_a,
"bbox"_a,
"ampInfoCatalog"_a,
"orientation"_a,
65 "pixelSize"_a,
"transforms"_a);
68 cls.def(
"__getitem__",
69 (std::shared_ptr<table::AmpInfoRecord const>(
Detector::*)(
int)
const) & Detector::_get,
"i"_a);
70 cls.def(
"__getitem__",
71 (std::shared_ptr<table::AmpInfoRecord const>(
Detector::*)(std::string
const &)
const) &
74 cls.def(
"__len__", &Detector::size);
77 cls.def(
"getName", &Detector::getName);
78 cls.def(
"getId", &Detector::getId);
79 cls.def(
"getType", &Detector::getType);
80 cls.def(
"getSerial", &Detector::getSerial);
81 cls.def(
"getBBox", &Detector::getBBox);
83 (std::vector<geom::Point2D>(
Detector::*)(
CameraSys const &)
const) & Detector::getCorners,
92 cls.def(
"getAmpInfoCatalog", &Detector::getAmpInfoCatalog);
93 cls.def(
"getOrientation", &Detector::getOrientation);
94 cls.def(
"getPixelSize", &Detector::getPixelSize);
95 cls.def(
"getTransformMap", &Detector::getTransformMap);
96 cls.def(
"hasTransform", (
bool (
Detector::*)(
CameraSys const &)
const) & Detector::hasTransform,
100 cls.def(
"getTransform",
103 Detector::getTransform,
104 "fromSys"_a,
"toSys"_a);
105 cls.def(
"getTransform",
108 Detector::getTransform,
109 "fromSys"_a,
"toSys"_a);
110 cls.def(
"getTransform",
113 Detector::getTransform,
114 "fromSys"_a,
"toSys"_a);
115 cls.def(
"getTransform",
118 Detector::getTransform,
119 "fromSys"_a,
"toSys"_a);
120 cls.def(
"getNativeCoordSys", &Detector::getNativeCoordSys);
121 cls.def(
"makeCameraPoint",
123 Detector::makeCameraPoint,
124 "point"_a,
"cameraSys"_a);
125 cls.def(
"makeCameraPoint",
127 Detector::makeCameraPoint,
128 "point"_a,
"cameraSysPrefix"_a);
129 cls.def(
"makeCameraSys",
132 cls.def(
"makeCameraSys",
134 "cameraSysPrefix"_a);
137 "fromCameraPoint"_a,
"toSys"_a);
141 "fromCameraPoint"_a,
"toSys"_a);
Camera coordinate system; used as a key in in TransformMap.
A custom container class for records, based on std::vector.
An integer coordinate rectangle.
Describe a detector's orientation in the focal plane.
PYBIND11_PLUGIN(_cameraPoint)
Camera coordinate system prefix.
Information about a CCD or other imaging detector.
A Point2D with associated camera coordinate system.
DetectorType
Type of imaging detector.