Class SdssShapeAlgorithm¶
Defined in File SdssShape.h
Inheritance Relationships¶
Base Type¶
public lsst::meas::base::SimpleAlgorithm
(Class SimpleAlgorithm)
Class Documentation¶
-
class
SdssShapeAlgorithm
: public lsst::meas::base::SimpleAlgorithm¶ Measure the image moments of source using adaptive Gaussian weights.
This algorithm measures the weighted second moments of an image using a Gaussian weight function, which is iteratively updated to match the current weights. If this iteration does not converge, it can fall back to using unweighted moments, which can be significantly noisier.
See Bernstein & Jarvis, 2002, for more information on this type of algorithm. Note that the code here makes no attempt to correct for the PSF; for PSF corrected ellipticities using weighted moments please use the shapeHSM package.
Public Types
-
typedef SdssShapeControl
Control
¶
-
typedef SdssShapeResult
Result
¶
-
typedef SdssShapeResultKey
ResultKey
¶
Public Functions
-
virtual 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.
-
virtual void
fail
(afw::table::SourceRecord &measRecord, MeasurementError *error = nullptr) 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.
Public Static Functions
-
static FlagDefinitionList const &
getFlagDefinitions
()¶
-
template<typename
ImageT
>
static ResultcomputeAdaptiveMoments
(ImageT const &image, geom::Point2D const &position, bool negative = false, Control const &ctrl = Control())¶ Compute the adaptive Gaussian-weighted moments of an image.
- Parameters
[in] image
: An Image or MaskedImage instance with int, float, or double pixels. This need not be a small postage stamp (the pixel region actually used in the fit will be a subset of this image determined automatically).[in] position
: Center position of the object to be measured, in the image’s PARENT coordinates.[in] negative
: Boolean, specify if the source is in negative instFlux space[in] ctrl
: Control object specifying the details of how the object is to be measured.
-
template<typename
ImageT
>
static FluxResultcomputeFixedMomentsFlux
(ImageT const &image, afw::geom::ellipses::Quadrupole const &shape, geom::Point2D const &position)¶ Compute the instFlux within a fixed Gaussian aperture.
- Parameters
[in] image
: An Image or MaskedImage instance with int, float, or double pixels. This need not be a small postage stamp (the pixel region actually used in the fit will be a subset of this image determined automatically).[in] shape
: Ellipse object specifying the 1-sigma contour of the Gaussian.[in] position
: Center position of the object to be measured, in the image’s PARENT coordinates.
Public Static Attributes
-
unsigned int const
N_FLAGS
= 6¶
-
FlagDefinition const
FAILURE
¶
-
FlagDefinition const
UNWEIGHTED_BAD
¶
-
FlagDefinition const
UNWEIGHTED
¶
-
FlagDefinition const
SHIFT
¶
-
FlagDefinition const
MAXITER
¶
-
FlagDefinition const
PSF_SHAPE_BAD
¶
-
typedef SdssShapeControl