LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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 
37 namespace lsst {
38 namespace afw {
39 namespace cameraGeom {
40 
53 class Orientation {
54 public:
55  explicit Orientation(
56  geom::Point2D const fpPosition=geom::Point2D(0, 0),
58  geom::Point2D const refPoint=geom::Point2D(-0.5, -0.5),
62  geom::Angle const yaw=geom::Angle(0),
63  geom::Angle const pitch=geom::Angle(0),
64  geom::Angle const roll=geom::Angle(0)
65  );
66 
69 
72 
74  geom::Angle getYaw() const { return _yaw; }
75 
78 
80  geom::Angle getRoll() const { return _roll; }
81 
83  int getNQuarter() const;
84 
91  geom::Extent2D const pixelSizeMm
92  ) const;
93 
100  geom::Extent2D const pixelSizeMm
101  ) const;
102 
103 private:
106 
110 
111  // Elements of the Jacobian for three space rotation projected into XY plane.
112  // Turn off alignment since this is dynamically allocated (via Detector)
113  Eigen::Matrix<double,2,2,Eigen::DontAlign> _rotMat;
114 };
115 
116 }}}
117 
118 #endif
An include file to include the header files for lsst::afw::geom.
geom::AffineXYTransform makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from pixel to focal plane coordinates.
Definition: Orientation.cc:69
lsst::afw::geom::Angle _pitch
pitch
Definition: Orientation.h:108
A set of classes of general utility in connection with images.
lsst::afw::geom::Angle _roll
roll
Definition: Orientation.h:109
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
geom::Point2D getReferencePoint() const
Return detector reference point (pixels)
Definition: Orientation.h:71
geom::Angle getRoll() const
Return the roll angle.
Definition: Orientation.h:80
geom::Angle getYaw() const
Return the yaw angle.
Definition: Orientation.h:74
geom::AffineXYTransform makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate an XYTransform from focal plane to pixel coordinates.
Definition: Orientation.cc:84
lsst::afw::geom::Angle _yaw
yaw
Definition: Orientation.h:107
geom::Point2D _refPoint
reference point on detector
Definition: Orientation.h:105
lsst::afw::geom::Angle getPitch() const
Return the pitch angle.
Definition: Orientation.h:77
geom::Point2D _fpPosition
focal plane position of reference point on detector
Definition: Orientation.h:104
Wrap an AffineTransform.
Definition: XYTransform.h:152
geom::Point2D getFpPosition() const
Return focal plane position of detector reference point (mm)
Definition: Orientation.h:68
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)
Definition: Orientation.cc:61
Eigen::Matrix< double, 2, 2, Eigen::DontAlign > _rotMat
Definition: Orientation.h:113