12 #ifndef LSST_IP_DIFFIM_KERNELCANDIDATE_H
13 #define LSST_IP_DIFFIM_KERNELCANDIDATE_H
18 #include "lsst/afw/math.h"
19 #include "lsst/afw/image.h"
21 #include "lsst/afw/table/Source.h"
37 template <
typename _PixelT>
40 typedef afw::image::Image<afw::math::Kernel::Pixel>
ImageT;
43 typedef std::shared_ptr<KernelCandidate>
Ptr;
45 typedef std::shared_ptr<afw::image::Image<afw::image::VariancePixel> >
VariancePtr;
46 typedef std::shared_ptr<afw::table::SourceRecord>
SourcePtr;
67 pex::policy::Policy
const& policy);
81 pex::policy::Policy
const& policy);
123 std::shared_ptr<afw::math::Kernel> kernel,
177 afw::math::KernelList
const& basisList
180 afw::math::KernelList
const& basisList,
181 Eigen::MatrixXd
const& hMat
202 Eigen::MatrixXd
const& hMat);
217 template <
typename PixelT>
218 std::shared_ptr<KernelCandidate<PixelT> >
221 std::shared_ptr<afw::image::MaskedImage<PixelT> >
const& templateMaskedImage,
222 std::shared_ptr<afw::image::MaskedImage<PixelT> >
const& scienceMaskedImage,
223 pex::policy::Policy
const& policy){
242 template <
typename PixelT>
243 std::shared_ptr<KernelCandidate<PixelT> >
245 std::shared_ptr<afw::image::MaskedImage<PixelT> >
const& templateMaskedImage,
246 std::shared_ptr<afw::image::MaskedImage<PixelT> >
const& scienceMaskedImage,
247 pex::policy::Policy
const& policy){
bool _isInitialized
Has the kernel been built.
MaskedImagePtr _scienceMaskedImage
Subimage around which you build kernel.
Class stored in SpatialCells for spatial Kernel fitting.
void build(afw::math::KernelList const &basisList)
Core functionality of KernelCandidate, to build and fill a KernelSolution.
std::shared_ptr< StaticKernelSolution< PixelT > > _kernelSolutionOrig
Original basis solution.
afw::image::MaskedImage< PixelT > getDifferenceImage(CandidateSwitch cand)
Calculate associated difference image using internal solutions.
boost::shared_ptr< ImageT > getKernelImage(CandidateSwitch cand) const
std::shared_ptr< StaticKernelSolution< PixelT > > getKernelSolution(CandidateSwitch cand) const
Declaration of classes to store the solution for convolution kernels.
bool isInitialized() const
std::shared_ptr< afw::image::Image< afw::image::VariancePixel > > VariancePtr
boost::shared_ptr< ImageT const > getImage() const
std::shared_ptr< KernelCandidate > Ptr
pex::policy::Policy _policy
Policy.
MaskedImagePtr getTemplateMaskedImage()
Return pointers to the image pixels used in kernel determination.
afw::image::Image< afw::math::Kernel::Pixel > ImageT
virtual ~KernelCandidate()
Destructor.
MaskedImagePtr getScienceMaskedImage()
double getKsum(CandidateSwitch cand) const
std::shared_ptr< afw::image::MaskedImage< PixelT > > MaskedImagePtr
VariancePtr _varianceEstimate
Estimate of the local variance.
double _coreFlux
Mean S/N in the science image.
MaskedImagePtr _templateMaskedImage
Subimage around which you build kernel.
bool _useRegularization
Use regularization?
void _buildKernelSolution(afw::math::KernelList const &basisList, Eigen::MatrixXd const &hMat)
double getBackground(CandidateSwitch cand) const
double getCandidateRating() const
Return Candidate rating.
SourcePtr getSource() const
Return the original source.
std::shared_ptr< afw::table::SourceRecord > SourcePtr
KernelCandidate(float const xCenter, float const yCenter, MaskedImagePtr const &templateMaskedImage, MaskedImagePtr const &scienceMaskedImage, pex::policy::Policy const &policy)
Constructor.
std::shared_ptr< StaticKernelSolution< PixelT > > _kernelSolutionPca
Most recent solution.
std::shared_ptr< afw::math::Kernel > getKernel(CandidateSwitch cand) const
Return results of kernel solution.
std::shared_ptr< KernelCandidate< PixelT > > makeKernelCandidate(float const xCenter, float const yCenter, std::shared_ptr< afw::image::MaskedImage< PixelT > > const &templateMaskedImage, std::shared_ptr< afw::image::MaskedImage< PixelT > > const &scienceMaskedImage, pex::policy::Policy const &policy)
Return a KernelCandidate pointer of the right sort.