lsst.afw
tickets.DM-23835-g31c64b24f1
include
lsst
afw
math
PixelScaleBoundedField.h
Go to the documentation of this file.
1
// -*- LSST-C++ -*-
2
/*
3
* This file is part of afw.
4
*
5
* Developed for the LSST Data Management System.
6
* This product includes software developed by the LSST Project
7
* (https://www.lsst.org).
8
* See the COPYRIGHT file at the top-level directory of this distribution
9
* for details of code ownership.
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with this program. If not, see <https://www.gnu.org/licenses/>.
23
*/
24
28
#ifndef LSST_AFW_MATH_PixelScaleBoundedField_h_INCLUDED
29
#define LSST_AFW_MATH_PixelScaleBoundedField_h_INCLUDED
30
31
#include "
lsst/afw/geom/SkyWcs.h
"
32
#include "
lsst/afw/math/BoundedField.h
"
33
#include "
lsst/pex/exceptions.h
"
34
35
namespace
lsst
{
36
namespace
afw {
37
namespace
math {
38
47
// Removal ticket is DM-22192.
48
class
[[deprecated("Replaced by
PixelAreaBoundedField
; will be removed prior
to
release 20.
")]]
49
PixelScaleBoundedField : public BoundedField {
50
public:
54
PixelScaleBoundedField(lsst::geom::Box2I const &bbox, geom::SkyWcs const &skyWcs)
55
: BoundedField(bbox),
56
_skyWcs(skyWcs),
57
_inverseScale(1.0 / std::pow(skyWcs.getPixelScale().asDegrees(), 2)) {}
58
59
~PixelScaleBoundedField() override = default;
60
61
PixelScaleBoundedField(PixelScaleBoundedField const &) = default;
62
PixelScaleBoundedField(PixelScaleBoundedField &&) = default;
63
PixelScaleBoundedField &operator=(PixelScaleBoundedField const &) = delete;
64
PixelScaleBoundedField &operator=(PixelScaleBoundedField &&) = delete;
65
67
geom::SkyWcs const &getSkyWcs() const { return _skyWcs; }
69
double getInverseScale() const { return _inverseScale; }
70
72
double evaluate(lsst::geom::Point2D const &position) const override;
73
75
bool isPersistable() const noexcept override { return false; }
76
78
std::shared_ptr<BoundedField> operator*(double const scale) const override {
79
throw LSST_EXCEPT(pex::exceptions::LogicError, "
Not implemented
");
80
}
81
83
bool operator==(BoundedField const &rhs) const override;
84
85
private:
86
geom::SkyWcs const _skyWcs;
87
// Inverse pixel scale (square degrees), for convenience.
88
double const _inverseScale;
89
90
std::string toString() const override;
91
};
92
93
} // namespace math
94
} // namespace afw
95
} // namespace lsst
96
97
#endif // !LSST_AFW_MATH_PixelScaleBoundedField_h_INCLUDED
lsst::afw::math::PixelAreaBoundedField
A BoundedField that evaluate the pixel area of a SkyWcs in angular units.
Definition:
PixelAreaBoundedField.h:47
exceptions.h
SkyWcs.h
lsst
A base class for image defects.
to
table::Key< int > to
Definition:
TransformMap.cc:349
BoundedField.h
Generated on Mon Mar 30 2020 10:53:25 for lsst.afw by
1.8.16