LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
KernelSumVisitor.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
12 #ifndef LSST_IP_DIFFIM_KERNELSUMVISITOR_H
13 #define LSST_IP_DIFFIM_KERNELSUMVISITOR_H
14 
15 #include "boost/shared_ptr.hpp"
16 #include "lsst/afw/math.h"
17 #include "lsst/afw/image.h"
18 #include "lsst/pex/policy/Policy.h"
19 
20 namespace lsst {
21 namespace ip {
22 namespace diffim {
23 namespace detail {
24 
25  template<typename PixelT>
27  public:
28  typedef boost::shared_ptr<KernelSumVisitor<PixelT> > Ptr;
29 
30  enum Mode {AGGREGATE = 0, REJECT = 1};
31 
33  virtual ~KernelSumVisitor() {};
34 
35  void setMode(Mode mode) {_mode = mode;}
36  int getNRejected() {return _nRejected;}
37  double getkSumMean() {return _kSumMean;}
38  double getkSumStd() {return _kSumStd;}
39  double getdkSumMax() {return _dkSumMax;}
40  int getkSumNpts() {return _kSumNpts;}
41 
42  void resetKernelSum();
45 
46  private:
48  std::vector<double> _kSums;
49  double _kSumMean;
50  double _kSumStd;
51  double _dkSumMax;
52  int _kSumNpts;
53  int _nRejected;
55  };
56 
57  template<typename PixelT>
58  boost::shared_ptr<KernelSumVisitor<PixelT> >
60  return typename KernelSumVisitor<PixelT>::Ptr(new KernelSumVisitor<PixelT>(policy));
61  }
62 
63 }}}} // end of namespace lsst::ip::diffim::detail
64 
65 #endif
An include file to include the public header files for lsst::afw::math.
int _kSumNpts
Number of points used in the statistics.
Mode _mode
Processing mode; AGGREGATE or REJECT.
a container for holding hierarchical configuration data in memory.
Definition: Policy.h:169
double _kSumMean
Clipped mean of the kernel sums.
An include file to include the header files for lsst::afw::image.
A class to accumulate kernel sums across SpatialCells.
boost::shared_ptr< KernelSumVisitor< PixelT > > makeKernelSumVisitor(lsst::pex::policy::Policy const &policy)
void processCandidate(lsst::afw::math::SpatialCellCandidate *candidate)
double _dkSumMax
Maximum acceptable deviation from mean sum.
double _kSumStd
Clipped standard deviation of kernel sums.
std::vector< double > _kSums
List of all candidate kernel sums.
boost::shared_ptr< KernelSumVisitor< PixelT > > Ptr
KernelSumVisitor(lsst::pex::policy::Policy const &policy)
int _nRejected
Number of candidates rejected during processCandidate()
lsst::pex::policy::Policy _policy
Policy controlling behavior.