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::ShapeletInterpolationImpl Class Reference

Public Types

typedef float PixelT
 
typedef lsst::pex::policy::Policy Policy
 
typedef
lsst::afw::math::SpatialCellSet 
SpatialCellSet
 
typedef
lsst::afw::image::Exposure
< PixelT
Exposure
 
typedef lsst::afw::geom::PointD PointD
 
typedef shapelet::FittedPsf FittedPsf
 

Public Member Functions

 ShapeletInterpolationImpl (const Policy &policy)
 
int getOrder () const
 
int getFitOrder () const
 
double getSigma () const
 
int getSize () const
 
int getFitSize () const
 
void setSigma (double sigma)
 
void calculate (SpatialCellSet::Ptr cellSet, const Exposure &exposure)
 
Shapelet::ConstPtr interpolate (double x, double y)
 
double interpolateSingleElement (double x, double y, int i)
 

Private Attributes

boost::shared_ptr< FittedPsf_fit
 
int _nStarsPerCell
 

Detailed Description

Definition at line 76 of file ShapeletInterpolation.cc.

Member Typedef Documentation

Definition at line 82 of file ShapeletInterpolation.cc.

Definition at line 85 of file ShapeletInterpolation.cc.

Definition at line 79 of file ShapeletInterpolation.cc.

Definition at line 83 of file ShapeletInterpolation.cc.

Definition at line 80 of file ShapeletInterpolation.cc.

Definition at line 81 of file ShapeletInterpolation.cc.

Constructor & Destructor Documentation

lsst::meas::algorithms::ShapeletInterpolationImpl::ShapeletInterpolationImpl ( const Policy policy)
inline

Definition at line 87 of file ShapeletInterpolation.cc.

88  {
89  shapelet::ConfigFile params;
90  params["psf_order"] = policy.getInt("shapeletOrder");
91  params["fitpsf_order"] = policy.getInt("interpOrder");
92  params["fitpsf_nsigma_outlier"] = policy.getDouble("interpNSigmaClip");
93  params["fitpsf_pca_thresh"] = policy.getDouble("pcaThresh");
94  _fit.reset(new FittedPsf(params));
95  _nStarsPerCell = policy.getInt("nStarsPerCell");
96  }

Member Function Documentation

void lsst::meas::algorithms::ShapeletInterpolationImpl::calculate ( SpatialCellSet::Ptr  cellSet,
const Exposure exposure 
)
inline

Definition at line 110 of file ShapeletInterpolation.cc.

113  {
114  using shapelet::Position;
115  using shapelet::BVec;
116 
117  std::vector<ShapeletPsfCandidate*> cand;
118  std::vector<Position> pos;
119  std::vector<BVec> psf;
120  std::vector<double> nu;
121  std::vector<long> flags;
122 
123  LoadCandidatesVisitor visitor(cand, pos, psf, nu, flags);
124  cellSet->visitCandidates(&visitor, _nStarsPerCell);
125 
126  // TODO: Currently, the rounds of outlier rejection are done
127  // within FittedPSF, which means that we don't have the opportunity
128  // to select other candidates that might be ok in that
129  // cell. I should pull out some of that functionality, so I
130  // can utilize the SpatialCells better.
131  _fit->calculate(pos, psf, nu, flags);
132 
133  // Mark the flagged candidates as BAD.
134  const int nCand = cand.size();
135  for(int i=0; i<nCand; ++i) if (flags[i]) cand[i]->setBad();
136  }
int lsst::meas::algorithms::ShapeletInterpolationImpl::getFitOrder ( ) const
inline

Definition at line 100 of file ShapeletInterpolation.cc.

100 { return _fit->getFitOrder(); }
int lsst::meas::algorithms::ShapeletInterpolationImpl::getFitSize ( ) const
inline

Definition at line 106 of file ShapeletInterpolation.cc.

int lsst::meas::algorithms::ShapeletInterpolationImpl::getOrder ( ) const
inline

Definition at line 98 of file ShapeletInterpolation.cc.

98 { return _fit->getPsfOrder(); }
double lsst::meas::algorithms::ShapeletInterpolationImpl::getSigma ( ) const
inline

Definition at line 102 of file ShapeletInterpolation.cc.

102 { return _fit->getSigma(); }
int lsst::meas::algorithms::ShapeletInterpolationImpl::getSize ( ) const
inline

Definition at line 104 of file ShapeletInterpolation.cc.

104 { return (getOrder()+1)*(getOrder()+2)/2; }
Shapelet::ConstPtr lsst::meas::algorithms::ShapeletInterpolationImpl::interpolate ( double  x,
double  y 
)
inline

Definition at line 138 of file ShapeletInterpolation.cc.

139  {
140  shapelet::BVec b(getOrder(),getSigma());
141  shapelet::Position pos(x,y);
142  _fit->interpolate(pos,b);
143  return Shapelet::ConstPtr(new Shapelet(b));
144  }
int y
boost::shared_ptr< const Shapelet > ConstPtr
Definition: Shapelet.h:95
double x
afw::table::Key< double > b
double lsst::meas::algorithms::ShapeletInterpolationImpl::interpolateSingleElement ( double  x,
double  y,
int  i 
)
inline

Definition at line 146 of file ShapeletInterpolation.cc.

147  {
148  shapelet::Position pos(x,y);
149  return _fit->interpolateSingleElement(pos,i);
150  }
int y
double x
void lsst::meas::algorithms::ShapeletInterpolationImpl::setSigma ( double  sigma)
inline

Definition at line 108 of file ShapeletInterpolation.cc.

108 { _fit->setSigma(sigma); }
afw::table::Key< double > sigma
Definition: GaussianPsf.cc:43

Member Data Documentation

boost::shared_ptr<FittedPsf> lsst::meas::algorithms::ShapeletInterpolationImpl::_fit
private

Definition at line 153 of file ShapeletInterpolation.cc.

int lsst::meas::algorithms::ShapeletInterpolationImpl::_nStarsPerCell
private

Definition at line 154 of file ShapeletInterpolation.cc.


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