Skip to main content

Fit conic sections (ellipse, parabola, hyperbola) to a set of 2d points

Project description

🎊 Confitti 🎊 - for Conics Fitting

Fit conic sections (ellipse, parabola, hyperbola) to a set of points

See the presentation

Installation

pip install confitti

or

uv pip install confitti

will install the package plus the required dependencies (numpy, scipy, lmfit).

Optional dependencies, which are used in the example notebooks, may be pip-installed separately:

  • emcee for MCMC sampling
  • matplotlib, seaborn, and corner for plotting
  • astropy and regions for dealing with celestial coordinates

Usage

See the example jupyter notebooks in the notebooks directory. For example,

  • demo01-basic.ipynb demonstrates basic usage: finding the best-fit parabola (or general conic) to a set of (x, y) points
  • demo02-emcee.ipynb explores uncertainty in the parameters of the best-fit curve by means of mcmc
  • demo03-proplyd.ipynb is an example application to real astronomical data (HST image of a bow shock in the Orion Nebula)

Prior art

This is the successor project to circle-fit

Some of the literature on the topic of fitting conic sections to points is described here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

confitti-0.1.4.tar.gz (13.0 MB view details)

Uploaded Source

Built Distribution

confitti-0.1.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file confitti-0.1.4.tar.gz.

File metadata

  • Download URL: confitti-0.1.4.tar.gz
  • Upload date:
  • Size: 13.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for confitti-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8c2563c16abb9c6f2af84cc871a398f21aee8cd3175f4462bb12beb698649240
MD5 26ca9aa77b53569a84f51369c835db68
BLAKE2b-256 f9aabca7bf0b709d7f9b05923e23021d16343f7449bdfb2bf76ceef1e71d2b6c

See more details on using hashes here.

File details

Details for the file confitti-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: confitti-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for confitti-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7df01697514fe8acb34a36addaeafe46fd07c031116988945814a13f11213648
MD5 7dd17b38185bee7138bccc288f26fa5f
BLAKE2b-256 c251c3b61513c92e1c92ba61dcf3816b00b651cfe4e977cb98cfd0807511ae08

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page