LSST Applications g180d380827+107df2c2fa,g2079a07aa2+86d27d4dc4,g2305ad1205+27ad5d03fa,g2bbee38e9b+c6a8a0fb72,g337abbeb29+c6a8a0fb72,g33d1c0ed96+c6a8a0fb72,g3a166c0a6a+c6a8a0fb72,g3d1719c13e+cc4c7597ef,g487adcacf7+4b0be3ae0a,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+14d443d837,g62aa8f1a4b+588cc723a1,g674612935b+7a21c67e12,g858d7b2824+cc4c7597ef,g991b906543+cc4c7597ef,g99cad8db69+b90e8bab37,g9c22b2923f+e2510deafe,g9ddcbc5298+9a081db1e4,g9fbc5161f1+1dc7c5428e,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+cc4c7597ef,gba4ed39666+c2a2e4ac27,gbb8dafda3b+52e28152d7,gbd998247f1+585e252eca,gbeadb96d05+a322446fe6,gc120e1dc64+6a70fcc921,gc28159a63d+c6a8a0fb72,gc3e9b769f7+48c1343504,gcf0d15dbbd+7a21c67e12,gdaeeff99f8+f9a426f77a,ge6526c86ff+9349653ccd,ge79ae78c31+c6a8a0fb72,gee10cc3b42+585e252eca,w.2024.18
LSST Data Management Base Package
Loading...
Searching...
No Matches
WarpedPsf.h
Go to the documentation of this file.
1// -*- lsst-c++ -*-
2
3/*
4 * This file is part of meas_algorithms.
5 *
6 * Developed for the LSST Data Management System.
7 * This product includes software developed by the LSST Project
8 * (https://www.lsst.org).
9 * See the COPYRIGHT file at the top-level directory of this distribution
10 * for details of code ownership.
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 */
25
26#ifndef LSST_MEAS_ALGORITHMS_WARPEDPSF_H
27#define LSST_MEAS_ALGORITHMS_WARPEDPSF_H
28
29#include "lsst/geom/Box.h"
34
35namespace lsst {
36namespace meas {
37namespace algorithms {
38
52class WarpedPsf final : public afw::table::io::PersistableFacade<WarpedPsf>, public ImagePsf {
53public:
65 std::string const& kernelName = "lanczos3", unsigned int cache = 10000);
66
72 geom::Point2D getAveragePosition() const override;
73
76
78 std::shared_ptr<afw::detection::Psf> resized(int width, int height) const override;
79
80 bool isPersistable() const noexcept override {
81 return _undistortedPsf->isPersistable() && _distortion->isPersistable() &&
82 _warpingControl->isPersistable();
83 }
84
85protected:
87 geom::Point2D const& position, afw::image::Color const& color) const override;
88
89 std::string getPersistenceName() const override;
90 std::string getPythonModule() const override;
91 void write(OutputArchiveHandle& handle) const override;
92
95
96private:
97 void _init();
99
100 geom::Box2I doComputeBBox(geom::Point2D const& position, afw::image::Color const& color) const override;
101};
102
103} // namespace algorithms
104} // namespace meas
105} // namespace lsst
106
107#endif // LSST_MEAS_ALGORITHMS_WARPEDPSF_H
Describe the colour of a source.
Definition Color.h:25
A CRTP facade class for subclasses of Persistable.
io::OutputArchiveHandle OutputArchiveHandle
An integer coordinate rectangle.
Definition Box.h:55
An intermediate base class for Psfs that use an image representation.
Definition ImagePsf.h:40
A Psf class that maps an arbitrary Psf through a coordinate transformation.
Definition WarpedPsf.h:52
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
Definition WarpedPsf.cc:318
std::shared_ptr< afw::detection::Psf > resized(int width, int height) const override
Return a clone with specified kernel dimensions.
Definition WarpedPsf.cc:228
geom::Point2D getAveragePosition() const override
Return the average of the positions of the stars that went into this Psf.
Definition WarpedPsf.cc:220
geom::Box2I doComputeBBox(geom::Point2D const &position, afw::image::Color const &color) const override
Definition WarpedPsf.cc:264
std::shared_ptr< afw::detection::Psf::Image > doComputeKernelImage(geom::Point2D const &position, afw::image::Color const &color) const override
These virtual member functions are private, not protected, because we only want derived classes to im...
Definition WarpedPsf.cc:235
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > _distortion
Definition WarpedPsf.h:94
std::shared_ptr< afw::detection::Psf const > _undistortedPsf
Definition WarpedPsf.h:93
WarpedPsf(std::shared_ptr< afw::detection::Psf const > undistortedPsf, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > distortion, std::shared_ptr< afw::math::WarpingControl const > control)
Construct WarpedPsf from unwarped psf and distortion.
Definition WarpedPsf.cc:186
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
Definition WarpedPsf.cc:315
std::shared_ptr< afw::detection::Psf > clone() const override
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.
Definition WarpedPsf.cc:224
bool isPersistable() const noexcept override
Return true if this particular object can be persisted using afw::table::io.
Definition WarpedPsf.h:80
std::string getPythonModule() const override
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
Definition WarpedPsf.cc:316