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

#include <ShapeletPsfCandidate.h>

Inheritance diagram for lsst::meas::algorithms::ShapeletPsfCandidate:
lsst::afw::math::SpatialCellCandidate

Public Types

typedef
lsst::afw::math::SpatialCellCandidate 
base
 
typedef
lsst::afw::table::SourceRecord 
Source
 
typedef boost::shared_ptr
< ShapeletPsfCandidate
Ptr
 
typedef boost::shared_ptr
< const ShapeletPsfCandidate
ConstPtr
 
- Public Types inherited from lsst::afw::math::SpatialCellCandidate
enum  Status { BAD = 0, GOOD = 1, UNKNOWN = 2 }
 
typedef boost::shared_ptr
< SpatialCellCandidate
Ptr
 
typedef boost::shared_ptr
< const SpatialCellCandidate
ConstPtr
 

Public Member Functions

 ShapeletPsfCandidate (double x, double y, double size, boost::shared_ptr< Source > source)
 Constructor takes position, size, and original source. More...
 
void setShapelet (Shapelet::ConstPtr shapelet)
 Set the shapelet decomposition. More...
 
double getX () const
 Get position. More...
 
double getY () const
 
double getSize () const
 Get size. More...
 
boost::shared_ptr< SourcegetSource () const
 Get source. More...
 
Shapelet::ConstPtr getShapelet () const
 Get the shapelet decomposition. More...
 
bool hasShapelet () const
 Check if shapelet decomposition is set. More...
 
double getCandidateRating () const
 Define "goodness" of candidate for SpatialCell. More...
 
void setBad ()
 Mark the candidate as BAD. More...
 
- Public Member Functions inherited from lsst::afw::math::SpatialCellCandidate
 SpatialCellCandidate (float const xCenter, float const yCenter)
 
virtual ~SpatialCellCandidate ()
 
float getXCenter () const
 Return the object's column-centre. More...
 
float getYCenter () const
 Return the object's row-centre. More...
 
virtual bool instantiate ()
 Do anything needed to make this candidate usable. More...
 
virtual void setCandidateRating (double)
 Set the candidate's rating. More...
 
int getId () const
 Return the candidate's unique ID. More...
 
Status getStatus () const
 Return the candidate's status. More...
 
void setStatus (Status status)
 Set the candidate's status. More...
 
virtual bool isBad () const
 Is this candidate unacceptable? More...
 

Private Attributes

double _size
 
boost::shared_ptr< Source_source
 
Shapelet::ConstPtr _shapelet
 
double _rating
 

Detailed Description

Definition at line 42 of file ShapeletPsfCandidate.h.

Member Typedef Documentation

Definition at line 46 of file ShapeletPsfCandidate.h.

Definition at line 50 of file ShapeletPsfCandidate.h.

Definition at line 49 of file ShapeletPsfCandidate.h.

Definition at line 47 of file ShapeletPsfCandidate.h.

Constructor & Destructor Documentation

lsst::meas::algorithms::ShapeletPsfCandidate::ShapeletPsfCandidate ( double  x,
double  y,
double  size,
boost::shared_ptr< Source source 
)
inline

Constructor takes position, size, and original source.

The object stores the position, and initial guess of the size and takes whatever other information is required from the Source data. Currently, only sky is used, but it seemed wise to have source in the constructor in case we decide to store something else too. For example, we will eventually want to extract some kind of color information.

I don't store the image, wcs, or weightImage in the candidate itself, since all candidates will have the same things for these.

Once we start doing PCA-style interpolations that use sources from different exposures, we will have to do something different. But that algorithm will require a pretty significant re-thinking of the design anyway, so no point in worrying about that yet.

(No destructor, copy constructor, or op=, since the defaults do the right thing.)

Parameters
xX position of candidate
yY position of candidate
sizeInitial estimate of size
sourceOriginal source

Definition at line 77 of file ShapeletPsfCandidate.h.

Member Function Documentation

double lsst::meas::algorithms::ShapeletPsfCandidate::getCandidateRating ( ) const
inlinevirtual

Define "goodness" of candidate for SpatialCell.

Implements lsst::afw::math::SpatialCellCandidate.

Definition at line 133 of file ShapeletPsfCandidate.h.

Shapelet::ConstPtr lsst::meas::algorithms::ShapeletPsfCandidate::getShapelet ( ) const
inline

Get the shapelet decomposition.

Definition at line 119 of file ShapeletPsfCandidate.h.

120  {
121  assert(_shapelet);
122  return _shapelet;
123  }
double lsst::meas::algorithms::ShapeletPsfCandidate::getSize ( ) const
inline

Get size.

Definition at line 105 of file ShapeletPsfCandidate.h.

boost::shared_ptr< Source > lsst::meas::algorithms::ShapeletPsfCandidate::getSource ( ) const
inline

Get source.

Definition at line 110 of file ShapeletPsfCandidate.h.

111  {
112  assert(_source);
113  return _source;
114  }
double lsst::meas::algorithms::ShapeletPsfCandidate::getX ( ) const
inline

Get position.

Definition at line 99 of file ShapeletPsfCandidate.h.

99 { return base::getXCenter(); }
float getXCenter() const
Return the object&#39;s column-centre.
Definition: SpatialCell.h:95
double lsst::meas::algorithms::ShapeletPsfCandidate::getY ( ) const
inline

Definition at line 100 of file ShapeletPsfCandidate.h.

100 { return base::getYCenter(); }
float getYCenter() const
Return the object&#39;s row-centre.
Definition: SpatialCell.h:98
bool lsst::meas::algorithms::ShapeletPsfCandidate::hasShapelet ( ) const
inline

Check if shapelet decomposition is set.

Definition at line 128 of file ShapeletPsfCandidate.h.

128 { return static_cast<bool>(_shapelet); }
void lsst::meas::algorithms::ShapeletPsfCandidate::setBad ( )
inline

Mark the candidate as BAD.

SpatialCellCandidate::setStatus is a bit of a pain to use, since there doesn't seem to be any way around explicitly specifying the full namespace and class specification of BAD. So do it once here.

Definition at line 143 of file ShapeletPsfCandidate.h.

void lsst::meas::algorithms::ShapeletPsfCandidate::setShapelet ( Shapelet::ConstPtr  shapelet)
inline

Set the shapelet decomposition.

Definition at line 89 of file ShapeletPsfCandidate.h.

90  {
91  _shapelet = shapelet;
92  if (_shapelet->hasCovariance())
93  _rating = _shapelet->getValues()(0) / sqrt((*_shapelet->getCovariance())(0,0));
94  }

Member Data Documentation

double lsst::meas::algorithms::ShapeletPsfCandidate::_rating
private

Definition at line 154 of file ShapeletPsfCandidate.h.

Shapelet::ConstPtr lsst::meas::algorithms::ShapeletPsfCandidate::_shapelet
private

Definition at line 153 of file ShapeletPsfCandidate.h.

double lsst::meas::algorithms::ShapeletPsfCandidate::_size
private

Definition at line 151 of file ShapeletPsfCandidate.h.

boost::shared_ptr< Source > lsst::meas::algorithms::ShapeletPsfCandidate::_source
private

Definition at line 152 of file ShapeletPsfCandidate.h.


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