lsst.meas.algorithms gbe01a4569f+e9e1bf127d
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"
30
31namespace lsst {
32namespace afw {
33namespace table {
34namespace io {
35
38
39} // namespace io
40} // namespace table
41} // namespace afw
42namespace meas {
43namespace algorithms {
44
45double 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(
53 return result.instFlux;
54}
55
56afw::geom::ellipses::Quadrupole ImagePsf::doComputeShape(geom::Point2D const& position,
57 afw::image::Color const& color) const {
58 std::shared_ptr<Image> image = computeKernelImage(position, color, INTERNAL);
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
afw::table::Key< afw::table::Array< ImagePixelT > > image
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
SdssShapeResult computeAdaptiveMoments(ImageT const &image, geom::Point2D const &center, bool negative, Control const &control)