a library for performing two-dimensional curve-fitting
Project description
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 namedtuple
s.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fitting2d-1.0.0a5.tar.gz
.
File metadata
- Download URL: fitting2d-1.0.0a5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 134a78e1004ad4badc6691bb377959d0026b6e78b50f9857f23ff65421f21ac9 |
|
MD5 | 851aa9ee2edd4cdd05ead4f647ad27a2 |
|
BLAKE2b-256 | 84dc75f3848e39c5031a16bd846613105646ed1bc2615718bda631a0db64c62d |
File details
Details for the file fitting2d-1.0.0a5-py3-none-any.whl
.
File metadata
- Download URL: fitting2d-1.0.0a5-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bad8a92b46b7ac249cbd89270464e4b61e0702b60660bc615d2e3741ca369fd2 |
|
MD5 | 3b1aec84a406c915264b2c143612765e |
|
BLAKE2b-256 | ba76177ad504edd227c88df2168a452301d73a78095c948aee7424184102cd03 |