13 #include "boost/timer.hpp" 16 #include "Eigen/Cholesky" 72 template<
typename PixelT>
82 int spatialKernelOrder = policy.
getInt(
"spatialKernelOrder");
85 int fitForBackground = policy.
getBool(
"fitForBackground");
86 int spatialBgOrder = fitForBackground ? policy.
getInt(
"spatialBgOrder") : 0;
90 if (spatialModelType ==
"chebyshev1") {
99 else if (spatialModelType ==
"polynomial") {
109 str(boost::format(
"Invalid type (%s) for spatial models") %
120 template<
typename PixelT>
125 if (kCandidate == NULL) {
127 "Failed to cast SpatialCellCandidate to KernelCandidate");
131 LOGL_DEBUG(
"TRACE2.ip.diffim.BuildSpatialKernelVisitor.processCandidate",
132 "Cannot process candidate %d, continuing", kCandidate->
getId());
136 LOGL_DEBUG(
"TRACE5.ip.diffim.BuildSpatialKernelVisitor.processCandidate",
137 "Processing candidate %d", kCandidate->
getId());
156 template<
typename PixelT>
161 template<
typename PixelT>
void setStatus(Status status)
Creates a spatial kernel and background from a list of candidates.
Class stored in SpatialCells for spatial Kernel fitting.
std::shared_ptr< lsst::afw::math::Function2< double > > SpatialFunctionPtr
std::shared_ptr< StaticKernelSolution< PixelT > > getKernelSolution(CandidateSwitch cand) const
Declaration of BuildSpatialKernelVisitor.
void solveLinearEquation()
bool isInitialized() const
#define LOGL_DEBUG(logger, message...)
Declaration of classes to store the solution for convolution kernels.
int _nCandidates
Number of candidates visited.
BuildSpatialKernelVisitor(lsst::afw::math::KernelList const &basisList, lsst::afw::geom::Box2I const ®ionBBox, lsst::pex::policy::Policy policy)
bool getBool(const std::string &name) const
std::pair< std::shared_ptr< lsst::afw::math::LinearCombinationKernel >, lsst::afw::math::Kernel::SpatialFunctionPtr > getSolutionPair()
int getInt(const std::string &name) const
const std::string getString(const std::string &name) const
Class used by SpatialModelCell for spatial Kernel fitting.
#define LSST_EXCEPT(type,...)
std::shared_ptr< SpatialKernelSolution > _kernelSolution
void processCandidate(lsst::afw::math::SpatialCellCandidate *candidate)