lsst.ip.diffim  20.0.0-4-geb4c96b+65485235b0
Public Types | Public Member Functions | List of all members
lsst::ip::diffim::detail::KernelSumVisitor< PixelT > Class Template Reference

A class to accumulate kernel sums across SpatialCells. More...

#include <KernelSumVisitor.h>

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

Public Types

enum  Mode { AGGREGATE = 0, REJECT = 1 }
 
typedef std::shared_ptr< KernelSumVisitor< PixelT > > Ptr
 

Public Member Functions

 KernelSumVisitor (lsst::daf::base::PropertySet const &ps)
 
virtual ~KernelSumVisitor ()
 
void setMode (Mode mode)
 
int getNRejected ()
 
double getkSumMean ()
 
double getkSumStd ()
 
double getdkSumMax ()
 
int getkSumNpts ()
 
void resetKernelSum ()
 
void processCandidate (lsst::afw::math::SpatialCellCandidate *candidate)
 
void processKsumDistribution ()
 
virtual void reset ()
 

Detailed Description

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

A class to accumulate kernel sums across SpatialCells.

std::shared_ptr<PropertySet> ps(new PropertySet);
ps->set("kernelSumClipping", false);
ps->set("maxKsumSigma", 3.0);
detail::KernelSumVisitor<PixelT> kernelSumVisitor(*ps);
kernelSumVisitor.reset();
kernelCells.visitCandidates(&kernelSumVisitor, nStarPerCell);
kernelSumVisitor.processKsumDistribution();
kernelSumVisitor.setMode(detail::KernelSumVisitor<PixelT>::REJECT);
kernelCells.visitCandidates(&kernelSumVisitor, nStarPerCell);
int nRejected = kernelSumVisitor.getNRejected();
Note
The class has 2 processing modes; the first AGGREGATES kernel sums across all candidates. You must the process the distribution to set member variables representing the mean and standard deviation of the kernel sums. The second mode then REJECTs candidates with kernel sums outside the acceptable range (set by the ps). It does this by setting candidate status to afwMath::SpatialCellCandidate::BAD. In this mode it also accumulates the number of candidates it sets as bad.
The statistics call calculates sigma-clipped values (afwMath::MEANCLIP, afwMath::STDEVCLIP)

Definition at line 27 of file KernelSumVisitor.h.

Member Typedef Documentation

◆ Ptr

Definition at line 29 of file KernelSumVisitor.h.

Member Enumeration Documentation

◆ Mode

template<typename PixelT >
enum lsst::ip::diffim::detail::KernelSumVisitor::Mode
Enumerator
AGGREGATE 
REJECT 

Definition at line 31 of file KernelSumVisitor.h.

Constructor & Destructor Documentation

◆ KernelSumVisitor()

Parameters
psps file directing behavior

Definition at line 65 of file KernelSumVisitor.cc.

◆ ~KernelSumVisitor()

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

Definition at line 34 of file KernelSumVisitor.h.

Member Function Documentation

◆ getdkSumMax()

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::getdkSumMax ( )
inline

Definition at line 40 of file KernelSumVisitor.h.

◆ getkSumMean()

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::getkSumMean ( )
inline

Definition at line 38 of file KernelSumVisitor.h.

◆ getkSumNpts()

template<typename PixelT >
int lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::getkSumNpts ( )
inline

Definition at line 41 of file KernelSumVisitor.h.

◆ getkSumStd()

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::getkSumStd ( )
inline

Definition at line 39 of file KernelSumVisitor.h.

◆ getNRejected()

template<typename PixelT >
int lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::getNRejected ( )
inline

Definition at line 37 of file KernelSumVisitor.h.

◆ processCandidate()

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

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

Definition at line 90 of file KernelSumVisitor.cc.

◆ processKsumDistribution()

template<typename PixelT >
void lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::processKsumDistribution

Definition at line 127 of file KernelSumVisitor.cc.

◆ resetKernelSum()

template<typename PixelT >
void lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::resetKernelSum

Definition at line 80 of file KernelSumVisitor.cc.

◆ setMode()

template<typename PixelT >
void lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::setMode ( Mode  mode)
inline

Definition at line 36 of file KernelSumVisitor.h.


The documentation for this class was generated from the following files:
std::shared_ptr< PropertySet >
lsst::ip::diffim::detail::KernelSumVisitor::AGGREGATE
@ AGGREGATE
Definition: KernelSumVisitor.h:31
lsst::ip::diffim::detail::KernelSumVisitor::REJECT
@ REJECT
Definition: KernelSumVisitor.h:31