lsst.meas.algorithms
20.0.0-6-g01203fff+f7be93c67b
src
ImagePsf.cc
Go to the documentation of this file.
1
// -*- LSST-C++ -*-
2
/*
3
* LSST Data Management System
4
* Copyright 2008-2013 LSST Corporation.
5
*
6
* This product includes software developed by the
7
* LSST Project (http://www.lsst.org/).
8
*
9
* This program is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the LSST License Statement and
20
* the GNU General Public License along with this program. If not,
21
* see <http://www.lsstcorp.org/LegalNotices/>.
22
*/
23
24
#include "
lsst/geom/Point.h
"
25
#include "
lsst/afw/image/MaskedImage.h
"
26
#include "
lsst/afw/table/io/Persistable.cc
"
27
#include "
lsst/meas/algorithms/ImagePsf.h
"
28
#include "
lsst/meas/base/SdssShape.h
"
29
#include "
lsst/meas/base/ApertureFlux.h
"
30
31
namespace
lsst
{
32
namespace
afw {
33
namespace
table {
34
namespace
io {
35
36
template
std::shared_ptr<meas::algorithms::ImagePsf>
37
PersistableFacade<meas::algorithms::ImagePsf>::dynamicCast
(
std::shared_ptr<Persistable>
const
&);
38
39
}
// namespace io
40
}
// namespace table
41
}
// namespace afw
42
namespace
meas {
43
namespace
algorithms {
44
45
double
ImagePsf::doComputeApertureFlux(
double
radius,
geom::Point2D
const
& position,
46
afw::image::Color
const
& color)
const
{
47
afw::image::Image<double>
const
&
image
(*computeKernelImage(position, color, INTERNAL));
48
49
geom::Point2D
const
center(0.0, 0.0);
50
afw::geom::ellipses::Axes
const
axes(radius, radius);
51
base::ApertureFluxResult
result
= base::ApertureFluxAlgorithm::computeSincFlux(
52
image
,
afw::geom::ellipses::Ellipse
(axes, center),
base::ApertureFluxControl
());
53
return
result
.instFlux;
54
}
55
56
afw::geom::ellipses::Quadrupole
ImagePsf::doComputeShape(
geom::Point2D
const
& position,
57
afw::image::Color
const
& color)
const
{
58
PTR
(
Image
)
image
= computeKernelImage(position, color, INTERNAL);
59
return
meas::base::SdssShapeAlgorithm::computeAdaptiveMoments
(
60
*
image
,
geom::Point2D
(0.0, 0.0)
// image has origin at the center
61
)
62
.
getShape
();
63
}
64
65
}
// namespace algorithms
66
}
// namespace meas
67
}
// namespace lsst
std::shared_ptr
STL class.
lsst::afw::geom::ellipses::Axes
lsst::meas::base::ApertureFluxResult
ImagePsf.h
Persistable.cc
result
std::unique_ptr< SchemaItem< U > > result
image
afw::table::Key< afw::table::Array< ImagePixelT > > image
PTR
#define PTR(...)
lsst::meas::base::SdssShapeAlgorithm::computeAdaptiveMoments
SdssShapeResult computeAdaptiveMoments(ImageT const &image, geom::Point2D const ¢er, bool negative, Control const &control)
Point.h
lsst
lsst::afw::table::io::PersistableFacade::dynamicCast
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
lsst::afw::geom::ellipses::Ellipse
lsst::afw::geom::ellipses::Quadrupole
Point< double, 2 >
ApertureFlux.h
lsst::meas::base::SdssShapeResult::getShape
Shape const getShape() const
MaskedImage.h
lsst::meas::base::ApertureFluxControl
lsst::afw::image::Image
SdssShape.h
lsst::afw::image::Color
Generated on Wed Aug 12 2020 01:37:02 for lsst.meas.algorithms by
1.8.18