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

This is the successor project to circle-fit

Installation

pip install confitti

or

uv 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 or uv-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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: confitti-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f67a1ffe7ef1c482a681e10bc9e2472867b015dee8a319641abf13f572188a15
MD5 1fb8a7f78b754cdbbcf6dba1e174e28e
BLAKE2b-256 7f7790df859764dbd6986871774a8e491ba8499f51e368af40ff52f05ad241c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: confitti-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 527902dd48661b1276151188b31b82ccba7784a506b3e015db9178234b17d5ad
MD5 116163c96f82210de8b189162049656e
BLAKE2b-256 e1e9e41239acb7a9fe6f82c4e222a743d000888d0479523b810352e2ebd936d3

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