24 #ifndef LSST_MEAS_BASE_NaiveCentroid_h_INCLUDED
25 #define LSST_MEAS_BASE_NaiveCentroid_h_INCLUDED
32 #include "lsst/pex/config.h"
38 namespace lsst {
namespace meas {
namespace base {
44 LSST_CONTROL_FIELD(
background,
double,
"Value to subtract from the image pixel values");
46 "Do check that the centroid is contained in footprint.");
48 "If set > 0, Centroid Check also checks distance from footprint peak.");
80 afw::table::SourceRecord & measRecord,
81 afw::image::Exposure<float>
const & exposure
85 afw::table::SourceRecord & measRecord,
107 #endif // !LSST_MEAS_BASE_NaiveCentroid_h_INCLUDED
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Called to measure a single child source in an image.
NaiveCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
double maxDistToPeak
"If set > 0, Centroid Check also checks distance from footprint peak." ;
static FlagDefinition const EDGE
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const
Handle an exception thrown by the current algorithm by setting flags in the given record...
Exception to be thrown when a measurement algorithm experiences a known failure mode.
NaiveCentroidControl Control
Utility class for handling flag fields that indicate the failure modes of an algorithm.
static FlagDefinitionList const & getFlagDefinitions()
A class that calculates a centroid as a simple unweighted first moment of the 3x3 region around a pix...
static FlagDefinition const NO_COUNTS
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
bool doFootprintCheck
"Do check that the centroid is contained in footprint." ;
double background
"Value to subtract from the image pixel values" ;
A FunctorKey for CentroidResult.
A C++ control class to handle NaiveCentroidAlgorithm's configuration.
vector-type utility class to build a collection of FlagDefinitions
static FlagDefinition const FAILURE
NaiveCentroidControl()
Default constructor.