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.cc
Go to the documentation of this file.
1 /*
2  * This file is part of afw.
3  *
4  * Developed for the LSST Data Management System.
5  * This product includes software developed by the LSST Project
6  * (https://www.lsst.org).
7  * See the COPYRIGHT file at the top-level directory of this distribution
8  * for details of code ownership.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
25 
26 namespace lsst {
27 namespace afw {
28 namespace math {
29 
31  return std::pow(_skyWcs.getPixelScale(position).asDegrees(), 2) * _inverseScale;
32 }
33 
35  auto rhsCasted = dynamic_cast<PixelScaleBoundedField const *>(&rhs);
36  if (!rhsCasted) return false;
37 
38  return getBBox() == rhsCasted->getBBox() && getSkyWcs() == rhsCasted->getSkyWcs();
39 }
40 
41 std::string PixelScaleBoundedField::toString() const {
43  os << "PixelScaleBoundedField(" << _skyWcs << ")";
44  return os.str();
45 }
46 
47 } // namespace math
48 } // namespace afw
49 } // namespace lsst
PixelScaleBoundedField.h
std::string
STL class.
lsst::afw::math::BoundedField
An abstract base class for 2-d functions defined on an integer bounding boxes.
Definition: BoundedField.h:55
lsst::afw
Definition: imageAlgorithm.dox:1
lsst::afw::math::PixelScaleBoundedField::evaluate
double evaluate(lsst::geom::Point2D const &position) const override
Evaluate the field at the given point.
Definition: PixelScaleBoundedField.cc:30
lsst::afw::math::PixelScaleBoundedField::operator==
bool operator==(BoundedField const &rhs) const override
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.
Definition: PixelScaleBoundedField.cc:34
lsst::afw::math::PixelScaleBoundedField::getSkyWcs
geom::SkyWcs const & getSkyWcs() const
Get the contained SkyWcs.
Definition: PixelScaleBoundedField.h:67
lsst::afw::math::PixelScaleBoundedField
A BoundedField that gives the amount a pixel is distorted at each point.
Definition: PixelScaleBoundedField.h:49
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::afw::math::BoundedField::getBBox
lsst::geom::Box2I getBBox() const
Return the bounding box that defines the region where the field is valid.
Definition: BoundedField.h:112
std::ostringstream
STL class.
os
std::ostream * os
Definition: Schema.cc:746
lsst::geom::Point< double, 2 >
std::pow
T pow(T... args)