getMinVolEllipse

radio_beam.commonbeam.getMinVolEllipse(P, tolerance=1e-05, maxiter=100000.0)[source]

Use the Khachiyan Algorithm to compute that minimum volume ellipsoid.

For the purposes of finding a common beam, there is an added check that requires the center to be within the tolerance range.

Adapted code from: https://github.com/minillinim/ellipsoid/blob/master/ellipsoid.py

That implementation relies on the original work by Nima Moshtagh: http://www.mathworks.com/matlabcentral/fileexchange/9542 and an alternate python version from: http://cctbx.sourceforge.net/current/python/scitbx.math.minimum_covering_ellipsoid.html

Parameters:
Pndarray

Points to compute solution.

tolerancefloat, optional

Allowed error range in the Khachiyan Algorithm. Decreasing the tolerance by an order of magnitude requires an order of magnitude more iterations to converge.

maxiterint, optional

Maximum iterations.

Returns:
centerndarray

Center point of the ellipse. Is required to be smaller than the tolerance.

radiindarray

Radii of the ellipse.

rotationndarray

Rotation matrix of the ellipse.