25#ifndef LSST_IP_DIFFIM_DIPOLEALGORITHMS_H
26#define LSST_IP_DIFFIM_DIPOLEALGORITHMS_H
39#include "lsst/pex/config.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");
218 _numPositiveKey(
schema.addField<int>(
name+
"_npos",
"number of positive pixels",
"count")),
219 _numNegativeKey(
schema.addField<int>(
name+
"_nneg",
"number of negative pixels",
"count"))
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
table::Key< std::string > name
Intermediate base class for algorithms that compute a centroid.
meas::base::FluxResultKey _fluxResultKey
DipoleCentroidControl Control
ResultKey const & getPositiveKeys() const
Return the standard centroid keys registered by this algorithm.
static meas::base::FlagDefinition const FAILURE
meas::base::CentroidResultKey ResultKey
static meas::base::FlagDefinition const POS_FLAG
ResultKey const & getNegativeKeys() const
static meas::base::FlagDefinition const NEG_FLAG
static meas::base::FlagDefinitionList const & getFlagDefinitions()
DipoleCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
meas::base::FlagHandler _flagHandler
Intermediate base class for algorithms that compute a flux.
meas::base::FluxResultKey ResultKey
static meas::base::FlagDefinitionList const & getFlagDefinitions()
DipoleFluxControl Control
A typedef to the Control object for this algorithm, defined above.
ResultKey const & getPositiveKeys() const
Return the standard flux keys registered by this algorithm.
static meas::base::FlagDefinition const POS_FLAG
static meas::base::FlagDefinition const NEG_FLAG
ResultKey const & getNegativeKeys() const
meas::base::FluxResultKey _fluxResultKey
DipoleFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
meas::base::FlagHandler _flagHandler
static meas::base::FlagDefinition const FAILURE
Intermediate base class for algorithms that compute a centroid.
ResultKey const & getPositiveKeys() const
ResultKey const & getNegativeKeys() const
NaiveDipoleCentroid(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
meas::base::CentroidResultKey ResultKey
Tuple type that holds the keys that define a standard centroid algorithm.
NaiveDipoleCentroid(Control const &ctrl, std::string const &name, afw::table::Schema &schema, ResultKey const &positiveKeys, ResultKey const &negativeKeys)
Initialize with a manually-constructed key tuple.
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.
void mergeCentroids(afw::table::SourceRecord &source, double posValue, double negValue) const
void fail(afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error=NULL) const
ResultKey const & getCenterKeys() const
Return the standard centroid keys registered by this algorithm.
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.
DipoleFluxControl Control
void fail(afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error=NULL) const
NaiveDipoleFlux(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
C++ control object for PSF dipole fluxes.
float stepSizeCoord
"Default initial step size for coordinates in non-linear fitter" ;
double errorDef
"How many sigma the error bars of the non-linear fitter represent" ;
float stepSizeFlux
"Default initial step size for flux in non-linear fitter" ;
int maxFnCalls
"Maximum function calls for non-linear fitter; 0 = unlimited" ;
Implementation of Psf dipole flux.
std::pair< double, int > chi2(afw::table::SourceRecord &source, afw::image::Exposure< float > const &exposure, double negCenterX, double negCenterY, double negFlux, double posCenterX, double poCenterY, double posFlux) const
PsfDipoleFluxControl Control
void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
PsfDipoleFlux(PsfDipoleFluxControl const &ctrl, std::string const &name, afw::table::Schema &schema)
void fail(afw::table::SourceRecord &measRecord, meas::base::MeasurementError *error=NULL) const
static CentroidResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc, UncertaintyEnum uncertainty)
static FlagHandler addFields(afw::table::Schema &schema, std::string const &prefix, FlagDefinitionList const &flagDefs, FlagDefinitionList const &exclDefs=FlagDefinitionList::getEmptyList())
static FluxResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)