Skip to main content

🎊 Confitti 🎊 - for Conics Fitting

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

See the presentation

What's new

  • 2026-03-13: Version 0.2.4 released. Updated build process to uv and added grant acknowledgements
  • For more details, see the full change log.

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). This also shows how to save the best-fit parameters to a file.
  • demo04-other-proplyd.ipynb is a second example application to a different bow shock, which turns out very differently because the best-fit arc is an ellipse, rather than a hyperbola
  • demo05-quadrants.ipynb tests that the code can handle axis orientations in all four quadrants and close to the wrap angle of 360 degrees
  • demo06-read-save-files.ipynb demonstrates how to read in the multiple saved files from previous fits.

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.

Funding

We gratefully acknowledge financial support provided by Dirección General de Asuntos del Personal Académico, Universidad Nacional Autónoma de México, through grant IN109823 of the ‘Programa de Apoyo a Proyectos de Investigación e Inovación Tecnológica’.

Metadata

Release files for confitti 0.2.5

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

Source distribution (sdist)

Source distribution for confitti 0.2.5
File Size Uploaded
confitti-0.2.5.tar.gz 4.9 kB Details

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / confitti-0.2.5.tar.gz

Download URL confitti-0.2.5.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3a2699697338f5370e55f7ddfa0370de4ef5620704d422c1dec5c507963b73c1
BLAKE2b-256 checksum
How to use checksums
f1a2f4d63f18b45cf70d41dbdaeabd458b041f94ca02d37a81bc3ea4b7a6cad5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / confitti-0.2.5-py3-none-any.whl

Download URL confitti-0.2.5-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ff742dbb7663fcfc39bccc5a6228a61c1e462e5a5dc55921cdf669a04a19b1a
BLAKE2b-256 checksum
How to use checksums
cca04c77b37588cc00d8079413c3735398a8ac73b01daf6f98cc7986b7d42d7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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