LSSTApplications  19.0.0-1-g1faeb96,19.0.0-1-g8c57eb9+33,19.0.0-1-ga3b31f8+2,19.0.0-1-gad49e94,19.0.0-14-g7511ce4+10,19.0.0-17-gde1f5b76+2,19.0.0-18-gfb21c91+1,19.0.0-19-gb85e94b+1,19.0.0-19-gda55c62e5,19.0.0-2-g15ad1b6+1,19.0.0-2-g2ed0b45,19.0.0-2-g456d77f+2,19.0.0-2-g4aada73,19.0.0-2-g5e94dc7,19.0.0-2-g6e0b8f9,19.0.0-2-g822544a+1,19.0.0-2-gb013ac2+1,19.0.0-2-gd82b0d5+2,19.0.0-20-g3336a1e+2,19.0.0-22-g08d7e7a+2,19.0.0-22-ge8ce431+1,19.0.0-3-g57fcecc+1,19.0.0-3-g9629746,19.0.0-3-g99a058e,19.0.0-3-ga84a0ef,19.0.0-3-gbea416a,19.0.0-3-gc2296d9,19.0.0-3-gc70e9ed,19.0.0-3-gc851abf+2,19.0.0-4-gac56cce+21,19.0.0-4-gb666382+2,19.0.0-4-gc799371+2,19.0.0-5-g24a5ec6,19.0.0-51-gb87bce2+1,19.0.0-54-g1bde8684,19.0.0-6-g4aaee92+2,19.0.0-6-gce3e386+2,19.0.0-8-g967c747,19.0.0-8-gb750100+1,19.0.0-9-g98aad11,w.2020.17
LSSTDataManagementBasePackage
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"
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
lsst::afw
Definition: imageAlgorithm.dox:1
SkyWcs.h
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
to
table::Key< int > to
Definition: TransformMap.cc:349
BoundedField.h