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
Public Types | Public Member Functions | Private Attributes | List of all members
lsst::meas::algorithms::ShapeletImpl Class Reference
Inheritance diagram for lsst::meas::algorithms::ShapeletImpl:
lsst::meas::algorithms::shapelet::BVec lsst::meas::algorithms::shapelet::AssignableToBVec

Public Types

typedef Shapelet::ShapeletVector ShapeletVector
 
typedef
Shapelet::ShapeletCovariance 
ShapeletCovariance
 
typedef shapelet::BVec BVec
 

Public Member Functions

 ShapeletImpl (int order, double sigma)
 
 ShapeletImpl (int order, double sigma, const ShapeletVector &vector)
 
 ShapeletImpl (int order, double sigma, const ShapeletVector &vector, const ShapeletCovariance &cov)
 
 ShapeletImpl (const BVec &rhs)
 
 ShapeletImpl (const ShapeletImpl &rhs)
 
 ~ShapeletImpl ()
 
void operator= (const ShapeletImpl &rhs)
 
boost::shared_ptr
< ShapeletCovariance > & 
getCovariance ()
 
std::complex< double > getPQ (int p, int q)
 
double evaluateAt (double x, double y)
 
- Public Member Functions inherited from lsst::meas::algorithms::shapelet::BVec
 BVec (int order, double sigma)
 
 BVec (int order, double sigma, double *bvec)
 
 BVec (int order, double sigma, const DVector &bvec)
 
 BVec (const BVec &rhs)
 
 ~BVec ()
 
BVecoperator= (const AssignableToBVec &rhs)
 
BVecoperator= (const BVec &rhs)
 
void assignTo (BVec &bvec) const
 
DVectorvec ()
 
const DVectorvec () const
 
double & operator() (int i)
 
double operator() (int i) const
 
int getOrder () const
 
double getSigma () const
 
const DVectorgetValues () const
 
size_t size () const
 
void setSigma (double sigma)
 
void setValues (const DVector &v)
 
template<typename V >
void setValues (const V &v)
 
void normalize ()
 
void conjugateSelf ()
 
- Public Member Functions inherited from lsst::meas::algorithms::shapelet::AssignableToBVec
virtual ~AssignableToBVec ()
 

Private Attributes

boost::shared_ptr
< ShapeletCovariance
_cov
 

Detailed Description

Definition at line 44 of file Shapelet.cc.

Member Typedef Documentation

Definition at line 50 of file Shapelet.cc.

Definition at line 49 of file Shapelet.cc.

Definition at line 48 of file Shapelet.cc.

Constructor & Destructor Documentation

lsst::meas::algorithms::ShapeletImpl::ShapeletImpl ( int  order,
double  sigma 
)
inline

Definition at line 52 of file Shapelet.cc.

52  :
53  BVec(order,sigma), _cov()
54  {}
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
lsst::meas::algorithms::ShapeletImpl::ShapeletImpl ( int  order,
double  sigma,
const ShapeletVector vector 
)
inline

Definition at line 56 of file Shapelet.cc.

56  :
57  BVec(order,sigma,vector), _cov()
58  {}
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
lsst::meas::algorithms::ShapeletImpl::ShapeletImpl ( int  order,
double  sigma,
const ShapeletVector vector,
const ShapeletCovariance cov 
)
inline

Definition at line 60 of file Shapelet.cc.

60  :
61  BVec(order,sigma,vector), _cov(new ShapeletCovariance(cov))
62  {}
Shapelet::ShapeletCovariance ShapeletCovariance
Definition: Shapelet.cc:49
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
lsst::meas::algorithms::ShapeletImpl::ShapeletImpl ( const BVec rhs)
inline

Definition at line 64 of file Shapelet.cc.

64  :
65  BVec(rhs), _cov()
66  {}
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
lsst::meas::algorithms::ShapeletImpl::ShapeletImpl ( const ShapeletImpl rhs)
inline

