LSSTApplications  19.0.0-14-gb0260a2+64befe7c1c,20.0.0+0b340dd7c4,20.0.0+1540ce6389,20.0.0+7c6b12c2f9,20.0.0+ae956f52c5,20.0.0+be870186d9,20.0.0+e2e26847c2,20.0.0-1-g04bee24+7c6b12c2f9,20.0.0-1-g10df615+fbe45b1aff,20.0.0-1-g253301a+7c6b12c2f9,20.0.0-1-g2b7511a+46a6078777,20.0.0-1-g4d801e7+9d50d6c21a,20.0.0-1-g5b95a8c+8ebfc75efb,20.0.0-1-gb058bd0+46a6078777,20.0.0-1-gb88604f+acecce4127,20.0.0-1-gc96f8cb+016e330d09,20.0.0-1-gedffbd8+83814edeba,20.0.0-10-g0891cd99+a5f14e9acb,20.0.0-10-g9a20bd332+576ca7b471,20.0.0-17-gcdbda88+0e26bfb1e6,20.0.0-2-g4dae9ad+016e330d09,20.0.0-2-g61b8584+85c46248f3,20.0.0-2-gb780d76+f45b7d88f4,20.0.0-21-g9bbb7f7+016e330d09,20.0.0-22-gc512666+f30f3883a7,20.0.0-23-g8900aa8+68630f7098,20.0.0-3-g1653f94+85c46248f3,20.0.0-3-g4cc78c6+63636aeed8,20.0.0-3-g750bffe+e05f822de9,20.0.0-3-gbd60e8c+ff10c6d78d,20.0.0-32-g15a0e07c+a4c9d0309b,20.0.0-4-g97dc21a+68630f7098,20.0.0-4-gfea843c+f45b7d88f4,20.0.0-5-g357b56b+f45b7d88f4,20.0.0-6-g9a5b7a1+b0f8c2be93,20.0.0-60-gad89340+e4dd172200,20.0.0-7-gcda7bf1+673816f70c,w.2020.43
LSSTDataManagementBasePackage
Public Types | Public Member Functions | List of all members
lsst::afw::math::SpatialCellCandidate Class Referenceabstract

Base class for candidate objects in a SpatialCell. More...

#include <SpatialCell.h>

Inheritance diagram for lsst::afw::math::SpatialCellCandidate:
lsst::afw::math::SpatialCellImageCandidate lsst::ip::diffim::KernelCandidate< _PixelT > lsst::meas::algorithms::PsfCandidate< PixelT >

Public Types

enum  Status { BAD = 0, GOOD = 1, UNKNOWN = 2 }
 

Public Member Functions

 SpatialCellCandidate (float const xCenter, float const yCenter)
 
 SpatialCellCandidate (SpatialCellCandidate const &)=default
 
 SpatialCellCandidate (SpatialCellCandidate &&)=default
 
SpatialCellCandidateoperator= (SpatialCellCandidate const &)=default
 
SpatialCellCandidateoperator= (SpatialCellCandidate &&)=default
 
virtual ~SpatialCellCandidate ()=default
 (virtual) destructor – this is a base class you know More...
 
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 double getCandidateRating () const =0
 Return candidate's rating. 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...
 

Detailed Description

Base class for candidate objects in a SpatialCell.

Definition at line 70 of file SpatialCell.h.

Member Enumeration Documentation

◆ Status

Enumerator
BAD 
GOOD 
UNKNOWN 

Definition at line 72 of file SpatialCell.h.

72 { BAD = 0, GOOD = 1, UNKNOWN = 2 };

Constructor & Destructor Documentation

◆ SpatialCellCandidate() [1/3]

lsst::afw::math::SpatialCellCandidate::SpatialCellCandidate ( float const  xCenter,
float const  yCenter 
)
inline
Parameters
xCenterThe object's column-centre
yCenterThe object's row-centre

Definition at line 74 of file SpatialCell.h.

77  : _id(++_CandidateId), _status(UNKNOWN), _xCenter(xCenter), _yCenter(yCenter) {}

◆ SpatialCellCandidate() [2/3]

lsst::afw::math::SpatialCellCandidate::SpatialCellCandidate ( SpatialCellCandidate const &  )
default

◆ SpatialCellCandidate() [3/3]

lsst::afw::math::SpatialCellCandidate::SpatialCellCandidate ( SpatialCellCandidate &&  )
default

◆ ~SpatialCellCandidate()

virtual lsst::afw::math::SpatialCellCandidate::~SpatialCellCandidate ( )
virtualdefault

(virtual) destructor – this is a base class you know

Member Function Documentation

◆ getCandidateRating()

virtual double lsst::afw::math::SpatialCellCandidate::getCandidateRating ( ) const
pure virtual

◆ getId()

int lsst::afw::math::SpatialCellCandidate::getId ( ) const
inline

Return the candidate's unique ID.

Definition at line 104 of file SpatialCell.h.

104 { return _id; }

◆ getStatus()

Status lsst::afw::math::SpatialCellCandidate::getStatus ( ) const
inline

Return the candidate's status.

Definition at line 106 of file SpatialCell.h.

106 { return _status; }

◆ getXCenter()

float lsst::afw::math::SpatialCellCandidate::getXCenter ( ) const
inline

Return the object's column-centre.

Definition at line 90 of file SpatialCell.h.

90 { return _xCenter; }

◆ getYCenter()

float lsst::afw::math::SpatialCellCandidate::getYCenter ( ) const
inline

Return the object's row-centre.

Definition at line 93 of file SpatialCell.h.

93 { return _yCenter; }

◆ instantiate()

virtual bool lsst::afw::math::SpatialCellCandidate::instantiate ( )
inlinevirtual

Do anything needed to make this candidate usable.

Definition at line 96 of file SpatialCell.h.

96 { return true; }

◆ isBad()

virtual bool lsst::afw::math::SpatialCellCandidate::isBad ( ) const
inlinevirtual

Is this candidate unacceptable?

Definition at line 110 of file SpatialCell.h.

110 { return (_status == BAD); }

◆ operator=() [1/2]

SpatialCellCandidate& lsst::afw::math::SpatialCellCandidate::operator= ( SpatialCellCandidate &&  )
default

◆ operator=() [2/2]

SpatialCellCandidate& lsst::afw::math::SpatialCellCandidate::operator= ( SpatialCellCandidate const &  )
default

◆ setCandidateRating()

virtual void lsst::afw::math::SpatialCellCandidate::setCandidateRating ( double  )
inlinevirtual

Set the candidate's rating.

Definition at line 101 of file SpatialCell.h.

101 {}

◆ setStatus()

void lsst::afw::math::SpatialCellCandidate::setStatus ( Status  status)

Set the candidate's status.

Definition at line 54 of file SpatialCell.cc.

54  {
55  switch (status) {
56  case GOOD:
57  case UNKNOWN:
58  _status = status;
59  return;
60  case BAD:
61  _status = status;
62  return;
63  }
64 
66  (boost::format("Saw unknown status %d") % status).str());
67 }

The documentation for this class was generated from the following files:
lsst.pex.config.history.format
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174
lsst::afw::math::SpatialCellCandidate::BAD
@ BAD
Definition: SpatialCell.h:72
lsst::afw::math::SpatialCellCandidate::GOOD
@ GOOD
Definition: SpatialCell.h:72
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
lsst.pex::exceptions::InvalidParameterError
Reports invalid arguments.
Definition: Runtime.h:66
lsst::afw::math::SpatialCellCandidate::UNKNOWN
@ UNKNOWN
Definition: SpatialCell.h:72