LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst::meas::base::ShapeResult Struct Reference

A reusable struct for moments-based shape measurements. More...

#include <ShapeUtilities.h>

Inheritance diagram for lsst::meas::base::ShapeResult:
lsst::meas::base::SdssShapeResult

Public Member Functions

 ShapeResult ()
 Constructor; initializes everything to NaN. More...
 
 ShapeResult (ShapeElement _xx, ShapeElement _yy, ShapeElement _xy, ShapeCov const &matrix)
 Constructor; initializes everything from values. More...
 
 ShapeResult (ShapeElement _xx, ShapeElement _yy, ShapeElement _xy, ErrElement _xxSigma, ErrElement _yySigma, ErrElement _xySigma)
 Constructor; initializes everything from values. More...
 
Shape const getShape () const
 Return an afw::geom::ellipses object corresponding to xx, yy, xy. More...
 
afw::geom::ellipses::Quadrupole getQuadrupole ()
 
void setShape (Shape const &shape)
 Set struct elements from the given Quadrupole object. More...
 
ShapeCov const getShapeErr () const
 Return the 3x3 symmetric covariance matrix, with rows and columns ordered (xx, yy, xy) More...
 
void setShapeErr (ShapeCov const &matrix)
 Set the struct uncertainty elements from the given matrix, with rows and columns ordered (xx, yy, xy) More...
 
void setShapeErr (ErrElement _xxSigma, ErrElement _yySigma, ErrElement _xySigma)
 Set the struct uncertainty elements from the given values. More...
 

Public Attributes

ShapeElement xx
 
ShapeElement yy
 
ShapeElement xy
 
ErrElement xxSigma
 1-Sigma uncertainty on xx (sqrt of variance) More...
 
ErrElement yySigma
 1-Sigma uncertainty on yy (sqrt of variance) More...
 
ErrElement xySigma
 1-Sigma uncertainty on xy (sqrt of variance) More...
 
ErrElement xx_yy_Cov
 xx,yy term in the uncertainty convariance matrix More...
 
ErrElement xx_xy_Cov
 xx,xy term in the uncertainty convariance matrix More...
 
ErrElement yy_xy_Cov
 yy,xy term in the uncertainty convariance matrix More...
 

Detailed Description

A reusable struct for moments-based shape measurements.

Shape measurements and their errors should always be in pixels coordinates. This struct should generally be preferred over a custom struct with other ellipse parametrizations unless the measurement takes place in another parametrization and a transformation to this one would result in a loss of information or obfuscate the results of the measurement (i.e. use this one unless you have a good reason not to).

Definition at line 40 of file ShapeUtilities.h.

Constructor & Destructor Documentation

lsst::meas::base::ShapeResult::ShapeResult ( )

Constructor; initializes everything to NaN.

Definition at line 28 of file ShapeUtilities.cc.

28  :
29  xx(std::numeric_limits<ShapeElement>::quiet_NaN()),
30  yy(std::numeric_limits<ShapeElement>::quiet_NaN()),
31  xy(std::numeric_limits<ShapeElement>::quiet_NaN()),
32  xxSigma(std::numeric_limits<ErrElement>::quiet_NaN()),
33  yySigma(std::numeric_limits<ErrElement>::quiet_NaN()),
34  xySigma(std::numeric_limits<ErrElement>::quiet_NaN()),
35  xx_yy_Cov(std::numeric_limits<ErrElement>::quiet_NaN()),
36  xx_xy_Cov(std::numeric_limits<ErrElement>::quiet_NaN()),
37  yy_xy_Cov(std::numeric_limits<ErrElement>::quiet_NaN())
38 {}
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
lsst::meas::base::ShapeResult::ShapeResult ( ShapeElement  _xx,
ShapeElement  _yy,
ShapeElement  _xy,
ShapeCov const &  matrix 
)
inlineexplicit

Constructor; initializes everything from values.

Definition at line 55 of file ShapeUtilities.h.

55  :
56  xx(_xx),
57  yy(_yy),
58  xy(_xy),
59  xxSigma(std::sqrt(matrix(0, 0))),
60  yySigma(std::sqrt(matrix(1, 1))),
61  xySigma(std::sqrt(matrix(2, 2))),
62  xx_yy_Cov(matrix(0, 1)),
63  xx_xy_Cov(matrix(0, 2)),
64  yy_xy_Cov(matrix(1, 2))
65  {}
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
lsst::meas::base::ShapeResult::ShapeResult ( ShapeElement  _xx,
ShapeElement  _yy,
ShapeElement  _xy,
ErrElement  _xxSigma,
ErrElement  _yySigma,
ErrElement  _xySigma 
)
inlineexplicit

Constructor; initializes everything from values.