Definition at line 68 of file Shapelet.cc.

68  :
69  BVec(rhs)
70  {
71  if (rhs._cov.get()) _cov.reset(new ShapeletCovariance(*rhs._cov));
72  }
Shapelet::ShapeletCovariance ShapeletCovariance
Definition: Shapelet.cc:49
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
lsst::meas::algorithms::ShapeletImpl::~ShapeletImpl ( )
inline

Definition at line 74 of file Shapelet.cc.

74 {}

Member Function Documentation

double lsst::meas::algorithms::ShapeletImpl::evaluateAt ( double  x,
double  y 
)
inline

Definition at line 114 of file Shapelet.cc.

115  {
116  // TODO: This is not efficient, but the functionality
117  // is required for Kernel.
118  //
119  // It is much more efficient to run makePsi on many
120  // positions at once. Furthermore, makePsi is optimized
121  // to be run on many positions at the same time, which
122  // involved some coding choices that probably make it even
123  // less efficient for a single position.
124  //
125  // However, if this is a significant time component,
126  // then a more efficient version that is intended for
127  // a single position could be written.
128  using shapelet::CDVector;
129  using shapelet::DMatrix;
130  using shapelet::makePsi;
131 
132  std::complex<double> z(x,y);
133  z /= getSigma();
134  DMatrix psi(1,BVec::size());
135  CDVector zList(1);
136  zList(0) = z;
137  makePsi(psi,TMV_vview(zList),BVec::getOrder(),0);
138  return (psi * getValues())(0);
139  }
int y
#define TMV_vview(v)
Definition: MyMatrix.h:202
void makePsi(DMatrix &psi, CDVectorView z, int order, const DVector *coeff=0)
Definition: PsiHelper.cc:226
double x
const DVector & getValues() const
Definition: BVec.h:66
boost::shared_ptr<ShapeletCovariance>& lsst::meas::algorithms::ShapeletImpl::getCovariance ( )
inline

Definition at line 94 of file Shapelet.cc.

95  { return _cov; }
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142
std::complex<double> lsst::meas::algorithms::ShapeletImpl::getPQ ( int  p,
int  q 
)
inline

Definition at line 97 of file Shapelet.cc.

98  {
99  using shapelet::DVector;
100 
101  if (p < q) return std::conj(getPQ(q,p));
102  else {
103  const DVector& v = BVec::getValues();
104  if (p == q) {
105  int k = p*(2*p+3);
106  return v(k);
107  } else {
108  int k = (p+q)*(p+q+1)/2 + 2*q;
109  return std::complex<double>(v(k),v(k+1));
110  }
111  }
112  }
std::complex< double > getPQ(int p, int q)
Definition: Shapelet.cc:97
const DVector & getValues() const
Definition: BVec.h:66
void lsst::meas::algorithms::ShapeletImpl::operator= ( const ShapeletImpl rhs)
inline

Definition at line 78 of file Shapelet.cc.

79  {
80  BVec::operator=(rhs);
81  if (rhs._cov.get()) {
82  if (_cov.get() &&
83  _cov->TMV_colsize() == rhs._cov->TMV_colsize() &&
84  _cov->TMV_rowsize() == rhs._cov->TMV_rowsize()) {
85  *_cov = *rhs._cov;
86  } else {
87  _cov.reset(new ShapeletCovariance(*rhs._cov));
88  }
89  } else {
90  _cov.reset();
91  }
92  }
BVec & operator=(const AssignableToBVec &rhs)
Definition: BVec.cc:39
Shapelet::ShapeletCovariance ShapeletCovariance
Definition: Shapelet.cc:49
boost::shared_ptr< ShapeletCovariance > _cov
Definition: Shapelet.cc:142

Member Data Documentation

boost::shared_ptr<ShapeletCovariance> lsst::meas::algorithms::ShapeletImpl::_cov
private

Definition at line 142 of file Shapelet.cc.


The documentation for this class was generated from the following file: