25 #ifndef LSST_IP_DIFFIM_DIPOLEALGORITHMS_H 26 #define LSST_IP_DIFFIM_DIPOLEALGORITHMS_H 40 #include "ndarray/eigen.h" 69 LSST_CONTROL_FIELD(stepSizeCoord,
float,
"Default initial step size for coordinates in non-linear fitter");
70 LSST_CONTROL_FIELD(stepSizeFlux,
float,
"Default initial step size for flux in non-linear fitter");
71 LSST_CONTROL_FIELD(errorDef,
double,
"How many sigma the error bars of the non-linear fitter represent");
72 LSST_CONTROL_FIELD(maxFnCalls,
int,
"Maximum function calls for non-linear fitter; 0 = unlimited");
74 stepSizeCoord(0.1), stepSizeFlux(1.0), errorDef(1.0), maxFnCalls(100000) {}
102 std::string const & doc, ResultKey
const & positiveKeys, ResultKey
const & negativeKeys);
141 ResultKey
const & positiveKeys, ResultKey
const & negativeKeys);
218 _numPositiveKey(schema.addField<int>(name+
"_npos",
"number of positive pixels",
"count")),
219 _numNegativeKey(schema.addField<int>(name+
"_nneg",
"number of negative pixels",
"count"))
274 ResultKey
const & positiveKeys, ResultKey
const & negativeKeys);
297 _chi2dofKey(schema.addField<float>(name+
"_chi2dof",
298 "chi2 per degree of freedom of fit"))
309 double negCenterX,
double negCenterY,
double negFlux,
310 double posCenterX,
double poCenterY,
double posFlux
335 #endif // !LSST_IP_DIFFIM_DIPOLEALGORITHMS_H
Defines the fields and offsets for a table.
ResultKey const & getPositiveKeys() const
Return the standard centroid keys registered by this algorithm.
ResultKey const & getNegativeKeys() const
meas::base::CentroidResultKey ResultKey
DipoleFluxControl Control
A typedef to the Control object for this algorithm, defined above.
Implementation of Psf dipole flux.
meas::base::FluxResultKey _fluxResultKey
Intermediate base class for algorithms that compute a centroid.
meas::base::FluxResultKey ResultKey
NaiveDipoleFlux(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...
Only the diagonal elements of the covariance matrix are provided.
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const =0
Handle an exception thrown by the current algorithm by setting flags in the given record...
ResultKey const & getNegativeKeys() const
meas::base::FluxResultKey _fluxResultKey
static meas::base::FlagDefinition const FAILURE
C++ control object for PSF dipole fluxes.
Exception to be thrown when a measurement algorithm experiences a known failure mode.
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
A preprocessor macro used to define fields in C++ "control object" structs.
static FluxResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)
Add a pair of _instFlux, _instFluxErr fields to a Schema, and return a FluxResultKey that points to t...
ResultKey const & getCenterKeys() const
Return the standard centroid keys registered by this algorithm.
static meas::base::FlagDefinition const POS_FLAG
DipoleFluxControl Control
Utility class for handling flag fields that indicate the failure modes of an algorithm.
static meas::base::FlagDefinitionList const & getFlagDefinitions()
meas::base::FlagHandler _flagHandler
A base class for image defects.
ResultKey const & getNegativeKeys() const
DipoleCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
static CentroidResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc, UncertaintyEnum uncertainty)
Add the appropriate fields to a Schema, and return a CentroidResultKey that manages them...
static meas::base::FlagDefinition const POS_FLAG
static meas::base::FlagDefinition const FAILURE
const char * source()
Source function that allows astChannel to source from a Stream.
Intermediate base class for algorithms that compute a flux.
A FunctorKey for FluxResult.
Intermediate base class for algorithms that compute a centroid.
static FlagHandler addFields(afw::table::Schema &schema, std::string const &prefix, FlagDefinitionList const &flagDefs, FlagDefinitionList const &exclDefs=FlagDefinitionList::getEmptyList())
Add Flag fields to a schema, creating a FlagHandler object to manage them.
DipoleCentroidControl Control
ResultKey const & getPositiveKeys() const
Return the standard flux keys registered by this algorithm.
DipoleFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
meas::base::FlagHandler _flagHandler
meas::base::CentroidResultKey ResultKey
Tuple type that holds the keys that define a standard centroid algorithm.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
ResultKey const & getPositiveKeys() const
A FunctorKey for CentroidResult.
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.
Record class that contains measurements made on a single exposure.
PsfDipoleFlux(PsfDipoleFluxControl const &ctrl, std::string const &name, afw::table::Schema &schema)
vector-type utility class to build a collection of FlagDefinitions
static meas::base::FlagDefinition const NEG_FLAG
static meas::base::FlagDefinition const NEG_FLAG
static meas::base::FlagDefinitionList const & getFlagDefinitions()
PsfDipoleFluxControl Control