template<typename PixelT>
class lsst::ip::diffim::detail::BuildSpatialKernelVisitor< PixelT >
Creates a spatial kernel and background from a list of candidates.
ps->set("spatialKernelOrder", spatialKernelOrder);
ps->set("spatialBgOrder", spatialBgOrder);
ps->set("kernelBasisSet", "delta-function");
ps->set("usePcaForSpatialKernel", true);
detail::BuildSpatialKernelVisitor<PixelT> spatialKernelFitter(*basisListToUse,
*ps);
kernelCells.visitCandidates(&spatialKernelFitter, nStarPerCell);
spatialKernelFitter.solveLinearEquation();
spatialKernel = kb.first;
spatialBackground = kb.second;
std::shared_ptr< lsst::afw::math::Function2< double > > SpatialFunctionPtr
- Note
- After visiting all candidates, solveLinearEquation() must be called to trigger the matrix math.
-
The user has the option to enfore conservation of the kernel sum across the image through the property set. In this case, all terms but the first are fit for spatial variation. This requires a little extra code to make sure the matrices are the correct size, and that it is accessing the appropriate terms in the matrices when creating the spatial models.
Definition at line 28 of file BuildSpatialKernelVisitor.h.