24 #ifndef LSST_MEAS_BASE_Blendedness_h_INCLUDED
25 #define LSST_MEAS_BASE_Blendedness_h_INCLUDED
27 #include "lsst/pex/config.h"
30 #include "lsst/afw/table/Source.h"
31 #include "lsst/afw/image/Image.h"
35 namespace lsst {
namespace meas {
namespace base {
41 "Whether to compute HeavyFootprint dot products (the old deblend.blendedness parameter)"
46 "Whether to compute quantities related to the Gaussian-weighted flux"
51 "Whether to compute quantities related to the Gaussian-weighted shape"
56 "Radius factor that sets the maximum extent of the weight function (and hence the flux measurements)"
126 afw::image::MaskedImage<float>
const & image,
127 afw::table::SourceRecord & child
131 afw::image::MaskedImage<float>
const & image,
132 afw::table::SourceRecord & child
136 afw::table::SourceRecord & measRecord,
137 afw::image::Exposure<float>
const & exposure
141 afw::table::SourceRecord & measRecord,
148 void _measureMoments(
149 afw::image::MaskedImage<float>
const & image,
150 afw::table::SourceRecord & child,
151 afw::table::Key<double>
const & fluxRawKey,
152 afw::table::Key<double>
const & fluxAbsKey,
158 afw::table::Key<double> _old;
159 afw::table::Key<double> _fluxRaw;
160 afw::table::Key<double> _fluxChildRaw;
161 afw::table::Key<double> _fluxParentRaw;
162 afw::table::Key<double> _fluxAbs;
163 afw::table::Key<double> _fluxChildAbs;
164 afw::table::Key<double> _fluxParentAbs;
174 #endif // LSST_MEAS_BASE_Blendedness_h_INCLUDED
static FlagDefinition const NO_CENTROID
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
Exception to be thrown when a measurement algorithm experiences a known failure mode.
static FlagDefinition const FAILURE
A FunctorKey for ShapeResult.
void measureParentPixels(afw::image::MaskedImage< float > const &image, afw::table::SourceRecord &child) const
static float computeAbsExpectation(float data, float variance)
Compute the posterior expectation value of the true flux in a pixel from its (Gaussian) likelihood an...
Utility class for handling flag fields that indicate the failure modes of an algorithm.
static FlagDefinition const NO_SHAPE
void measureChildPixels(afw::image::MaskedImage< float > const &image, afw::table::SourceRecord &child) const
double nSigmaWeightMax
"Radius factor that sets the maximum extent of the weight function (and hence the flux measurements)"...
bool doShape
"Whether to compute quantities related to the Gaussian-weighted shape" ;
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
BlendednessControl Control
static float computeAbsBias(float mu, float variance)
Compute the bias induced by using the absolute value of a pixel instead of its value.
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...
static FlagDefinitionList const & getFlagDefinitions()
vector-type utility class to build a collection of FlagDefinitions
bool doFlux
"Whether to compute quantities related to the Gaussian-weighted flux" ;
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Called to measure a single child source in an image.
bool doOld
"Whether to compute HeavyFootprint dot products (the old deblend.blendedness parameter)" ; ...
Compute metrics that measure how blended objects are.
BlendednessAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)