Metadata-Version: 2.1
Name: ellipsinator
Version: 0.3.0
Summary: Ellipse tools for Python
Author-email: Nicholas McKibben <nicholas.bgp@gmail.com>
Maintainer-email: Nicholas McKibben <nicholas.bgp@gmail.com>
License: Copyright (c) 2023 Nicholas McKibben
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/mckib2/ellipsinator
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy >=1.26.1

Ellipsinator
============

Tools for working with ellipses in Python.

Installation
============

Should be an easy pip install:

.. code-block:: bash

    pip install ellipsinator


Usage
=====

To fit an ellipse:

.. code-block:: python

    from ellipsinator import fit_ellipse_halir
    c = fit_ellipse_halir(x, y)

    from ellipsinator import fit_ellipse_fitzgibon
    c = fit_ellipse_fitzgibon(x, y)

    from ellipsinator import fast_guaranteed_ellipse_estimate
    c = fast_guaranteed_ellipse_estimate(x, y)

You can also pass in the measured points as a complex number,
`x + 1j*y`:

.. code-block:: python

    from ellipsinator import fit_ellipse_halir
    c = fit_ellipse_halir(x)

Fitting multiple ellipses simultaneously is also possible
with `fit_ellipse_halir` and `fast_guaranteed_ellipse_estimate`:

.. code-block:: python

    assert x.shape == (num_ellipses, num_pts)
    assert y.shape == (num_ellipses, num_pts)
    c1 = fit_ellipse_halir(x, y)
    c2 = fast_guaranteed_ellipse_estimate(x, y)
    assert c1.shape == (num_ellipses, 6)
    assert c2.shape == (num_ellipses, 6)