Definition at line 68 of file ShapeUtilities.h.

69  :
70  xx(_xx),
71  yy(_yy),
72  xy(_xy),
73  xxSigma(_xxSigma),
74  yySigma(_yySigma),
75  xySigma(_xySigma),
76  xx_yy_Cov(0.0),
77  xx_xy_Cov(0.0),
78  yy_xy_Cov(0.0)
79  {}
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)

Member Function Documentation

afw::geom::ellipses::Quadrupole lsst::meas::base::ShapeResult::getQuadrupole ( )
inline

Definition at line 90 of file ShapeUtilities.h.

91  {
92  return afw::geom::ellipses::Quadrupole(xx, yy, xy);
93  }
Shape const lsst::meas::base::ShapeResult::getShape ( ) const

Return an afw::geom::ellipses object corresponding to xx, yy, xy.

This method can be used to return an average radius for the measured shape, e.g. getShape().getDeterminantRadius()

Definition at line 40 of file ShapeUtilities.cc.

40 { return Shape(xx, yy, xy); }
afw::geom::ellipses::Quadrupole Shape
Definition: constants.h:58
ShapeCov const lsst::meas::base::ShapeResult::getShapeErr ( ) const

Return the 3x3 symmetric covariance matrix, with rows and columns ordered (xx, yy, xy)

Definition at line 48 of file ShapeUtilities.cc.

48  {
49  ShapeCov m;
50  m <<
54  return m;
55 }
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
Eigen::Matrix< ErrElement, 3, 3, Eigen::DontAlign > ShapeCov
Definition: constants.h:59
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
tuple m
Definition: lsstimport.py:48
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
void lsst::meas::base::ShapeResult::setShape ( Shape const &  shape)

Set struct elements from the given Quadrupole object.

Definition at line 42 of file ShapeUtilities.cc.

42  {
43  xx = shape.getIxx();
44  yy = shape.getIyy();
45  xy = shape.getIxy();
46 }
void lsst::meas::base::ShapeResult::setShapeErr ( ShapeCov const &  matrix)

Set the struct uncertainty elements from the given matrix, with rows and columns ordered (xx, yy, xy)

Definition at line 57 of file ShapeUtilities.cc.

57  {
58  xxSigma = std::sqrt(matrix(0, 0));
59  yySigma = std::sqrt(matrix(1, 1));
60  xySigma = std::sqrt(matrix(2, 2));
61  xx_yy_Cov = matrix(0, 1);
62  xx_xy_Cov = matrix(0, 2);
63  yy_xy_Cov = matrix(1, 2);
64 }
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)
void lsst::meas::base::ShapeResult::setShapeErr ( ErrElement  _xxSigma,
ErrElement  _yySigma,
ErrElement  _xySigma 
)

Set the struct uncertainty elements from the given values.

Definition at line 66 of file ShapeUtilities.cc.

66  {
67  xxSigma = _xxSigma;
68  yySigma = _yySigma;
69  xySigma = _xySigma;
70  xx_yy_Cov = 0.0;
71  xx_xy_Cov = 0.0;
72  yy_xy_Cov = 0.0;
73 }
ErrElement yy_xy_Cov
yy,xy term in the uncertainty convariance matrix
ErrElement xySigma
1-Sigma uncertainty on xy (sqrt of variance)
ErrElement xx_xy_Cov
xx,xy term in the uncertainty convariance matrix
ErrElement xx_yy_Cov
xx,yy term in the uncertainty convariance matrix
ErrElement yySigma
1-Sigma uncertainty on yy (sqrt of variance)
ErrElement xxSigma
1-Sigma uncertainty on xx (sqrt of variance)

Member Data Documentation

ShapeElement lsst::meas::base::ShapeResult::xx

Definition at line 41 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::xx_xy_Cov

xx,xy term in the uncertainty convariance matrix

Definition at line 48 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::xx_yy_Cov

xx,yy term in the uncertainty convariance matrix

Definition at line 47 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::xxSigma

1-Sigma uncertainty on xx (sqrt of variance)

Definition at line 44 of file ShapeUtilities.h.

ShapeElement lsst::meas::base::ShapeResult::xy

Definition at line 43 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::xySigma

1-Sigma uncertainty on xy (sqrt of variance)

Definition at line 46 of file ShapeUtilities.h.

ShapeElement lsst::meas::base::ShapeResult::yy

Definition at line 42 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::yy_xy_Cov

yy,xy term in the uncertainty convariance matrix

Definition at line 49 of file ShapeUtilities.h.

ErrElement lsst::meas::base::ShapeResult::yySigma

1-Sigma uncertainty on yy (sqrt of variance)

Definition at line 45 of file ShapeUtilities.h.


The documentation for this struct was generated from the following files: