Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

fitting2d

a library for performing two-dimensional curve-fitting.

Install

pip install . # within this repository

Presumably, it can be also installed from PyPI:

pip install fitting2d

Usage

For more detailed documentation, visit our documentation page.

Classes

Currently, it has only two types of fitting procedures as classes:

  • Ellipse
  • Circle
  • Parabola

Both classes are built as namedtuples.

You can also extend the library by adding the FittingMixin mix-in class to your shape class (built as a namedtuple).

Performing fitting

To perform the fitting procedure, run e.g.

# xp and yp consisting of x- and y- coordinates as arrays
model = Ellipse.fit(xp, yp)

Drawing the fitted shapes

Both classes have the draw method making use the parameter-based representation:

# t being the coordinate parameter
xp, yp = model.draw(t)

The nature of the parameter t above depends on the fitted shape. Some tips are in the docstring for the draw method.

License

Copyright (c) 2020 Keisuke Sehara, the MIT License

Metadata

Release files for fitting2d 1.0.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fitting2d 1.0.0a5
File Size Uploaded
fitting2d-1.0.0a5.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fitting2d 1.0.0a5
File Interpreter ABI Platform
fitting2d-1.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / fitting2d-1.0.0a5.tar.gz

Download URL fitting2d-1.0.0a5.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
134a78e1004ad4badc6691bb377959d0026b6e78b50f9857f23ff65421f21ac9
BLAKE2b-256 checksum
How to use checksums
84dc75f3848e39c5031a16bd846613105646ed1bc2615718bda631a0db64c62d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / fitting2d-1.0.0a5-py3-none-any.whl

Download URL fitting2d-1.0.0a5-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bad8a92b46b7ac249cbd89270464e4b61e0702b60660bc615d2e3741ca369fd2
BLAKE2b-256 checksum
How to use checksums
ba76177ad504edd227c88df2168a452301d73a78095c948aee7424184102cd03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page