#include <DipoleAlgorithms.h>
|
| NaiveDipoleFlux (Control const &ctrl, std::string const &name, afw::table::Schema &schema) |
|
void | measure (afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const |
| Given an image and a pixel position, return a Centroid using a naive 3x3 weighted moment. More...
|
|
void | fail (afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error=NULL) const |
| Handle an exception thrown by the current algorithm by setting flags in the given record. More...
|
|
ResultKey const & | getPositiveKeys () const |
| Return the standard flux keys registered by this algorithm. More...
|
|
ResultKey const & | getNegativeKeys () const |
|
virtual void | measureForced (afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure, afw::table::SourceRecord const &refRecord, afw::geom::SkyWcs const &refWcs) const |
| Called to measure a single child source in an image. More...
|
|
virtual void | measureNForced (afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure, afw::table::SourceCatalog const &refRecord, afw::geom::SkyWcs const &refWcs) const |
| Called to simultaneously measure all children in a deblend family, in a single image. More...
|
|
virtual void | measureN (afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure) const |
| Called to simultaneously measure all children in a deblend family, in a single image. More...
|
|
std::string | getLogName () const |
|
Definition at line 211 of file DipoleAlgorithms.h.
◆ Control
◆ ResultKey
◆ NaiveDipoleFlux()
Definition at line 216 of file DipoleAlgorithms.h.
218 _numPositiveKey(
schema.addField<
int>(
name+
"_npos",
"number of positive pixels",
"count")),
219 _numNegativeKey(
schema.addField<
int>(
name+
"_nneg",
"number of negative pixels",
"count"))
DipoleFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
◆ fail()
Handle an exception thrown by the current algorithm by setting flags in the given record.
fail() is called by the measurement framework when an exception is allowed to propagate out of one the algorithm's measure() methods. It should generally set both a general failure flag for the algorithm as well as a specific flag indicating the error condition, if possible. To aid in this, if the exception was an instance of MeasurementError, it will be passed in, carrying information about what flag to set.
An algorithm can also to chose to set flags within its own measure() methods, and then just return, rather than throw an exception. However, fail() should be implemented even when all known failure modes do not throw exceptions, to ensure that unexpected exceptions thrown in lower-level code are properly handled.
Implements lsst::meas::base::BaseAlgorithm.
Definition at line 288 of file DipoleAlgorithms.cc.
meas::base::FlagHandler _flagHandler
void handleFailure(afw::table::BaseRecord &record, MeasurementError const *error=nullptr) const
Handle an expected or unexpected Exception thrown by a measurement algorithm.
◆ getFlagDefinitions()
◆ getLogName()
std::string lsst::meas::base::BaseAlgorithm::getLogName |
( |
| ) |
const |
|
inlineinherited |
◆ getNegativeKeys()
ResultKey const& lsst::ip::diffim::DipoleFluxAlgorithm::getNegativeKeys |
( |
| ) |
const |
|
inlineinherited |
◆ getPositiveKeys()
ResultKey const& lsst::ip::diffim::DipoleFluxAlgorithm::getPositiveKeys |
( |
| ) |
const |
|
inlineinherited |
Return the standard flux keys registered by this algorithm.
Definition at line 133 of file DipoleAlgorithms.h.
◆ measure()
Given an image and a pixel position, return a Centroid using a naive 3x3 weighted moment.
Implements lsst::meas::base::SingleFrameAlgorithm.
Definition at line 268 of file DipoleAlgorithms.cc.
274 NaiveDipoleFootprinter functor;
275 source.getFootprint()->getSpans()->applyFunctor(functor, *(exposure.getMaskedImage().getImage()),
276 *(exposure.getMaskedImage().getVariance()));
280 source.set(_numPositiveKey, functor.getNumPositive());
284 source.set(_numNegativeKey, functor.getNumNegative());
ResultKey const & getNegativeKeys() const
MaskedImage< float, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > MaskedImageT
const char * source()
Source function that allows astChannel to source from a Stream.
ResultKey const & getPositiveKeys() const
Return the standard flux keys registered by this algorithm.
◆ measureForced()
Called to measure a single child source in an image.
Before this method is called, all neighbors will be replaced with noise, using the outputs of the deblender. Outputs should be saved in the given SourceRecord, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.
Implements lsst::meas::base::ForcedAlgorithm.
Reimplemented in lsst::meas::extensions::photometryKron::KronFluxAlgorithm.
Definition at line 172 of file Algorithm.h.
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const =0
Called to measure a single child source in an image.
◆ measureN()
Called to simultaneously measure all children in a deblend family, in a single image.
Outputs should be saved in the given SourceCatalog, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.
The default implementation simply throws an exception, indicating that simultaneous measurement is not supported.
Definition at line 31 of file Algorithm.cc.
33 throw LSST_EXCEPT(pex::exceptions::LogicError,
"measureN not implemented for this algorithm");
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
◆ measureNForced()
Called to simultaneously measure all children in a deblend family, in a single image.
Outputs should be saved in the given SourceCatalog, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.
The default implementation simply throws an exception, indicating that simultaneous measurement is not supported.
Reimplemented from lsst::meas::base::ForcedAlgorithm.
Definition at line 179 of file Algorithm.h.
virtual void measureN(afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure) const
Called to simultaneously measure all children in a deblend family, in a single image.
◆ _flagHandler
◆ _fluxResultKey
◆ _logName
◆ _negativeKeys
ResultKey lsst::ip::diffim::DipoleFluxAlgorithm::_negativeKeys |
|
protectedinherited |
◆ _positiveKeys
ResultKey lsst::ip::diffim::DipoleFluxAlgorithm::_positiveKeys |
|
protectedinherited |
◆ FAILURE
meas::base::FlagDefinition const lsst::ip::diffim::DipoleFluxAlgorithm::FAILURE = dipoleFluxFlagDefinitions.addFailureFlag("general failure flag, set if anything went wrong") |
|
staticinherited |
◆ NEG_FLAG
meas::base::FlagDefinition const lsst::ip::diffim::DipoleFluxAlgorithm::NEG_FLAG = dipoleFluxFlagDefinitions.add("neg_flag", "failure flag for negative, set if anything went wrong") |
|
staticinherited |
◆ POS_FLAG
meas::base::FlagDefinition const lsst::ip::diffim::DipoleFluxAlgorithm::POS_FLAG = dipoleFluxFlagDefinitions.add("pos_flag", "failure flag for positive, set if anything went wrong") |
|
staticinherited |
The documentation for this class was generated from the following files: