File DipoleAlgorithms.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace ip
namespace diffim
class DipoleCentroidAlgorithm : public lsst::meas::base::SimpleAlgorithm
#include <DipoleAlgorithms.h>

Intermediate base class for algorithms that compute a centroid.

Subclassed by lsst::ip::diffim::NaiveDipoleCentroid

Public Types

typedef DipoleCentroidControl Control
typedef meas::base::CentroidResultKey ResultKey

Public Functions

DipoleCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
ResultKey const &getPositiveKeys() const

Return the standard centroid keys registered by this algorithm.

ResultKey const &getNegativeKeys() const

Public Static Functions

static meas::base::FlagDefinitionList const &getFlagDefinitions()

Public Static Attributes

meas::base::FlagDefinition const FAILURE
meas::base::FlagDefinition const POS_FLAG
meas::base::FlagDefinition const NEG_FLAG

Protected Functions

DipoleCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc, ResultKey const &positiveKeys, ResultKey const &negativeKeys)

Initialize with a manually-constructed key tuple.

Protected Attributes

Control _ctrl
meas::base::FluxResultKey _fluxResultKey
meas::base::FlagHandler _flagHandler
ResultKey _centerKeys
ResultKey _positiveKeys
ResultKey _negativeKeys
class DipoleCentroidControl

Public Functions

DipoleCentroidControl()
class DipoleFluxAlgorithm : public lsst::meas::base::SimpleAlgorithm
#include <DipoleAlgorithms.h>

Intermediate base class for algorithms that compute a flux.

Subclassed by lsst::ip::diffim::NaiveDipoleFlux, lsst::ip::diffim::PsfDipoleFlux

Public Types

typedef DipoleFluxControl Control

A typedef to the Control object for this algorithm, defined above. The control object contains the configuration parameters for this algorithm.

typedef meas::base::FluxResultKey ResultKey

Public Functions

DipoleFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc)
ResultKey const &getPositiveKeys() const

Return the standard flux keys registered by this algorithm.

ResultKey const &getNegativeKeys() const

Public Static Functions

static meas::base::FlagDefinitionList const &getFlagDefinitions()

Public Static Attributes

meas::base::FlagDefinition const FAILURE
meas::base::FlagDefinition const POS_FLAG
meas::base::FlagDefinition const NEG_FLAG

Protected Functions

DipoleFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &doc, ResultKey const &positiveKeys, ResultKey const &negativeKeys)

Initialize with a manually-constructed result key.

Protected Attributes

Control _ctrl
meas::base::FluxResultKey _fluxResultKey
meas::base::FlagHandler _flagHandler
ResultKey _positiveKeys
ResultKey _negativeKeys
class DipoleFluxControl

Subclassed by lsst::ip::diffim::PsfDipoleFluxControl

Public Functions

DipoleFluxControl()
class NaiveDipoleCentroid : public lsst::ip::diffim::DipoleCentroidAlgorithm
#include <DipoleAlgorithms.h>

Intermediate base class for algorithms that compute a centroid.

Public Types

typedef meas::base::CentroidResultKey ResultKey

Tuple type that holds the keys that define a standard centroid algorithm.

Algorithms are encouraged to add additional flags as appropriate, but these are required.

Public Functions

NaiveDipoleCentroid(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
ResultKey const &getCenterKeys() const

Return the standard centroid keys registered by this algorithm.

ResultKey const &getPositiveKeys() const
ResultKey const &getNegativeKeys() const
void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure<float> const &exposure) const

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.

void mergeCentroids(afw::table::SourceRecord &source, double posValue, double negValue) const
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.

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.

Protected Functions

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.

Private Members

Control _ctrl
meas::base::FluxResultKey _fluxResultKey
meas::base::FlagHandler _flagHandler
class NaiveDipoleFlux : public lsst::ip::diffim::DipoleFluxAlgorithm

Public Types

typedef DipoleFluxControl Control

Public Functions

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

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.

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.

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.

Private Members

Control _ctrl
afw::table::Key<int> _numPositiveKey
afw::table::Key<int> _numNegativeKey
class PsfDipoleFlux : public lsst::ip::diffim::DipoleFluxAlgorithm
#include <DipoleAlgorithms.h>

Implementation of Psf dipole flux

Public Types

typedef PsfDipoleFluxControl Control

Public Functions

PsfDipoleFlux(PsfDipoleFluxControl const &ctrl, std::string const &name, afw::table::Schema &schema)
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
void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure<float> const &exposure) const

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.

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.

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.

Private Members

Control _ctrl
afw::table::Key<float> _chi2dofKey
meas::base::CentroidResultKey _avgCentroid
meas::base::CentroidResultKey _negCentroid
meas::base::CentroidResultKey _posCentroid
class PsfDipoleFluxControl : public lsst::ip::diffim::DipoleFluxControl
#include <DipoleAlgorithms.h>

C++ control object for PSF dipole fluxes.

Public Functions

lsst::ip::diffim::PsfDipoleFluxControl::LSST_CONTROL_FIELD(stepSizeCoord, float, "Default initial step size for coordinates in non-linear fitter")
lsst::ip::diffim::PsfDipoleFluxControl::LSST_CONTROL_FIELD(stepSizeFlux, float, "Default initial step size for flux in non-linear fitter")
lsst::ip::diffim::PsfDipoleFluxControl::LSST_CONTROL_FIELD(errorDef, double, "How many sigma the error bars of the non-linear fitter represent")
LSST_CONTROL_FIELD(maxFnCalls, int)
PsfDipoleFluxControl()