Skip to main content

fitwise

One call. One fit. One report you can trust.

Tests PyPI License: BSD-3-Clause

Status: alpha (0.1). Fitting, built-in models, report, plot and export work and are tested against the NIST reference data. The API may still change before 1.0. Documentation: https://maroba.github.io/fitwise/

fitwise is an ergonomic layer over lmfit and scipy for curve fitting in the lab. It brings no new solver of its own. Instead it makes the existing ones fast to use and hard to misuse:

import fitwise as fw

result = fw.fit(fw.models.gaussian, x, y, yerr=dy)
print(result)              # report: parameters ± errors, χ²/ndf, R², correlations, warnings
result.plot()              # data, fit, confidence band, residuals
result.params["sigma"]     # value, uncertainty, unit

What it does for you

  • Picks the solver: direct linear least squares when the model is linear in its parameters, Levenberg–Marquardt otherwise, and orthogonal distance regression when xerr is given.
  • Finds starting values, including for your own functions, and shows how it found them.
  • Gives honest uncertainties: a documented covariance convention, confidence and prediction bands, and bootstrap or profile likelihood on request.
  • Warns instead of returning wrong numbers: non-convergence, parameters at a bound, poor χ²/ndf and strong correlations all show up in the report.
  • Makes fits reproducible: result.to_dict() captures everything needed to repeat the fit.

Installation

pip install fitwise            # core: numpy, scipy, lmfit
pip install "fitwise[all]"     # + plotting, ODR, units, symbolic models, batch fits

Development

uv sync --all-extras           # create .venv with all extras and dev tools
uv run pre-commit install
uv run pytest                  # fast tests
uv run pytest -m nist          # NIST StRD reference suite

License

BSD-3-Clause

Metadata

Release files for fitwise 0.1.1

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

Source distribution (sdist)

Source distribution for fitwise 0.1.1
File Size Uploaded Provenance
fitwise-0.1.1.tar.gz 70.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 108.7 kB

Release files / fitwise-0.1.1.tar.gz

Download URL fitwise-0.1.1.tar.gz
Size 70.6 kB
Tags Source
SHA-256 checksum
How to use checksums
35bf7846cbb7d2b9140fb8210979b626d2056641911036955a5c98276120ea7d
BLAKE2b-256 checksum
How to use checksums
b8e894c5613d6c1ae05a5e63abbdc7f778daefed47691b7e090dbaeac3edc1ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / fitwise-0.1.1-py3-none-any.whl

Download URL fitwise-0.1.1-py3-none-any.whl
Size 38.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d915287075feb019bdc251f069f715bac587cf7f29e06ce27ab9cac5922a0df4
BLAKE2b-256 checksum
How to use checksums
8bc62dcaa2c74d03f3112f68070176fd3e3880ec06140d781d7f5bf7a3800838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for fitwise 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fitwise-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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