LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
SpatialModelPsf.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #if !defined(LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H)
3 #define LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H
4 
5 /*
6  * LSST Data Management System
7  * Copyright 2008, 2009, 2010 LSST Corporation.
8  *
9  * This product includes software developed by the
10  * LSST Project (http://www.lsst.org/).
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 LSST License Statement and
23  * the GNU General Public License along with this program. If not,
24  * see <http://www.lsstcorp.org/LegalNotices/>.
25  */
26 
34 #include <utility>
35 #include <vector>
36 
37 #include "boost/shared_ptr.hpp"
38 
39 #include "lsst/afw.h"
40 #include "lsst/pex/policy.h"
41 #include "lsst/afw/detection/Psf.h"
42 #include "lsst/afw/math/Kernel.h"
44 #include "lsst/afw/geom/Extent.h"
45 
46 namespace lsst {
47 namespace meas {
48 namespace algorithms {
49 
50 template<typename PixelT>
51 std::pair<lsst::afw::math::LinearCombinationKernel::Ptr, std::vector<double> >
53  lsst::afw::geom::Extent2I const& dims,
54  lsst::afw::geom::Point2I const& xy0,
55  int const nEigenComponents,
56  int const spatialOrder,
57  int const ksize,
58  int const nStarPerCell=-1,
59  bool const constantWeight=true,
60  int const border=3
61  );
62 
63 template<typename PixelT>
64 int countPsfCandidates(lsst::afw::math::SpatialCellSet const& psfCells, int const nStarPerCell=-1);
65 
66 template<typename PixelT>
67 std::pair<bool, double>
69  lsst::afw::math::SpatialCellSet const& psfCells,
70  int const nStarPerCell = -1,
71  double const tolerance = 1e-5,
72  double const lambda = 0.0);
73 template<typename PixelT>
74 std::pair<bool, double>
76  lsst::afw::math::SpatialCellSet const& psfCells,
77  bool const doNonLinearFit,
78  int const nStarPerCell = -1,
79  double const tolerance = 1e-5,
80  double const lambda = 0.0);
81 
82 template<typename ImageT>
83 double subtractPsf(lsst::afw::detection::Psf const& psf, ImageT *data, double x, double y,
84  double psfFlux=std::numeric_limits<double>::quiet_NaN());
85 
86 template<typename Image>
87 std::pair<std::vector<double>, lsst::afw::math::KernelList>
89  Image const& image, lsst::afw::geom::Point2D const& pos);
90 
91 template<typename Image>
92 std::pair<lsst::afw::math::Kernel::Ptr, std::pair<double, double> >
94  Image const& image, lsst::afw::geom::Point2D const& pos);
95 
96 }}}
97 
98 #endif
int y
Declare the Kernel class and subclasses.
int countPsfCandidates(lsst::afw::math::SpatialCellSet const &psfCells, int const nStarPerCell=-1)
double subtractPsf(lsst::afw::detection::Psf const &psf, ImageT *data, double x, double y, double psfFlux=std::numeric_limits< double >::quiet_NaN())
This include file includes the header files for all of lsst::afw.
std::pair< std::vector< double >, lsst::afw::math::KernelList > fitKernelParamsToImage(lsst::afw::math::LinearCombinationKernel const &kernel, Image const &image, lsst::afw::geom::Point2D const &pos)
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
A collection of SpatialCells covering an entire image.
Definition: SpatialCell.h:378
A kernel that is a linear combination of fixed basis kernels.
Definition: Kernel.h:814
int x
Class to ensure constraints for spatial modeling.
std::pair< lsst::afw::math::Kernel::Ptr, std::pair< double, double > > fitKernelToImage(lsst::afw::math::LinearCombinationKernel const &kernel, Image const &image, lsst::afw::geom::Point2D const &pos)
std::vector< boost::shared_ptr< Kernel > > KernelList
Definition: Kernel.h:542
A polymorphic base class for representing an image&#39;s Point Spread Function.
Definition: Psf.h:68
std::pair< lsst::afw::math::LinearCombinationKernel::Ptr, std::vector< double > > createKernelFromPsfCandidates(lsst::afw::math::SpatialCellSet const &psfCells, lsst::afw::geom::Extent2I const &dims, lsst::afw::geom::Point2I const &xy0, int const nEigenComponents, int const spatialOrder, int const ksize, int const nStarPerCell=-1, bool const constantWeight=true, int const border=3)
A coordinate class intended to represent offsets and dimensions.
Kernels are used for convolution with MaskedImages and (eventually) Images.
Definition: Kernel.h:134
std::pair< bool, double > fitSpatialKernelFromPsfCandidates(lsst::afw::math::Kernel *kernel, lsst::afw::math::SpatialCellSet const &psfCells, int const nStarPerCell=-1, double const tolerance=1e-5, double const lambda=0.0)