46 _rotMat << cosYaw * cosPitch, cosYaw * sinPitch * sinRoll - cosRoll * sinYaw, cosPitch * sinYaw,
47 cosYaw * cosRoll + sinYaw * sinPitch * sinRoll;
53 : _fpPosition(other._fpPosition),
54 _refPoint(other._refPoint),
58 _rotMat(other._rotMat) {}
60 : _fpPosition(
std::move(other._fpPosition)),
67 _fpPosition = other._fpPosition;
68 _refPoint = other._refPoint;
70 _pitch = other._pitch;
72 _rotMat = other._rotMat;
76 _fpPosition =
std::move(other._fpPosition);
97 Eigen::Matrix2d jacobian =
98 _rotMat.array() * (Eigen::Vector2d::Ones() * pixelSizeMm.
asEigen().transpose()).array();
100 Eigen::Vector2d refMm = pixelSizeMm.
asEigen().array() * _refPoint.
asEigen().array();
101 Eigen::Vector2d translation = _fpPosition.
asEigen().head<2>() - (_rotMat * refMm);
table::Point2DKey refPoint
table::Point3DKey fpPosition
table::Key< lsst::geom::Angle > yaw
table::Key< lsst::geom::Angle > roll
table::Key< lsst::geom::Angle > pitch
Describe a detector's orientation in the focal plane.
Orientation(lsst::geom::Point3D const fpPosition=lsst::geom::Point3D(0, 0, 0), lsst::geom::Point2D const refPoint=lsst::geom::Point2D(-0.5, -0.5), lsst::geom::Angle const yaw=lsst::geom::Angle(0), lsst::geom::Angle const pitch=lsst::geom::Angle(0), lsst::geom::Angle const roll=lsst::geom::Angle(0))
Orientation & operator=(Orientation const &) noexcept
std::shared_ptr< geom::TransformPoint2ToPoint2 > makePixelFpTransform(lsst::geom::Extent2D const pixelSizeMm) const
Generate a Transform from pixel to focal plane coordinates.
std::shared_ptr< geom::TransformPoint2ToPoint2 > makeFpPixelTransform(lsst::geom::Extent2D const pixelSizeMm) const
Generate a Transform from focal plane to pixel coordinates.
int getNQuarter() const noexcept
Return the number of quarter turns (rounded to the closest quarter)
constexpr double asDegrees() const noexcept
EigenVector const & asEigen() const noexcept(IS_ELEMENT_NOTHROW_COPYABLE)
std::shared_ptr< TransformPoint2ToPoint2 > makeTransform(lsst::geom::AffineTransform const &affine)
Wrap an lsst::geom::AffineTransform as a Transform.