pyrot.eye_modelling.ellipsoid_fit ================================= .. py:module:: pyrot.eye_modelling.ellipsoid_fit Attributes ---------- .. autoapisummary:: pyrot.eye_modelling.ellipsoid_fit.logger Functions --------- .. autoapisummary:: pyrot.eye_modelling.ellipsoid_fit.ellipsoid_fit Module Contents --------------- .. py:data:: logger .. py:function:: ellipsoid_fit(markers_in_eye: list[list[float]], eye_shape: str) -> tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, float] Fit an ellipsoid/sphere/paraboloid/hyperboloid to a set of xyz data points. Parameters ---------- markers_in_eye : list of [x, y, z] Cartesian data, list of three n x 1 vectors. eye_shape : str Shape to fit: - 'sphere' fits a sphere - 'ellipsoid' fits an ellipsoid with its axes aligned along [x, y, z] axes - 'EYEPLAN' fits an ellipsoid with x- and z- radii equal Returns ------- center : ndarray Ellipsoid or other conic center coordinates [xc, yc, zc]. radii : ndarray Ellipsoid or other conic radii [a, b, c]. evecs : ndarray The radii directions as columns of the 3x3 matrix. Raises ------ NotImplementedError If an unsupported eye shape is provided. Notes ----- It does not find exactly the best fitting ellipse (see van Vught et al.).