template<typename
PixelT>
class lsst::ip::diffim::detail::BuildSingleKernelVisitor< PixelT >
Builds the convolution kernel for a given candidate.
ps->set("constantVarianceWeighting", false);
ps->set("iterateSingleKernel", false);
ps->set("singleKernelClipping", true);
ps->set("candidateResidualMeanMax", 0.25);
ps->set("candidateResidualStdMax", 1.25);
detail::BuildSingleKernelVisitor<PixelT> singleKernelFitter(*ps);
int nRejected = -1;
while (nRejected != 0) {
singleKernelFitter.reset();
kernelCells.visitCandidates(&singleKernelFitter, nStarPerCell);
nRejected = singleKernelFitter.getNRejected();
}
- Note
- Visits each current candidate in a afwMath::SpatialCellSet, and builds its kernel using its build() method. We don't build the kernel for every candidate since this is computationally expensive, only when its the current candidate in the cell. During the course of building the kernel, it also assesses the quality of the difference image. If it is determined to be bad (based on the PropertySet paramters) the candidate is flagged as afwMath::SpatialCellCandidate::BAD; otherwise its marked as afwMath::SpatialCellCandidate::GOOD. Keeps a running sample of all the new candidates it visited that turned out to be bad.
-
Because this visitor does not have access to the next candidate in the cell, it must be called iteratively until no candidates are rejected. This ensures that the current candidate of every cell has an initialized Kernel. This also requires that this class re-Visit all the cells after any other Visitors with the ability to mark something as BAD.
-
Because we are frequently re-Visiting entirely GOOD candidates during these iterations, the option of _skipBuilt=true will enable the user to not rebuilt the kernel on every visit.
-
For the particular use case of creating a Pca basis from the raw kernels, we want to re-Visit each candidate and re-fit the kernel using this Pca basis. This requires the user to setSkipBuilt(false) so that the candidate is reprocessed with this new basis.
Definition at line 30 of file BuildSingleKernelVisitor.h.