LSSTApplications  12.1-5-gbdcc3ab+2,15.0+13,15.0+26,15.0-1-g19261fa+17,15.0-1-g60afb23+26,15.0-1-g615e0bb+18,15.0-1-g788a293+26,15.0-1-ga91101e+26,15.0-1-gae1598d+12,15.0-1-gd076f1f+24,15.0-1-gdf18595+5,15.0-1-gf4f1c34+12,15.0-11-g7db6e543+4,15.0-12-g3681e7a+4,15.0-15-gc15de322,15.0-16-g83b84f4,15.0-2-g100d730+19,15.0-2-g1f9c9cf+4,15.0-2-g8aea5f4+1,15.0-2-gf38729e+21,15.0-29-ga12a2b06e,15.0-3-g11fe1a0+14,15.0-3-g707930d+3,15.0-3-g9103c06+12,15.0-3-gd3cbb57+3,15.0-4-g2d82b59,15.0-4-g535e784+10,15.0-4-g92ca6c3+4,15.0-4-gf906033+2,15.0-5-g23e394c+14,15.0-5-g4be42a9,15.0-6-g69628aa,15.0-6-g86e3f3d+1,15.0-6-gfa9b38f+4,15.0-7-g949993c+3,15.0-8-g67a62d3+1,15.0-8-gcf05001+1,15.0-9-g1e7c341+1,w.2018.21
LSSTDataManagementBasePackage
Orientation.h
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014 LSST Corporation.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <http://www.lsstcorp.org/LegalNotices/>.
21  */
22 
23 #if !defined(LSST_AFW_CAMERAGEOM_ORIENTATION_H)
24 #define LSST_AFW_CAMERAGEOM_ORIENTATION_H
25 
26 #include <string>
27 #include <cmath>
28 #include "Eigen/Dense"
29 #include "lsst/afw/geom.h"
30 #include "lsst/afw/image/Utils.h"
31 
32 /*
33  * Describe a Detector's orientation
34  */
35 namespace lsst {
36 namespace afw {
37 namespace cameraGeom {
38 
51 class Orientation {
52 public:
53  explicit Orientation(
54  geom::Point2D const fpPosition = geom::Point2D(0, 0),
56  geom::Point2D const refPoint = geom::Point2D(-0.5, -0.5),
60  geom::Angle const yaw = geom::Angle(0),
61  geom::Angle const pitch =
62  geom::Angle(0),
63  geom::Angle const roll =
64  geom::Angle(0)
65  );
66 
67  ~Orientation();
68  Orientation(Orientation const &);
72 
74  geom::Point2D getFpPosition() const { return _fpPosition; }
75 
77  geom::Point2D getReferencePoint() const { return _refPoint; }
78 
80  geom::Angle getYaw() const { return _yaw; }
81 
83  lsst::afw::geom::Angle getPitch() const { return _pitch; }
84 
86  geom::Angle getRoll() const { return _roll; }
87 
89  int getNQuarter() const;
90 
97  geom::Extent2D const pixelSizeMm
98  ) const;
99 
106  geom::Extent2D const pixelSizeMm
107  ) const;
108 
109 private:
110  geom::Point2D _fpPosition;
111  geom::Point2D _refPoint;
112 
114  lsst::afw::geom::Angle _pitch;
115  lsst::afw::geom::Angle _roll;
116 
117  // Elements of the Jacobian for three space rotation projected into XY plane.
118  // Turn off alignment since this is dynamically allocated (via Detector)
119  Eigen::Matrix<double, 2, 2, Eigen::DontAlign> _rotMat;
120 };
121 }
122 }
123 }
124 
125 #endif
Orientation(geom::Point2D const fpPosition=geom::Point2D(0, 0), geom::Point2D const refPoint=geom::Point2D(-0.5, -0.5), geom::Angle const yaw=geom::Angle(0), geom::Angle const pitch=geom::Angle(0), geom::Angle const roll=geom::Angle(0))
Definition: Orientation.cc:29
std::shared_ptr< geom::TransformPoint2ToPoint2 > makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from focal plane to pixel coordinates.
Definition: Orientation.cc:76
geom::Angle getYaw() const
Return the yaw angle.
Definition: Orientation.h:80
geom::Point2D getReferencePoint() const
Return detector reference point (pixels)
Definition: Orientation.h:77
Describe a detector&#39;s orientation in the focal plane.
Definition: Orientation.h:51
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)
Definition: Orientation.cc:54
A class representing an angle.
Definition: Angle.h:102
A base class for image defects.
Definition: cameraGeom.dox:3
std::shared_ptr< geom::TransformPoint2ToPoint2 > makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from pixel to focal plane coordinates.
Definition: Orientation.cc:62
geom::Point2D getFpPosition() const
Return focal plane position of detector reference point (mm)
Definition: Orientation.h:74
geom::Angle getRoll() const
Return the roll angle.
Definition: Orientation.h:86
Orientation & operator=(Orientation const &)
lsst::afw::geom::Angle getPitch() const
Return the pitch angle.
Definition: Orientation.h:83