28 #ifndef LSST_AFW_IMAGE_IMAGEPCA_H
29 #define LSST_AFW_IMAGE_IMAGEPCA_H
35 #include "boost/mpl/bool.hpp"
38 #include "lsst/pex/exceptions.h"
45 template <
typename ImageT>
48 typedef std::vector<std::shared_ptr<ImageT>>
ImageList;
55 explicit ImagePca(
bool constantWeight =
true);
66 void addImage(std::shared_ptr<ImageT> img,
double flux = 0.0);
76 std::shared_ptr<ImageT>
getMean()
const;
99 double getFlux(
int i)
const {
return _fluxList[i]; }
102 std::vector<double> _fluxList;
105 bool _constantWeight;
107 std::vector<double> _eigenValues;
121 template <
typename Image1T,
typename Image2T>
122 double innerProduct(Image1T
const& lhs, Image2T
const& rhs,
int const border = 0);
std::vector< double > const & getEigenValues() const
Return Eigen values.
double innerProduct(Image1T const &lhs, Image2T const &rhs, int const border=0)
Calculate the inner product of two images.
std::vector< std::shared_ptr< ImageT > > ImageList
ImageList getImageList() const
Return the list of images being analyzed.
std::shared_ptr< ImageT > getMean() const
Return the mean of the images in ImagePca's list.
geom::Extent2I const getDimensions() const
Return the dimension of the images being analyzed.
ImageList const & getEigenImages() const
Return Eigen images.
ImagePca(bool constantWeight=true)
ctor
void addImage(std::shared_ptr< ImageT > img, double flux=0.0)
Add an image to the set to be analyzed.
virtual double updateBadPixels(unsigned long mask, int const ncomp)
Update the bad pixels (i.e.