LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0-2-g04d2804
include
lsst
afw
image
ImagePca.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
3
/*
4
* LSST Data Management System
5
* Copyright 2008, 2009, 2010 LSST Corporation.
6
*
7
* This product includes software developed by the
8
* LSST Project (http://www.lsst.org/).
9
*
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the LSST License Statement and
21
* the GNU General Public License along with this program. If not,
22
* see <http://www.lsstcorp.org/LegalNotices/>.
23
*/
24
29
#ifndef LSST_AFW_IMAGE_IMAGEPCA_H
30
#define LSST_AFW_IMAGE_IMAGEPCA_H
31
32
#include <vector>
33
#include <string>
34
#include <utility>
35
36
#include "boost/mpl/bool.hpp"
37
#include "boost/shared_ptr.hpp"
38
39
#include "
lsst/pex/exceptions.h
"
40
#include "
lsst/afw/image/MaskedImage.h
"
41
42
namespace
lsst {
43
namespace
afw {
44
namespace
image
{
45
46
template
<
typename
ImageT>
47
class
ImagePca
{
48
public
:
49
typedef
typename
boost::shared_ptr<ImageT>
Ptr
;
50
typedef
typename
boost::shared_ptr<const ImageT>
ConstPtr
;
51
52
typedef
std::vector<typename ImageT::Ptr>
ImageList
;
53
54
explicit
ImagePca
(
bool
constantWeight=
true
);
55
virtual
~ImagePca
() {}
56
57
void
addImage
(
typename
ImageT::Ptr img,
double
flux=0.0);
58
ImageList
getImageList
()
const
;
59
61
geom::Extent2I
const
getDimensions
()
const
{
return
_dimensions
; }
62
63
typename
ImageT::Ptr
getMean
()
const
;
64
virtual
void
analyze
();
65
virtual
double
updateBadPixels
(
unsigned
long
mask,
int
const
ncomp);
66
68
std::vector<double>
const
&
getEigenValues
()
const
{
return
_eigenValues
; }
70
ImageList
const
&
getEigenImages
()
const
{
return
_eigenImages
; }
71
72
private
:
73
double
getFlux
(
int
i)
const
{
return
_fluxList
[i]; }
74
75
ImageList
_imageList
;
// image to analyze
76
std::vector<double>
_fluxList
;
// fluxes of images
77
geom::Extent2I
_dimensions
;
// width/height of images on _imageList
78
79
bool
_constantWeight
;
// should all stars have the same weight?
80
81
std::vector<double>
_eigenValues
;
// Eigen values
82
ImageList
_eigenImages
;
// Eigen images
83
};
84
85
template
<
typename
Image1T,
typename
Image2T>
86
double
innerProduct
(Image1T
const
& lhs, Image2T
const
& rhs,
int
const
border=0);
87
88
}}}
89
90
#endif
lsst::afw::image::ImagePca::_fluxList
std::vector< double > _fluxList
Definition:
ImagePca.h:76
lsst::afw::image::ImagePca::getEigenValues
std::vector< double > const & getEigenValues() const
Return Eigen values.
Definition:
ImagePca.h:68
lsst::afw::image::ImagePca::ConstPtr
boost::shared_ptr< const ImageT > ConstPtr
Definition:
ImagePca.h:50
exceptions.h
Include files required for standard LSST Exception handling.
lsst::afw::geom::Extent< int, 2 >
lsst::afw::image::innerProduct
double innerProduct(Image1T const &lhs, Image2T const &rhs, int const border=0)
Definition:
ImagePca.cc:454
lsst::afw::image::ImagePca::_eigenValues
std::vector< double > _eigenValues
Definition:
ImagePca.h:81
lsst::afw::image::ImagePca::getImageList
ImageList getImageList() const
Return the list of images being analyzed.
Definition:
ImagePca.cc:92
lsst::afw::image::ImagePca::addImage
void addImage(typename ImageT::Ptr img, double flux=0.0)
Definition:
ImagePca.cc:65
lsst::afw::image::ImagePca::Ptr
boost::shared_ptr< ImageT > Ptr
Definition:
ImagePca.h:49
lsst::afw::image::ImagePca::getDimensions
geom::Extent2I const getDimensions() const
Return the dimension of the images being analyzed.
Definition:
ImagePca.h:61
image
table::Key< table::Array< Kernel::Pixel > > image
Definition:
FixedKernel.cc:117
lsst::afw::image::ImagePca::_imageList
ImageList _imageList
Definition:
ImagePca.h:75
lsst::afw::image::ImagePca::getMean
ImageT::Ptr getMean() const
Definition:
ImagePca.cc:101
lsst::afw::image::ImagePca::getEigenImages
ImageList const & getEigenImages() const
Return Eigen images.
Definition:
ImagePca.h:70
lsst::afw::image::ImagePca::_constantWeight
bool _constantWeight
Definition:
ImagePca.h:79
lsst::afw::image::ImagePca::ImageList
std::vector< typename ImageT::Ptr > ImageList
Definition:
ImagePca.h:52
lsst::afw::image::ImagePca::analyze
virtual void analyze()
Definition:
ImagePca.cc:135
lsst::afw::image::ImagePca::_eigenImages
ImageList _eigenImages
Definition:
ImagePca.h:82
lsst::afw::image::ImagePca::ImagePca
ImagePca(bool constantWeight=true)
ctor
Definition:
ImagePca.cc:49
MaskedImage.h
Implementation of the Class MaskedImage.
lsst::afw::image::ImagePca::_dimensions
geom::Extent2I _dimensions
Definition:
ImagePca.h:77
lsst::afw::image::ImagePca::getFlux
double getFlux(int i) const
Definition:
ImagePca.h:73
lsst::afw::image::ImagePca
Definition:
ImagePca.h:47
lsst::afw::image::ImagePca::updateBadPixels
virtual double updateBadPixels(unsigned long mask, int const ncomp)
Definition:
ImagePca.cc:417
lsst::afw::image::ImagePca::~ImagePca
virtual ~ImagePca()
Definition:
ImagePca.h:55
Generated on Thu Sep 24 2015 02:29:14 for LSSTApplications by
1.8.5