lsst.afw
g3a5ebb7d8a+28b83bf6a5
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
afw
cameraGeom
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/geom.h
"
30
#include "
lsst/afw/geom/Transform.h
"
31
32
/*
33
* Describe a Detector's orientation
34
*/
35
namespace
lsst
{
36
namespace
afw
{
37
namespace
cameraGeom
{
38
51
class
Orientation
final {
52
public
:
53
explicit
Orientation
(
lsst::geom::Point3D
const
fpPosition =
lsst::geom::Point3D
(0, 0, 0),
55
lsst::geom::Point2D
const
refPoint =
lsst::geom::Point2D
(-0.5, -0.5),
59
lsst::geom::Angle
const
yaw =
60
lsst::geom::Angle
(0),
61
lsst::geom::Angle
const
pitch =
lsst::geom::Angle
(
62
0),
63
lsst::geom::Angle
const
roll =
lsst::geom::Angle
(
64
0)
65
);
66
67
68
// Initialize with Point2D and default fpPosition_z=0.0
69
explicit
Orientation
(
lsst::geom::Point2D
const
fpPosition2,
70
lsst::geom::Point2D
const
refPoint =
lsst::geom::Point2D
(-0.5, -0.5),
71
lsst::geom::Angle
const
yaw =
lsst::geom::Angle
(0),
72
lsst::geom::Angle
const
pitch =
lsst::geom::Angle
(0),
73
lsst::geom::Angle
const
roll =
lsst::geom::Angle
(0)
74
) :
Orientation
(
lsst
::
geom
::Point3D(fpPosition2[0], fpPosition2[1], 0.0), refPoint, yaw, pitch, roll)
75
{}
76
77
~Orientation
() noexcept;
78
Orientation
(
Orientation
const &) noexcept;
79
Orientation
(
Orientation
&&) noexcept;
80
Orientation
&operator=(
Orientation
const &) noexcept;
81
Orientation
&operator=(
Orientation
&&) noexcept;
82
84
lsst
::
geom
::Point2D
getFpPosition
()
const
{
85
return
lsst::geom::Point2D
(_fpPosition[0], _fpPosition[1]);
86
}
87
88
lsst::geom::Point3D
getFpPosition3
() const noexcept {
return
_fpPosition; }
89
91
lsst::geom::Point2D
getReferencePoint
() const noexcept {
return
_refPoint; }
92
93
double
getHeight
() const noexcept {
return
_fpPosition[2]; }
94
96
lsst::geom::Angle
getYaw
() const noexcept {
return
_yaw; }
97
99
lsst::geom::Angle
getPitch
() const noexcept {
return
_pitch; }
100
102
lsst::geom::Angle
getRoll
() const noexcept {
return
_roll; }
103
105
int
getNQuarter
() const noexcept;
106
112
std
::shared_ptr<
geom
::TransformPoint2ToPoint2>
makePixelFpTransform
(
113
lsst
::
geom
::Extent2D const pixelSizeMm
114
) const;
115
121
std
::shared_ptr<
geom
::TransformPoint2ToPoint2>
makeFpPixelTransform
(
122
lsst
::
geom
::Extent2D const pixelSizeMm
123
) const;
124
125
private:
126
lsst
::
geom
::Point3D _fpPosition;
127
lsst
::
geom
::Point2D _refPoint;
128
129
lsst
::
geom
::Angle _yaw;
130
lsst
::
geom
::Angle _pitch;
131
lsst
::
geom
::Angle _roll;
132
133
// Elements of the Jacobian for three space rotation projected into XY plane.
134
// Turn off alignment since this is dynamically allocated (via Detector)
135
Eigen::Matrix<
double
, 2, 2, Eigen::DontAlign> _rotMat;
136
};
137
}
// namespace cameraGeom
138
}
// namespace afw
139
}
// namespace lsst
140
141
#endif
Transform.h
lsst::afw::cameraGeom::Orientation::getReferencePoint
lsst::geom::Point2D getReferencePoint() const noexcept
Return detector reference point (pixels).
Definition
Orientation.h:91
lsst::afw::cameraGeom::Orientation::getPitch
lsst::geom::Angle getPitch() const noexcept
Return the pitch angle.
Definition
Orientation.h:99
lsst::afw::cameraGeom::Orientation::getYaw
lsst::geom::Angle getYaw() const noexcept
Return the yaw angle.
Definition
Orientation.h:96
lsst::afw::cameraGeom::Orientation::getHeight
double getHeight() const noexcept
Definition
Orientation.h:93
lsst::afw::cameraGeom::Orientation::Orientation
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))
Definition
Orientation.cc:30
lsst::afw::cameraGeom::Orientation::makePixelFpTransform
std::shared_ptr< geom::TransformPoint2ToPoint2 > makePixelFpTransform(lsst::geom::Extent2D const pixelSizeMm) const
Generate a Transform from pixel to focal plane coordinates.
Definition
Orientation.cc:93
lsst::afw::cameraGeom::Orientation::Orientation
Orientation(lsst::geom::Point2D const fpPosition2, 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))
Definition
Orientation.h:69
lsst::afw::cameraGeom::Orientation::getFpPosition3
lsst::geom::Point3D getFpPosition3() const noexcept
Definition
Orientation.h:88
lsst::afw::cameraGeom::Orientation::makeFpPixelTransform
std::shared_ptr< geom::TransformPoint2ToPoint2 > makeFpPixelTransform(lsst::geom::Extent2D const pixelSizeMm) const
Generate a Transform from focal plane to pixel coordinates.
Definition
Orientation.cc:107
lsst::afw::cameraGeom::Orientation::getFpPosition
lsst::geom::Point2D getFpPosition() const
Return focal plane position of detector reference point (mm).
Definition
Orientation.h:84
lsst::afw::cameraGeom::Orientation::getNQuarter
int getNQuarter() const noexcept
Return the number of quarter turns (rounded to the closest quarter).
Definition
Orientation.cc:85
lsst::afw::cameraGeom::Orientation::~Orientation
~Orientation() noexcept
lsst::afw::cameraGeom::Orientation::getRoll
lsst::geom::Angle getRoll() const noexcept
Return the roll angle.
Definition
Orientation.h:102
lsst::geom::Angle
geom.h
lsst::afw::cameraGeom
Definition
Amplifier.h:33
lsst::afw
Definition
imageAlgorithm.dox:1
lsst::geom
lsst::geom::Point3D
Point< double, 3 > Point3D
lsst::geom::Point2D
Point< double, 2 > Point2D
lsst
std
STL namespace.
Generated on
for lsst.afw by
1.17.0