lsst.meas.algorithms
g4a7591d645+fa9daf83c6
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
meas
algorithms
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
"
30
#include "
lsst/afw/geom/Transform.h
"
31
#include "
lsst/afw/math/warpExposure.h
"
32
#include "
lsst/afw/table/io/Persistable.h
"
33
#include "
lsst/meas/algorithms/ImagePsf.h
"
34
35
namespace
lsst
{
36
namespace
meas
{
37
namespace
algorithms
{
38
52
class
WarpedPsf
final :
public
afw::table::io::PersistableFacade
<WarpedPsf>,
public
ImagePsf
{
53
public
:
60
WarpedPsf
(
std::shared_ptr<afw::detection::Psf const>
undistortedPsf,
61
std::shared_ptr<afw::geom::TransformPoint2ToPoint2 const>
distortion,
62
std::shared_ptr<afw::math::WarpingControl const>
control);
63
WarpedPsf
(
std::shared_ptr<afw::detection::Psf const>
undistortedPsf,
64
std::shared_ptr<afw::geom::TransformPoint2ToPoint2 const>
distortion,
65
std::string
const
& kernelName =
"lanczos3"
,
unsigned
int
cache = 10000);
66
72
geom::Point2D
getAveragePosition
()
const override
;
73
75
std::shared_ptr<afw::detection::Psf>
clone
()
const override
;
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
85
protected
:
86
std::shared_ptr<afw::detection::Psf::Image>
doComputeKernelImage
(
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
93
std::shared_ptr<afw::detection::Psf const>
_undistortedPsf
;
94
std::shared_ptr<afw::geom::TransformPoint2ToPoint2 const>
_distortion
;
95
96
private
:
97
void
_init();
98
std::shared_ptr<afw::math::WarpingControl const>
_warpingControl;
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
Box.h
ImagePsf.h
Persistable.h
Transform.h
std::string
lsst::afw::image::Color
lsst::afw::table::io::PersistableFacade
lsst::afw::detection::Psf::OutputArchiveHandle
io::OutputArchiveHandle OutputArchiveHandle
lsst::geom::Box2I
lsst::meas::algorithms::ImagePsf::ImagePsf
ImagePsf(bool isFixed=false)
Definition
ImagePsf.h:42
lsst::meas::algorithms::WarpedPsf::write
void write(OutputArchiveHandle &handle) const override
Definition
WarpedPsf.cc:318
lsst::meas::algorithms::WarpedPsf::resized
std::shared_ptr< afw::detection::Psf > resized(int width, int height) const override
Return a clone with specified kernel dimensions.
Definition
WarpedPsf.cc:228
lsst::meas::algorithms::WarpedPsf::getAveragePosition
geom::Point2D getAveragePosition() const override
Return the average of the positions of the stars that went into this Psf.
Definition
WarpedPsf.cc:220
lsst::meas::algorithms::WarpedPsf::doComputeBBox
geom::Box2I doComputeBBox(geom::Point2D const &position, afw::image::Color const &color) const override
Definition
WarpedPsf.cc:264
lsst::meas::algorithms::WarpedPsf::doComputeKernelImage
std::shared_ptr< afw::detection::Psf::Image > doComputeKernelImage(geom::Point2D const &position, afw::image::Color const &color) const override
Definition
WarpedPsf.cc:235
lsst::meas::algorithms::WarpedPsf::_distortion
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > _distortion
Definition
WarpedPsf.h:94
lsst::meas::algorithms::WarpedPsf::_undistortedPsf
std::shared_ptr< afw::detection::Psf const > _undistortedPsf
Definition
WarpedPsf.h:93
lsst::meas::algorithms::WarpedPsf::WarpedPsf
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
lsst::meas::algorithms::WarpedPsf::getPersistenceName
std::string getPersistenceName() const override
Definition
WarpedPsf.cc:315
lsst::meas::algorithms::WarpedPsf::clone
std::shared_ptr< afw::detection::Psf > clone() const override
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.
Definition
WarpedPsf.cc:224
lsst::meas::algorithms::WarpedPsf::isPersistable
bool isPersistable() const noexcept override
Definition
WarpedPsf.h:80
lsst::meas::algorithms::WarpedPsf::getPythonModule
std::string getPythonModule() const override
Definition
WarpedPsf.cc:316
lsst::geom::Point2D
Point< double, 2 > Point2D
lsst::meas::algorithms
Definition
mainpage.dox:13
lsst::meas
lsst
std::shared_ptr
warpExposure.h
Generated on
for lsst.meas.algorithms by
1.17.0