55 template<
typename PixelT>
64 template<
typename PixelT>
69 int ncomp = eigenImages.
size();
77 for (
int i = 0; i < ncomp; i++) {
88 template<
typename PixelT>
92 if (kCandidate == NULL) {
94 "Failed to cast SpatialCellCandidate to KernelCandidate");
96 LOGL_DEBUG(
"TRACE5.ip.diffim.SetPcaImageVisitor.processCandidate",
97 "Processing candidate %d", kCandidate->
getId());
106 _imagePca->addImage(kImage, 1.0);
112 template<
typename PixelT>
137 LOGL_DEBUG(
"TRACE5.ip.diffim.KernelPcaVisitor.subtractMean",
138 "Subtracting mean feature before Pca");
140 _mean = _imagePca->getMean();
162 template <
typename ImageT>
168 typename Super::ImageList::const_iterator iter = eImageList.
begin(),
end = eImageList.
end();
169 for (
size_t i = 0; iter !=
end; ++i, ++iter) {
180 double const extreme = (fabs(min) >
max) ? min :max;
181 if (extreme != 0.0) {
Class stored in SpatialCells for spatial Kernel fitting.
KernelPcaVisitor(std::shared_ptr< KernelPca< ImageT > > imagePca)
std::shared_ptr< StaticKernelSolution< PixelT > > getKernelSolution(CandidateSwitch cand) const
Provides consistent interface for LSST exceptions.
int getId() const
Return the candidate's unique ID.
A class to run a PCA on all candidate kernels (represented as Images).
#define LOGL_DEBUG(logger, message...)
Log a debug-level message using a varargs/printf style interface.
A class to evaluate image statistics.
void processCandidate(lsst::afw::math::SpatialCellCandidate *candidate)
LSST DM logging module built on log4cxx.
lsst::afw::math::KernelList getEigenKernels()
A base class for image defects.
Statistics makeStatistics(lsst::afw::image::Image< Pixel > const &img, lsst::afw::image::Mask< image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl())
Handle a watered-down front-end to the constructor (no variance)
Overrides the analyze method of base class afwImage::ImagePca.
Declaration of KernelPca and KernelPcaVisitor.
Reports errors in the logical structure of the program.
Class used by SpatialModelCell for spatial Kernel fitting.
double getValue(Property const prop=NOTHING) const
Return the value of the desired property (if specified in the constructor)
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Base class for candidate objects in a SpatialCell.
lsst::afw::image::Image< lsst::afw::math::Kernel::Pixel > ImageT
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A class to represent a 2-dimensional array of pixels.
virtual void analyze()
Generate eigenimages that are normalised.
A kernel created from an Image.