47 schema.getAliasMap()->set(schema.join(name,
"flag",
"badInitialCentroid"),
slotFlagName);
53 (boost::format(
"Alias for '%s' must be defined before initializing '%s' plugin.") %
57 schema.getAliasMap()->set(schema.join(name,
"flag",
"badCentroid"),
slotFlagName);
69 (boost::format(
"%s: Centroid slot value is NaN, but no Footprint attached to record") % name)
72 if (footprint->getPeaks().empty()) {
75 (boost::format(
"%s: Centroid slot value is NaN, but Footprint has no Peaks") % name).str());
77 result.setX(footprint->getPeaks().front().getFx());
78 result.setY(footprint->getPeaks().front().getFy());
86 if (!record.
getTable()->getCentroidSlot().getMeasKey().isValid()) {
92 (boost::format(
"%s requires a centroid, but the centroid slot is not defined") % _name)
98 if (!record.
getTable()->getCentroidSlot().getFlagKey().isValid()) {
105 "%s: Centroid slot value is NaN, but there is no Centroid slot flag "
106 "(is the executionOrder for %s lower than that of the slot Centroid?)") %
114 (boost::format(
"%s: Centroid slot value is NaN, but the Centroid slot flag is not set "
115 "(is the executionOrder for %s lower than that of the slot Centroid?)") %
120 if (!_isCentroider) {
124 }
else if (!_isCentroider && record.
getTable()->getCentroidSlot().getFlagKey().isValid() &&
142 (boost::format(
"Alias for '%s' must be defined before initializing '%s' plugin.") %
146 schema.getAliasMap()->set(schema.join(name,
"flag",
"badShape"),
slotFlagName);
151 if (!record.
getTable()->getCentroidSlot().getMeasKey().isValid()) {
154 (boost::format(
"%s requires a shape, but the shape slot is not defined") % _name).str());
163 if (!record.
getTable()->getShapeSlot().getFlagKey().isValid()) {
166 (boost::format(
"%s: Shape slot value is NaN, but there is no Shape slot flag "
167 "(is the executionOrder for %s lower than that of the slot Shape?)") %
174 (boost::format(
"%s: Shape slot value is NaN, but the Shape slot flag is not set "
175 "(is the executionOrder for %s lower than that of the slot Shape?)") %
181 (boost::format(
"%s: Shape needed, and Shape slot measurement failed.") % _name).str(),
#define LSST_EXCEPT(type,...)
bool getShapeFlag() const
CentroidSlotDefinition::MeasValue getCentroid() const
bool getCentroidFlag() const
std::shared_ptr< SourceTable const > getTable() const
std::shared_ptr< Footprint > getFootprint() const
ShapeSlotDefinition::MeasValue getShape() const
Exception to be thrown when a measurement algorithm experiences a fatal error.
Utility class for handling flag fields that indicate the failure modes of an algorithm.
std::size_t getFailureFlagNumber() const
Get the index of the General Failure flag, if one is defined.
void setValue(afw::table::BaseRecord &record, std::size_t i, bool value) const
Set the flag field corresponding to the given flag index.
Exception to be thrown when a measurement algorithm experiences a known failure mode.