Package Localiser.algorithms.locErrors
Class ErrorEllipse
java.lang.Object
Localiser.algorithms.locErrors.ErrorEllipse
Class for calculating errors from localisation data. An error ellipse
describes N dimensional error based on a scatter of points or chi2 surface.
The dimensions and rotation of the ellipse describe the distribution of
error. Note that although an ellipse will often be a satisfactory description
of an error surface, in some cases it will not adequately represent errors.
e.g. a linear array produces a doughnut shaped error surface which would not
be described well by an ellipse.
- Author:
- Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptionA 2D projection of the ellipsoid in the XY plane.A 2D projection of the ellipsoid in the ZX plane.A 2D projection of the ellipsoid in the ZY plane.static final int
Slice through the ellipse in the XY planestatic final int
Project the ellipse ontpo the XY plane- the extremities of the ellipse are keptstatic final int
Slice through the ellipse in the ZX planestatic final int
Project the ellipse ontpo the ZX plane- the extremities of the ellipse are keptstatic final int
Slice through the ellipse in the ZY planestatic final int
Project the ellipse ontpo the Yz plane- the extremities of the ellipse are kept -
Method Summary
Modifier and TypeMethodDescriptionvoid
calcErrorEllipse
(double[][] points) Calculate the error for a set of points.double[]
The euler angles.,double
Get the chi^2 value.double[]
double[]
getErrorEllipse2D
(int planeType) FIXME - this needs work to make sure roll works Get the ellipse projected onto a 3D plane.double
getErrorMagnitude
(double[] unitVec) Get the magnitude of the error in a particular direction.double[][]
getIntersection
(double[] intersectionVector) Get the intersection point on the surface of the ellipsoid for a vectorboolean
is3D()
Convenient check to see if a 2D or 3D ellipse.void
printMatrix
(org.apache.commons.math3.linear.RealMatrix m) void
setChisquare_val
(double chisquare_val) Set the chi^2 value.
-
Field Details
-
PLANE_XY
public static final int PLANE_XYSlice through the ellipse in the XY plane- See Also:
-
PLANE_ZY
public static final int PLANE_ZYSlice through the ellipse in the ZY plane- See Also:
-
PLANE_ZX
public static final int PLANE_ZXSlice through the ellipse in the ZX plane- See Also:
-
PLANE_XY_PROJ
public static final int PLANE_XY_PROJProject the ellipse ontpo the XY plane- the extremities of the ellipse are kept- See Also:
-
PLANE_ZY_PROJ
public static final int PLANE_ZY_PROJProject the ellipse ontpo the Yz plane- the extremities of the ellipse are kept- See Also:
-
PLANE_ZX_PROJ
public static final int PLANE_ZX_PROJProject the ellipse ontpo the ZX plane- the extremities of the ellipse are kept- See Also:
-
errorEllipseXY
A 2D projection of the ellipsoid in the XY plane. Only usaed if this is a 3D ellipse (ellipsoid). -
errorEllipseZY
A 2D projection of the ellipsoid in the ZY plane. Only usaed if this is a 3D ellipse (ellipsoid). -
errorEllipseZX
A 2D projection of the ellipsoid in the ZX plane. Only usaed if this is a 3D ellipse (ellipsoid).
-
-
Method Details
-
calcErrorEllipse
public void calcErrorEllipse(double[][] points) Calculate the error for a set of points.- Parameters:
points
-
-
getErrorMagnitude
public double getErrorMagnitude(double[] unitVec) Get the magnitude of the error in a particular direction.- Parameters:
unitVec
- - a unit vector (Note: must be a UNIT vector)- Returns:
- the magnitude of the error in the direction of the unit vector.
-
getIntersection
public double[][] getIntersection(double[] intersectionVector) Get the intersection point on the surface of the ellipsoid for a vector- Parameters:
intersectionVector
- - the intersection vector.- Returns:
- the point of intersection.
-
getErrorEllipse2D
public double[] getErrorEllipse2D(int planeType) FIXME - this needs work to make sure roll works Get the ellipse projected onto a 3D plane.- Returns:
- an array. array [0] is the first radii. array[1] is the second radii. array[2] is the rotation relative to the plane in RADIANS.
-
getEllipseDim
public double[] getEllipseDim()- Returns:
-
getAngles
public double[] getAngles()The euler angles.,- Returns:
-
printMatrix
public void printMatrix(org.apache.commons.math3.linear.RealMatrix m) -
is3D
public boolean is3D()Convenient check to see if a 2D or 3D ellipse.- Returns:
- true if a 3D error ellipse. False if a 2D ellipse.
-
getChisquare_val
public double getChisquare_val()Get the chi^2 value. This is used to determine how the error ellipse samples the distribution. e.g. a value of 2.4477 means the ellipse represents the 95% confidence interval whilst a value of 1 will mean the ellipse represents the standard deviation.- Returns:
- chisquare_val - the chi^2 value current used.
-
setChisquare_val
public void setChisquare_val(double chisquare_val) Set the chi^2 value. This is used to determine how the error ellipse samples the distribution. e.g. a value of 2.4477 means the ellipse represents the 95% confidence interval whilst a value of 1 will mean the ellipse represents the standard deviation.- Parameters:
chisquare_val
- - the chi^2 value to set.
-