|
lsst.meas.algorithms g1d3acf762d+df4e4cf2ad
|
A struct that computes the unweighted moments of the pixels in an lsst.afw.geom.SpanSet.
More...
#include <SpanSetMoments.h>
Public Member Functions | |
| bool | any_flags_set () const |
| Test whether any failure flag is set. | |
| ndarray::Array< float, 1, 1 > | get_x_array () const |
Return a flattened array of the x coordinates in spans. | |
| ndarray::Array< float, 1, 1 > | get_y_array () const |
Return a flattened array of the y coordinates in spans. | |
Static Public Member Functions | |
| static std::shared_ptr< SpanSetMoments > | compute (afw::geom::SpanSet const &spans, afw::image::MaskedImage< float > const &masked_image, afw::image::MaskPixel bad_bitmask, double bad_pixel_max_fraction, double bad_pixel_exclusion_radius) |
| Compute the unweighted moments of an image within a SpanSet. | |
| static shapelet::ShapeletFunction | fit_shapelets (afw::image::MaskedImage< float > const &masked_image, std::vector< std::shared_ptr< SpanSetMoments > > const &moments, int order, double scale) |
| Fit a common shapelet expansion to multiple sources whose moments have already been computed. | |
Public Attributes | |
| double | flux |
| Total flux within the SpanSet. | |
| double | variance |
| Total variance within the SpanSet. | |
| geom::Point2D | center |
| Center derived from the unweighted first moment of the image. | |
| afw::geom::ellipses::Quadrupole | shape |
| Shape derived from the unweighted second moment of the image. | |
| std::shared_ptr< afw::geom::SpanSet > | spans |
| The pixels actually used to compute the moments. | |
| bool | too_many_bad_pixels = false |
| Flag set if there were too many bad pixels to compute the moments. | |
| bool | center_out_of_bounds = false |
| Flag set if the center did not lie within the SpanSet. | |
| bool | bad_pixel_in_center = false |
| Flag set if there was a bad pixel too close to the center. | |
| bool | singular_second_moments = false |
| Flag set if the second moments did not resolve to an ellipse. | |
A struct that computes the unweighted moments of the pixels in an lsst.afw.geom.SpanSet.
This class provides low-level pixel-processing code for ComputeRoughPsfShapeletsTask.
Definition at line 45 of file SpanSetMoments.h.
|
inline |
Test whether any failure flag is set.
Definition at line 75 of file SpanSetMoments.h.
|
static |
Compute the unweighted moments of an image within a SpanSet.
| [in] | spans | Pixel region to use. |
| [in] | masked_image | Image to measure. |
| [in] | bad_bitmask | Mask of bad pixels to remove from spans before computing the moments. |
| [in] | bad_pixel_mask_fraction | Maximum fraction of the pixels in spans that can be bad before giving up. |
| [in] | bad_pixel_exlusion_radius | Radius around the estimated center where the present of a bad pixels will cause the algorithm to give up. |
Definition at line 51 of file SpanSetMoments.cc.
|
static |
Fit a common shapelet expansion to multiple sources whose moments have already been computed.
The expected use case is a sample of stars with similar but not identical moments, which might plausibly have an approximately common shapelet representation while benefitting from allowing the ellipse used for the expansion to vary (i.e. to partially capture spatial variation in the PSF).
| [in] | masked_image | Image to measure. |
| [in] | moments | Moments already measured on stars. |
| [in] | order | Order of the shapelet expansion. |
| [in] | scale | Factor to scale the moments ellipses by to yield the ellipse for the shapelet fit. |
Definition at line 126 of file SpanSetMoments.cc.
| ndarray::Array< float, 1, 1 > lsst::meas::algorithms::SpanSetMoments::get_x_array | ( | ) | const |
Return a flattened array of the x coordinates in spans.
Definition at line 37 of file SpanSetMoments.cc.
| ndarray::Array< float, 1, 1 > lsst::meas::algorithms::SpanSetMoments::get_y_array | ( | ) | const |
Return a flattened array of the y coordinates in spans.
Definition at line 44 of file SpanSetMoments.cc.
| bool lsst::meas::algorithms::SpanSetMoments::bad_pixel_in_center = false |
Flag set if there was a bad pixel too close to the center.
Definition at line 69 of file SpanSetMoments.h.
| geom::Point2D lsst::meas::algorithms::SpanSetMoments::center |
Center derived from the unweighted first moment of the image.
Definition at line 54 of file SpanSetMoments.h.
| bool lsst::meas::algorithms::SpanSetMoments::center_out_of_bounds = false |
Flag set if the center did not lie within the SpanSet.
Definition at line 66 of file SpanSetMoments.h.
| double lsst::meas::algorithms::SpanSetMoments::flux |
Total flux within the SpanSet.
Definition at line 48 of file SpanSetMoments.h.
| afw::geom::ellipses::Quadrupole lsst::meas::algorithms::SpanSetMoments::shape |
Shape derived from the unweighted second moment of the image.
Definition at line 57 of file SpanSetMoments.h.
| bool lsst::meas::algorithms::SpanSetMoments::singular_second_moments = false |
Flag set if the second moments did not resolve to an ellipse.
Definition at line 72 of file SpanSetMoments.h.
| std::shared_ptr<afw::geom::SpanSet> lsst::meas::algorithms::SpanSetMoments::spans |
The pixels actually used to compute the moments.
Definition at line 60 of file SpanSetMoments.h.
| bool lsst::meas::algorithms::SpanSetMoments::too_many_bad_pixels = false |
Flag set if there were too many bad pixels to compute the moments.
Definition at line 63 of file SpanSetMoments.h.
| double lsst::meas::algorithms::SpanSetMoments::variance |
Total variance within the SpanSet.
Definition at line 51 of file SpanSetMoments.h.