lsst.ip.diffim  13.0-17-gc2cefa3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | 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 >:

Public Types

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

Public Member Functions

 KernelSumVisitor (lsst::pex::policy::Policy const &policy)
 
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 ()
 

Private Attributes

Mode _mode
 Processing mode; AGGREGATE or REJECT. More...
 
std::vector< double > _kSums
 List of all candidate kernel sums. More...
 
double _kSumMean
 Clipped mean of the kernel sums. More...
 
double _kSumStd
 Clipped standard deviation of kernel sums. More...
 
double _dkSumMax
 Maximum acceptable deviation from mean sum. More...
 
int _kSumNpts
 Number of points used in the statistics. More...
 
int _nRejected
 Number of candidates rejected during processCandidate() More...
 
lsst::pex::policy::Policy _policy
 Policy controlling behavior. More...
 

Detailed Description

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

A class to accumulate kernel sums across SpatialCells.

std::shared_ptr<Policy> policy(new Policy);
policy->set("kernelSumClipping", false);
policy->set("maxKsumSigma", 3.0);
detail::KernelSumVisitor<PixelT> kernelSumVisitor(*policy);
kernelSumVisitor.reset();
kernelSumVisitor.setMode(detail::KernelSumVisitor<PixelT>::AGGREGATE);
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 policy). 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

template<typename PixelT >
typedef std::shared_ptr<KernelSumVisitor<PixelT> > lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::Ptr

Definition at line 29 of file KernelSumVisitor.h.

Member Enumeration Documentation

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

Definition at line 31 of file KernelSumVisitor.h.

Constructor & Destructor Documentation

template<typename PixelT >
lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::KernelSumVisitor ( lsst::pex::policy::Policy const &  policy)
Parameters
policyPolicy file directing behavior

Definition at line 65 of file KernelSumVisitor.cc.

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

Definition at line 34 of file KernelSumVisitor.h.

Member Function Documentation

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

Definition at line 40 of file KernelSumVisitor.h.

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

Definition at line 38 of file KernelSumVisitor.h.

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

Definition at line 41 of file KernelSumVisitor.h.

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

Definition at line 39 of file KernelSumVisitor.h.

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

Definition at line 37 of file KernelSumVisitor.h.

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

Definition at line 90 of file KernelSumVisitor.cc.

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

Definition at line 127 of file KernelSumVisitor.cc.

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

Definition at line 80 of file KernelSumVisitor.cc.

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

Definition at line 36 of file KernelSumVisitor.h.

Member Data Documentation

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_dkSumMax
private

Maximum acceptable deviation from mean sum.

Definition at line 52 of file KernelSumVisitor.h.

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_kSumMean
private

Clipped mean of the kernel sums.

Definition at line 50 of file KernelSumVisitor.h.

template<typename PixelT >
int lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_kSumNpts
private

Number of points used in the statistics.

Definition at line 53 of file KernelSumVisitor.h.

template<typename PixelT >
std::vector<double> lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_kSums
private

List of all candidate kernel sums.

Definition at line 49 of file KernelSumVisitor.h.

template<typename PixelT >
double lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_kSumStd
private

Clipped standard deviation of kernel sums.

Definition at line 51 of file KernelSumVisitor.h.

template<typename PixelT >
Mode lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_mode
private

Processing mode; AGGREGATE or REJECT.

Definition at line 48 of file KernelSumVisitor.h.

template<typename PixelT >
int lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_nRejected
private

Number of candidates rejected during processCandidate()

Definition at line 54 of file KernelSumVisitor.h.

template<typename PixelT >
lsst::pex::policy::Policy lsst::ip::diffim::detail::KernelSumVisitor< PixelT >::_policy
private

Policy controlling behavior.

Definition at line 55 of file KernelSumVisitor.h.


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