lsst.ip.diffim  21.0.0-21-g51ee50f+1a9d94092d
Public Types | Public Member Functions | List of all members
lsst::ip::diffim::detail::KernelPcaVisitor< PixelT > Class Template Reference

A class to run a PCA on all candidate kernels (represented as Images). More...

#include <KernelPca.h>

Inheritance diagram for lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >:
lsst::afw::math::CandidateVisitor

Public Types

typedef lsst::afw::image::Image< lsst::afw::math::Kernel::PixelImageT
 
typedef std::shared_ptr< KernelPcaVisitor< PixelT > > Ptr
 

Public Member Functions

 KernelPcaVisitor (std::shared_ptr< KernelPca< ImageT > > imagePca)
 
virtual ~KernelPcaVisitor ()
 
lsst::afw::math::KernelList getEigenKernels ()
 
void processCandidate (lsst::afw::math::SpatialCellCandidate *candidate)
 
void subtractMean ()
 
boost::shared_ptr< ImageTreturnMean ()
 
virtual void reset ()
 

Detailed Description

template<typename PixelT>
class lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >

A class to run a PCA on all candidate kernels (represented as Images).

Note
Templated on the pixel types of the MaskedImages it will be visiting (typically float).
Works in concert with a afwMath::SpatialCellSet and ip::Diffim KernelPca to create a Karhunen-Loeve basis from all the good KernelCandidates. This class adds the extra functionality to subtract off the mean kernel from all entries, which makes the resulting basis more compact. The user needs to manually add this mean image into the resulting basis list after imagePca.analyze() is called.
KernelPca (and base class afwImage::ImagePca) weight objects of different brightness differently. However we don't necessarily want images with larger kernel sums to have more weight. Each kernel should have constant weight in the Pca. For simplicity we scale them to have the same kernel sum, 1.0, and send to ImagePca that the flux (weight) is 1.0.

Definition at line 40 of file KernelPca.h.

Member Typedef Documentation

◆ ImageT

Definition at line 42 of file KernelPca.h.

◆ Ptr

Definition at line 43 of file KernelPca.h.

Constructor & Destructor Documentation

◆ KernelPcaVisitor()

Parameters
imagePcaSet of Images to initialise

Definition at line 56 of file KernelPca.cc.

◆ ~KernelPcaVisitor()

template<typename PixelT >
virtual lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >::~KernelPcaVisitor ( )
inlinevirtual

Definition at line 46 of file KernelPca.h.

Member Function Documentation

◆ getEigenKernels()

template<typename PixelT >
lsst::afw::math::KernelList lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >::getEigenKernels

Definition at line 65 of file KernelPca.cc.

◆ processCandidate()

template<typename PixelT >
void lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >::processCandidate ( lsst::afw::math::SpatialCellCandidate candidate)
virtual

Reimplemented from lsst::afw::math::CandidateVisitor.

Definition at line 89 of file KernelPca.cc.

◆ returnMean()

template<typename PixelT >
boost::shared_ptr< ImageT > lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >::returnMean ( )
inline

Definition at line 51 of file KernelPca.h.

◆ subtractMean()

template<typename PixelT >
void lsst::ip::diffim::detail::KernelPcaVisitor< PixelT >::subtractMean

Definition at line 113 of file KernelPca.cc.


The documentation for this class was generated from the following files: