lsst.ip.diffim  14.0-10-g81837af+8
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 <memory>
16 
17 #include "lsst/afw/math.h"
18 #include "lsst/afw/image.h"
19 #include "lsst/pex/policy/Policy.h"
20 
21 namespace lsst {
22 namespace ip {
23 namespace diffim {
24 namespace detail {
25 
26  template<typename PixelT>
28  public:
30 
31  enum Mode {AGGREGATE = 0, REJECT = 1};
32 
34  virtual ~KernelSumVisitor() {};
35 
36  void setMode(Mode mode) {_mode = mode;}
37  int getNRejected() {return _nRejected;}
38  double getkSumMean() {return _kSumMean;}
39  double getkSumStd() {return _kSumStd;}
40  double getdkSumMax() {return _dkSumMax;}
41  int getkSumNpts() {return _kSumNpts;}
42 
43  void resetKernelSum();
46 
47  private:
50  double _kSumMean;
51  double _kSumStd;
52  double _dkSumMax;
53  int _kSumNpts;
54  int _nRejected;
56  };
57 
58  template<typename PixelT>
62  }
63 
64 }}}} // end of namespace lsst::ip::diffim::detail
65 
66 #endif
int _kSumNpts
Number of points used in the statistics.
Mode _mode
Processing mode; AGGREGATE or REJECT.
std::shared_ptr< KernelSumVisitor< PixelT > > makeKernelSumVisitor(lsst::pex::policy::Policy const &policy)
std::shared_ptr< KernelSumVisitor< PixelT > > Ptr
double _kSumMean
Clipped mean of the kernel sums.
A class to accumulate kernel sums across SpatialCells.
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.
KernelSumVisitor(lsst::pex::policy::Policy const &policy)
int _nRejected
Number of candidates rejected during processCandidate()
lsst::pex::policy::Policy _policy
Policy controlling behavior.