lsst.ip.diffim  22.0.1-14-g22236948+05991b9e2c
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"
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:
48  Mode _mode;
49  std::vector<double> _kSums;
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
A class to accumulate kernel sums across SpatialCells.
KernelSumVisitor(lsst::daf::base::PropertySet const &ps)
void processCandidate(lsst::afw::math::SpatialCellCandidate *candidate)
std::shared_ptr< KernelSumVisitor< PixelT > > Ptr
std::shared_ptr< KernelSumVisitor< PixelT > > makeKernelSumVisitor(lsst::daf::base::PropertySet const &ps)