LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
ShapeletInterpolation.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_MEAS_ALGORITHMS_SHAPELETINTERPOLATION_H
3 #define LSST_MEAS_ALGORITHMS_SHAPELETINTERPOLATION_H
4 
5 /*
6  * LSST Data Management System
7  * Copyright 2008, 2009, 2010 LSST Corporation.
8  *
9  * This product includes software developed by the
10  * LSST Project (http://www.lsst.org/).
11  *
12  * This program is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the LSST License Statement and
23  * the GNU General Public License along with this program. If not,
24  * see <http://www.lsstcorp.org/LegalNotices/>.
25  */
26 
34 #include <complex>
35 
36 #include "boost/shared_ptr.hpp"
37 #include "Eigen/Core"
38 
39 #include "lsst/pex/policy/Policy.h"
41 #include "lsst/afw/geom/Point.h"
44 
45 namespace lsst {
46 namespace meas {
47 namespace algorithms {
48 
49  class ShapeletInterpolationImpl;
50 
52  {
70  public:
71 
72  typedef boost::shared_ptr<ShapeletInterpolation> Ptr;
73  typedef boost::shared_ptr<const ShapeletInterpolation> ConstPtr;
74 
75  typedef float PixelT;
80 
82 
88  ShapeletInterpolation(const Policy& policy);
89 
94 
99 
104 
108  int getOrder() const;
109 
113  int getFitOrder() const;
114 
118  double getSigma() const;
119 
123  int getSize() const;
124 
128  int getFitSize() const;
129 
133  void setSigma(double sigma);
134 
140  void calculate(
141  SpatialCellSet::Ptr cellSet,
142  const Exposure& exposure
143  );
144 
148  Shapelet::ConstPtr interpolate(const PointD& pos) const;
149  Shapelet::ConstPtr interpolate(double x, double y) const;
150 
154  double interpolateSingleElement(const PointD& pos, int i) const;
155  double interpolateSingleElement(double x, double y, int i) const;
156 
157  private :
158 
160  };
161 
162 }}}
163 
164 #endif
int getFitOrder() const
get the order of the fit
void setSigma(double sigma)
set a new value of sigma
A coordinate class intended to represent absolute positions.
int y
int getFitSize() const
the number of fit coefficients
a container for holding hierarchical configuration data in memory.
Definition: Policy.h:169
Defines the Shapelet class.
Shapelet::ConstPtr interpolate(const PointD &pos) const
Perform the interpolation.
boost::shared_ptr< const Shapelet > ConstPtr
Definition: Shapelet.h:95
ShapeletInterpolation & operator=(const ShapeletInterpolation &rhs)
op= does a shallow copy
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:42
A collection of SpatialCells covering an entire image.
Definition: SpatialCell.h:378
lsst::afw::math::SpatialCellSet SpatialCellSet
boost::shared_ptr< ShapeletInterpolation > Ptr
This class is an interpolator to get a Shapelet at an arbitrary position.
int x
void calculate(SpatialCellSet::Ptr cellSet, const Exposure &exposure)
Calculate the interpolation parameters from a SpatialCellSet.
double interpolateSingleElement(const PointD &pos, int i) const
Perform the interpolation for only one shapelet coefficient.
ShapeletInterpolation(const Policy &policy)
Basic constructor just loads parameters from a policy file.
lsst::afw::image::Exposure< PixelT > Exposure
boost::shared_ptr< const ShapeletInterpolation > ConstPtr
double getSigma() const
get the scale size of the shapelet
int getOrder() const
get the order of the shapelet
Class to ensure constraints for spatial modeling.
boost::shared_ptr< SpatialCellSet > Ptr
Definition: SpatialCell.h:380
~ShapeletInterpolation()
Destructor needs to delete pImpl.
int getSize() const
the size of the shapelet vector