32 namespace algorithms {
43 std::vector<ShapeletPsfCandidate*>& cand,
44 std::vector<Position>& pos,
45 std::vector<BVec>& psf,
46 std::vector<double>& nu,
47 std::vector<long>& flags
59 _cand.push_back(psfCand);
67 std::vector<ShapeletPsfCandidate*>&
_cand;
68 std::vector<Position>&
_pos;
70 std::vector<double>&
_nu;
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");
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;
131 _fit->calculate(pos, psf, nu, flags);
134 const int nCand = cand.size();
135 for(
int i=0; i<nCand; ++i)
if (flags[i]) cand[i]->setBad();
142 _fit->interpolate(pos,b);
149 return _fit->interpolateSingleElement(pos,i);
153 boost::shared_ptr<FittedPsf>
_fit;
206 const PointD& pos,
int i)
const
209 double x,
double y,
int i)
const
void calculate(SpatialCellSet::Ptr cellSet, const Exposure &exposure)
int getFitOrder() const
get the order of the fit
lsst::afw::math::SpatialCellSet SpatialCellSet
int getInt(const std::string &name) const
std::vector< Position > & _pos
void setSigma(double sigma)
set a new value of sigma
lsst::afw::image::Exposure< PixelT > Exposure
std::vector< BVec > & _psf
void setSigma(double sigma)
lsst::afw::math::SpatialCellCandidate SpatialCellCandidate
int getFitSize() const
the number of fit coefficients
A class to contain the data, WCS, and other information needed to describe an image of the sky...
a container for holding hierarchical configuration data in memory.
void processCandidate(SpatialCellCandidate *cand)
std::vector< long > & _flags
double getX() const
Get position.
double interpolateSingleElement(double x, double y, int i)
Shapelet::ConstPtr interpolate(const PointD &pos) const
Perform the interpolation.
boost::shared_ptr< const Shapelet > ConstPtr
ShapeletInterpolationImpl(const Policy &policy)
ShapeletInterpolation & operator=(const ShapeletInterpolation &rhs)
op= does a shallow copy
afw::table::Key< double > sigma
A module for determining which objects are good PSF stars.
A collection of SpatialCells covering an entire image.
lsst::pex::policy::Policy Policy
Defines the ShapeletInterpolation class.
lsst::afw::geom::PointD PointD
Shapelet::ConstPtr getShapelet() const
Get the shapelet decomposition.
shapelet::Position Position
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.
LoadCandidatesVisitor(std::vector< ShapeletPsfCandidate * > &cand, std::vector< Position > &pos, std::vector< BVec > &psf, std::vector< double > &nu, std::vector< long > &flags)
ShapeletInterpolation(const Policy &policy)
Basic constructor just loads parameters from a policy file.
std::vector< ShapeletPsfCandidate * > & _cand
double getDouble(const std::string &name) const
double getCandidateRating() const
Define "goodness" of candidate for SpatialCell.
double getSigma() const
get the scale size of the shapelet
int getOrder() const
get the order of the shapelet
std::vector< double > & _nu
afw::table::Key< double > b
Shapelet::ConstPtr interpolate(double x, double y)
boost::shared_ptr< SpatialCellSet > Ptr
~ShapeletInterpolation()
Destructor needs to delete pImpl.
boost::shared_ptr< FittedPsf > _fit
int getSize() const
the size of the shapelet vector
ShapeletInterpolationImpl * pImpl
shapelet::FittedPsf FittedPsf