2 #if !defined(LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H) 3 #define LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H 47 namespace algorithms {
49 template<
typename PixelT>
54 int const nEigenComponents,
55 int const spatialOrder,
57 int const nStarPerCell=-1,
58 bool const constantWeight=
true,
62 template<
typename PixelT>
65 template<
typename PixelT>
69 int const nStarPerCell = -1,
70 double const tolerance = 1e-5,
71 double const lambda = 0.0);
72 template<
typename PixelT>
76 bool const doNonLinearFit,
77 int const nStarPerCell = -1,
78 double const tolerance = 1e-5,
79 double const lambda = 0.0);
81 template<
typename ImageT>
85 template<
typename Image>
90 template<
typename Image>
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)
Fit spatial kernel using full-nonlinear optimization to estimate candidate amplitudes.
double subtractPsf(lsst::afw::detection::Psf const &psf, ImageT *data, double x, double y, double psfFlux=std::numeric_limits< double >::quiet_NaN())
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)
Fit a LinearCombinationKernel to an Image, allowing the coefficients of the components to vary...
std::pair< std::shared_ptr< lsst::afw::math::LinearCombinationKernel >, 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)
Return a Kernel pointer and a list of eigenvalues resulting from analysing the provided SpatialCellSe...
std::pair< std::shared_ptr< lsst::afw::math::Kernel >, std::pair< double, double > > fitKernelToImage(lsst::afw::math::LinearCombinationKernel const &kernel, Image const &image, lsst::afw::geom::Point2D const &pos)
Fit a LinearCombinationKernel to an Image, allowing the coefficients of the components to vary...
int countPsfCandidates(lsst::afw::math::SpatialCellSet const &psfCells, int const nStarPerCell=-1)
Count the number of candidates in use.