24 #ifndef LSST_MEAS_BASE_GaussianCentroid_h_INCLUDED
25 #define LSST_MEAS_BASE_GaussianCentroid_h_INCLUDED
27 #include "lsst/afw/geom/Point.h"
28 #include "lsst/pex/config.h"
34 namespace lsst {
namespace meas {
namespace base {
54 FittedModel(
int status_, std::vector<double> params_,
int iter_=0,
double flamd_=0,
double chnew_=0) :
77 "Do check that the centroid is contained in footprint.");
79 "If set > 0, Centroid Check also checks distance from footprint peak.");
103 template<
typename PixelT>
105 static afw::geom::Point2D
fitCentroid(afw::image::Image<PixelT>
const& im,
111 afw::table::SourceRecord & measRecord,
112 afw::image::Exposure<float>
const & exposure
116 afw::table::SourceRecord & measRecord,
138 #endif // !LSST_MEAS_BASE_GaussianCentroid_h_INCLUDED
GaussianCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
GaussianCentroidControl()
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
static afw::geom::Point2D fitCentroid(afw::image::Image< PixelT > const &im, double x0, double y0)
Compute centroids with 2-D Gaussian fitter.
Exception to be thrown when a measurement algorithm experiences a known failure mode.
A class that calculates a centroid by fitting a circular Gaussian to the image.
static FlagDefinition const FAILURE
bool doFootprintCheck
Default constructor.
Utility class for handling flag fields that indicate the failure modes of an algorithm.
std::vector< double > params
static FlagDefinitionList const & getFlagDefinitions()
A C++ control class to handle GaussianCentroidAlgorithm's configuration.
FittedModel(int status_, std::vector< double > params_, int iter_=0, double flamd_=0, double chnew_=0)
GaussianCentroidControl Control
A typedef to the Control object for this algorithm, defined above.
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Called to measure a single child source in an image.
double maxDistToPeak
"If set > 0, Centroid Check also checks distance from footprint peak." ;
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
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...
A FunctorKey for CentroidResult.
static FlagDefinition const NO_PEAK
vector-type utility class to build a collection of FlagDefinitions