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

Talk on conic section fitting

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.2.tar.gz (12.9 MB view details)

Uploaded Source

Built Distribution

confitti-0.1.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for confitti-0.1.2.tar.gz
Algorithm Hash digest
SHA256 03d272937d16dbfc99c86002719ec3f38f5d7840f2ad82e1c405781c5d53c951
MD5 c058f9c09aafe6c94e7b6065b768c450
BLAKE2b-256 f860352f83f2fecd5a1a988876b76eec8016fb3d830295759bd5be7f32513667

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for confitti-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d73f527c39446bccf5c0908aa588f31df896c6f1c49c08d63dc8fe76bd36ba7
MD5 d6af8c8a2e66a69e36c129eb2f7aa6d3
BLAKE2b-256 ae18467c4f23c78c1dee62ac3bbd7785dc307fe7ba6c638c62bb4a59a3eda5a8

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