2 #if !defined(LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H) 3 #define LSST_MEAS_ALGORITHMS_SPATIALMODELPSF_H 47 namespace algorithms {
49 template <
typename PixelT>
52 geom::Point2I const& xy0,
int const nEigenComponents,
int const spatialOrder,
53 int const ksize,
int const nStarPerCell = -1,
bool const constantWeight =
true,
54 int const border = 3);
56 template <
typename PixelT>
57 int countPsfCandidates(afw::math::SpatialCellSet
const& psfCells,
int const nStarPerCell = -1);
59 template <
typename PixelT>
61 afw::math::SpatialCellSet
const& psfCells,
62 int const nStarPerCell = -1,
63 double const tolerance = 1e-5,
64 double const lambda = 0.0);
65 template <
typename PixelT>
67 afw::math::Kernel*
kernel, afw::math::SpatialCellSet
const& psfCells,
bool const doNonLinearFit,
68 int const nStarPerCell = -1,
double const tolerance = 1e-5,
double const lambda = 0.0);
70 template <
typename ImageT>
74 template <
typename Image>
78 template <
typename Image>
double subtractPsf(afw::detection::Psf const &psf, ImageT *data, double x, double y, double psfFlux=std::numeric_limits< double >::quiet_NaN())
std::pair< std::shared_ptr< afw::math::Kernel >, std::pair< double, double > > fitKernelToImage(afw::math::LinearCombinationKernel const &kernel, Image const &image, geom::Point2D const &pos)
Fit a LinearCombinationKernel to an Image, allowing the coefficients of the components to vary...
int countPsfCandidates(afw::math::SpatialCellSet const &psfCells, int const nStarPerCell=-1)
Count the number of candidates in use.
Point< double, 2 > Point2D
std::pair< bool, double > fitSpatialKernelFromPsfCandidates(afw::math::Kernel *kernel, 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.
A base class for image defects.
Extent< int, 2 > Extent2I
std::vector< std::shared_ptr< Kernel > > KernelList
std::pair< std::shared_ptr< afw::math::LinearCombinationKernel >, std::vector< double > > createKernelFromPsfCandidates(afw::math::SpatialCellSet const &psfCells, geom::Extent2I const &dims, 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...
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
std::pair< std::vector< double >, afw::math::KernelList > fitKernelParamsToImage(afw::math::LinearCombinationKernel const &kernel, Image const &image, geom::Point2D const &pos)
Fit a LinearCombinationKernel to an Image, allowing the coefficients of the components to vary...