lsst.meas.base  20.0.0+21
Public Member Functions | List of all members
lsst::meas::base::CentroidChecker Class Reference

#include <CentroidUtilities.h>

Public Member Functions

 CentroidChecker (afw::table::Schema &schema, std::string const &name, bool inside=true, double maxDistFromPeak=-1.0)
 Check source record produced by a centroid algorithm called "name". More...
 
bool operator() (afw::table::SourceRecord &record) const
 Set the centroid to the first footprint if the centroid is either more than _dist pixels from the footprint center, or if it is outside the footprint. More...
 

Detailed Description

Definition at line 190 of file CentroidUtilities.h.

Constructor & Destructor Documentation

◆ CentroidChecker()

lsst::meas::base::CentroidChecker::CentroidChecker ( afw::table::Schema schema,
std::string const &  name,
bool  inside = true,
double  maxDistFromPeak = -1.0 
)

Check source record produced by a centroid algorithm called "name".

If the centroid is accompanied by uncertainties (the xErr and yErr fields), these should not be NaN. If they are, the algorithmName + "_flag_badError" flag and the general failure flag for the algorithm are both set.

If the centroid set by the algorithm lies outside the footprint attached to the record, or the centroid is more than "dist" pixels from the footprint peak:

(1) the general failure flag for the algorithm is set (2) algorithmName + "_flag_resetToPeak" flag is set (3) the position of the centroid is changed to that of the footprint Peak

Parameters
[in,out]schemaSchema to which the flag_resetToPeak is to be added
[in]nameThe name of the algorithm we will be checking
[in]doFootprintCheckCheck if centroid is within footprint
[in]maxDistFromPeakCheck if centroid is more than dist from footprint peak

Definition at line 174 of file CentroidUtilities.cc.

Member Function Documentation

◆ operator()()

bool lsst::meas::base::CentroidChecker::operator() ( afw::table::SourceRecord record) const

Set the centroid to the first footprint if the centroid is either more than _dist pixels from the footprint center, or if it is outside the footprint.

Set appropriate flags to indicate any changes to the centroid, and to indicate if uncertainties are set to invalid ("NaN") values.

Definition at line 197 of file CentroidUtilities.cc.


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