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::CentroidResult Struct Reference

A reusable struct for centroid measurements. More...

#include <CentroidUtilities.h>

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

Public Member Functions

 CentroidResult ()
 Constructor; initializes everything to NaN. More...
 
 CentroidResult (CentroidElement _x, CentroidElement _y, CentroidCov const &matrix)
 Constructor; initializes everything from values. More...
 
 CentroidResult (CentroidElement _x, CentroidElement _y, ErrElement _xSigma, ErrElement _ySigma)
 Constructor; initializes everything from values. More...
 
Centroid const getCentroid () const
 Return a Point object containing the measured x and y. More...
 
void setCentroid (Centroid const &centroid)
 Set the struct fields from the given Point object. More...
 
afw::geom::Point< CentroidElementgetPoint ()
 Return the 2D point type corresponding to this result. More...
 
CentroidCov const getCentroidErr () const
 Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y) More...
 
void setCentroidErr (CentroidCov const &matrix)
 Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x, y) More...
 
void setCentroidErr (ErrElement _xSigma, ErrElement _ySigma)
 Set the struct uncertainty fields from the sigma values. More...
 

Public Attributes

CentroidElement x
 x (column) coordinate of the measured position More...
 
CentroidElement y
 y (row) coordinate of the measured position More...
 
ErrElement xSigma
 1-Sigma uncertainty on x (sqrt of variance) More...
 
ErrElement ySigma
 1-Sigma uncertainty on y (sqrt of variance) More...
 
ErrElement x_y_Cov
 x,y term in the uncertainty convariance matrix More...
 

Detailed Description

A reusable struct for centroid measurements.

Definition at line 36 of file CentroidUtilities.h.

Constructor & Destructor Documentation

lsst::meas::base::CentroidResult::CentroidResult ( )

Constructor; initializes everything to NaN.

Definition at line 28 of file CentroidUtilities.cc.

28  :
29  x(std::numeric_limits<CentroidElement>::quiet_NaN()),
30  y(std::numeric_limits<CentroidElement>::quiet_NaN()),
31  xSigma(std::numeric_limits<ErrElement>::quiet_NaN()),
32  ySigma(std::numeric_limits<ErrElement>::quiet_NaN()),
33  x_y_Cov(std::numeric_limits<ErrElement>::quiet_NaN())
34 {}
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
CentroidElement x
x (column) coordinate of the measured position
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
CentroidElement y
y (row) coordinate of the measured position
lsst::meas::base::CentroidResult::CentroidResult ( CentroidElement  _x,
CentroidElement  _y,
CentroidCov const &  matrix 
)
inlineexplicit

Constructor; initializes everything from values.

Definition at line 47 of file CentroidUtilities.h.

47  :
48  x(_x),
49  y(_y),
50  xSigma(std::sqrt(matrix(0, 0))),
51  ySigma(std::sqrt(matrix(1, 1))),
52  x_y_Cov(matrix(0,1))
53  {}
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
CentroidElement x
x (column) coordinate of the measured position
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
CentroidElement y
y (row) coordinate of the measured position
lsst::meas::base::CentroidResult::CentroidResult ( CentroidElement  _x,
CentroidElement  _y,
ErrElement  _xSigma,
ErrElement  _ySigma 
)
inlineexplicit

Constructor; initializes everything from values.

Definition at line 56 of file CentroidUtilities.h.

57  :
58  x(_x),
59  y(_y),
60  xSigma(_xSigma),
61  ySigma(_ySigma),
62  x_y_Cov(0.0)
63  {}
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
CentroidElement x
x (column) coordinate of the measured position
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
CentroidElement y
y (row) coordinate of the measured position

Member Function Documentation

Centroid const lsst::meas::base::CentroidResult::getCentroid ( ) const

Return a Point object containing the measured x and y.

Definition at line 36 of file CentroidUtilities.cc.

36 { return Centroid(x, y); }
CentroidElement x
x (column) coordinate of the measured position
CentroidElement y
y (row) coordinate of the measured position
afw::geom::Point< CentroidElement, 2 > Centroid
Definition: constants.h:56
CentroidCov const lsst::meas::base::CentroidResult::getCentroidErr ( ) const

Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)

Definition at line 43 of file CentroidUtilities.cc.

43  {
44  CentroidCov m;
45  m <<
48  return m;
49 }
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
tuple m
Definition: lsstimport.py:48
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
Definition: constants.h:57
afw::geom::Point<CentroidElement> lsst::meas::base::CentroidResult::getPoint ( )
inline

Return the 2D point type corresponding to this result.

Definition at line 72 of file CentroidUtilities.h.

73  {
74  return afw::geom::Point<CentroidElement>(x, y);
75  }
CentroidElement x
x (column) coordinate of the measured position
CentroidElement y
y (row) coordinate of the measured position
void lsst::meas::base::CentroidResult::setCentroid ( Centroid const &  centroid)

Set the struct fields from the given Point object.

Definition at line 38 of file CentroidUtilities.cc.

38  {
39  x = centroid.getX();
40  y = centroid.getY();
41 }
CentroidElement x
x (column) coordinate of the measured position
CentroidElement y
y (row) coordinate of the measured position
void lsst::meas::base::CentroidResult::setCentroidErr ( CentroidCov const &  matrix)

Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x, y)

Definition at line 51 of file CentroidUtilities.cc.

51  {
52  xSigma = std::sqrt(matrix(0, 0));
53  ySigma = std::sqrt(matrix(1, 1));
54  x_y_Cov = matrix(0, 1);
55 }
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
void lsst::meas::base::CentroidResult::setCentroidErr ( ErrElement  _xSigma,
ErrElement  _ySigma 
)

Set the struct uncertainty fields from the sigma values.

Definition at line 57 of file CentroidUtilities.cc.

57  {
58  xSigma = _xSigma;
59  ySigma = _ySigma;
60  x_y_Cov = 0.0;
61 }
ErrElement ySigma
1-Sigma uncertainty on y (sqrt of variance)
ErrElement xSigma
1-Sigma uncertainty on x (sqrt of variance)
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix

Member Data Documentation

CentroidElement lsst::meas::base::CentroidResult::x

x (column) coordinate of the measured position

Definition at line 37 of file CentroidUtilities.h.

ErrElement lsst::meas::base::CentroidResult::x_y_Cov

x,y term in the uncertainty convariance matrix

Definition at line 41 of file CentroidUtilities.h.

ErrElement lsst::meas::base::CentroidResult::xSigma

1-Sigma uncertainty on x (sqrt of variance)

Definition at line 39 of file CentroidUtilities.h.

CentroidElement lsst::meas::base::CentroidResult::y

y (row) coordinate of the measured position

Definition at line 38 of file CentroidUtilities.h.

ErrElement lsst::meas::base::CentroidResult::ySigma

1-Sigma uncertainty on y (sqrt of variance)

Definition at line 40 of file CentroidUtilities.h.


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