Skip to main content

Utilities for nonlinear least-squares fits.

Project description

This package facilitates least-squares fitting of noisy data by multi-dimensional, nonlinear functions of arbitrarily many parameters. lsqfit supports Bayesian priors for the fit parameters, with arbitrarily complicated multidimensional Gaussian distributions. A tutorial on fitting is included in the documentation; documentation is in the doc/ subdirectory: see doc/html/index.html or <https://lsqfit.readthedocs.io>.

The fitter uses automatic differentiation to compute gradients of the fit function. This greatly simplifies coding of the fit function since only the function itself need be coded. Coding is also simplified by using dictionaries (instead of arrays) for representing fit data and fit priors.

lsqfit makes heavy use of Python package gvar, which simplifies the analysis of error propagation and the creation of multi-dimensional Gaussian distributions (for fit priors).

This code has been used on a laptop to fit functions of tens-to-thousands of parameters to tens-to-thousands of pieces of data. lsqfit uses the GNU Scientific Library (GSL) and/or scipy to do the fitting, numpy for efficient array arithmetic, and cython to compile efficient code that interfaces between Python and the C-based GSL.

Information on how to install the components is in the INSTALLATION file.

To test the libraries try make tests. Some examples are give in the examples/ subdirectory.

Version numbers: Incompatible changes are signaled by incrementing the major version number, where version numbers have the form major.minor.patch. The minor number signals new features, and the patch number bug fixes.

Created by G. Peter Lepage (Cornell University) 2008
Copyright (c) 2008-2021 G. Peter Lepage
https://zenodo.org/badge/4593457.svg

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

lsqfit-13.0.4.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lsqfit-13.0.4-cp312-cp312-win_amd64.whl (148.2 kB view details)

Uploaded CPython 3.12Windows x86-64

lsqfit-13.0.4-cp312-cp312-musllinux_1_1_x86_64.whl (688.9 kB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

lsqfit-13.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (693.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

lsqfit-13.0.4-cp312-cp312-macosx_11_0_arm64.whl (155.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lsqfit-13.0.4-cp312-cp312-macosx_10_9_x86_64.whl (164.4 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lsqfit-13.0.4-cp311-cp311-win_amd64.whl (148.0 kB view details)

Uploaded CPython 3.11Windows x86-64

lsqfit-13.0.4-cp311-cp311-musllinux_1_1_x86_64.whl (703.8 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

lsqfit-13.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (699.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

lsqfit-13.0.4-cp311-cp311-macosx_11_0_arm64.whl (154.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lsqfit-13.0.4-cp311-cp311-macosx_10_9_x86_64.whl (163.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lsqfit-13.0.4-cp310-cp310-win_amd64.whl (148.0 kB view details)

Uploaded CPython 3.10Windows x86-64

lsqfit-13.0.4-cp310-cp310-musllinux_1_1_x86_64.whl (650.6 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

lsqfit-13.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (651.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

lsqfit-13.0.4-cp310-cp310-macosx_11_0_arm64.whl (154.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lsqfit-13.0.4-cp310-cp310-macosx_10_9_x86_64.whl (163.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lsqfit-13.0.4-cp39-cp39-win_amd64.whl (148.3 kB view details)

Uploaded CPython 3.9Windows x86-64

lsqfit-13.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (654.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

lsqfit-13.0.4-cp39-cp39-macosx_11_0_arm64.whl (155.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

lsqfit-13.0.4-cp39-cp39-macosx_10_9_x86_64.whl (163.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file lsqfit-13.0.4.tar.gz.

File metadata

  • Download URL: lsqfit-13.0.4.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for lsqfit-13.0.4.tar.gz
Algorithm Hash digest
SHA256 b9f834867eb637c4ece88031cc06e0cc5c424b6bb7986b6fce89f545d32359ad
MD5 99fc60a9bfb69ae13a5c9ef1c0a56685
BLAKE2b-256 6c8b517dfe45c4a729448fd82e90d584284fd5be932cb64f1559ebcf5b212b31

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: lsqfit-13.0.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 148.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for lsqfit-13.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 004fa97c6870b90f2a3a2afb68d3b2075e5d1b39c55c4c746797a3134d479c22
MD5 df43bc4a60f0b6e41df6c3ac42a7eb36
BLAKE2b-256 16d3ab51fe184cc36812b8af4317ce78429faf8ebc3cbcef01c258566587a297

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0d08675b0a533a6952b470d422c1760fe69d6c59ffda182cedf7137e3f8d2a61
MD5 89d962b6f4bbf8c4b96e093b584789bb
BLAKE2b-256 e56ba829270f482948bfc3022584dce03d78056ffc9a5fba058bce3ffdd268d9

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 942c42c9d95f11c396fc861017808ecf69649ecece3e49d8cf69cc59bf6a5303
MD5 1b3f6fe60eea0c0ff55f1691959043ac
BLAKE2b-256 189df74b3122032386473c8da279057af4a5fe4ff86b7a541408df04da3268d2

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9072497b52fec389e2ee42e8e1762be4b28eb569129d1259c4d2afb602d6fb7
MD5 445e1187837d3e8f82ace5f16db9b170
BLAKE2b-256 9b4544a19461da4b41501f5d37ade8f02945139ed5e906785bfafe3aade9aba9

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e31827a0a73422f690678a2e4cfdd7db47a501ec98621eae55c9576d7ce2f31c
MD5 29d8c7c5aa9b9da980caf66341fd06f8
BLAKE2b-256 c46201025edf3ddcfba14ef7320ddb212a696738067d202ad3df113d31a42948

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: lsqfit-13.0.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 148.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for lsqfit-13.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14094dbcddd9bae9f0d5737d39815298068d3dcdc7f85a126e248ecf75dce08a
MD5 b4722822ef3df2f4047002f0f50bd3a8
BLAKE2b-256 f8a94d5fc0a27a6bec7807327bb2eb948602b7ec988d19b7ab61ef80be4f111f

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fa45a6c2ddf3fc6eb279a45dfb5a65b1f7c81879dbbdbe5caa0285fdf92272f8
MD5 5ad968f8b6f56b5b797a5bb71a63b6c5
BLAKE2b-256 7ab4a18f401978eda17ded7deae9394d9346b89660783a095363ba721f2fe501

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6151d0242b37ca81af9bec867c9d1de196a95ca2746a74ea4dbed6a11bed6732
MD5 2db1d952a73aeb1759525f534a0f434a
BLAKE2b-256 0b1c9f52339a60de0dd624ee86e1275c55f4f1fd42bfbbefd8a8ca5aeb2f4849

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98ee1592afae2ca2678f0112c314632b811db324385f805a284860dd12a017f7
MD5 73bd7616bf3fab8ad7c0d573ae58b16c
BLAKE2b-256 21dd43395cb475d8c3e2daca68503dcc0f4c2d5e141fc5280fc2c027d2768ab6

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 48458addc1b57848636679c3aa07ae5e9271b5f747d3ad83132bf6f31561c27f
MD5 1b2ac59c8e88583a163dcba131dfbecf
BLAKE2b-256 d90799eedd329b6f88b2c078afbdc1c886e940bd6662968c3a0fe8e2ce2c7ea8

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: lsqfit-13.0.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 148.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for lsqfit-13.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7106352f67b5aca8ae2954ac85fb9a47b745a701897f441bff93bbd89a3d5130
MD5 ae21388905716ff0ac49cb655574ddf9
BLAKE2b-256 2dd1621e4eb0bc47a7c6fb04d804cd16ce76672b7465a24e575dfda4e7b045a2

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e806665ea2b7e4b54200ac0cbdbe9a0e9a3ae57a0b29605aaaae5bbaed2d64c1
MD5 893c83962fc3678eb548629be585083c
BLAKE2b-256 b4b00c481400b8273958fd0c7f8e11e2f2d11451af692f60d74ed640fa35c975

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e39c73648b6cc1920107498035503f6c61af3cf208b4b3876128bf0a5776df85
MD5 cb91c84aa709a3acc5c6b71da7979909
BLAKE2b-256 37238f826aea625d196ec0d2134c8de7f1416851ac55ce0a9912f96b0e3f91a0

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f61b5f22557364926bafc7a0daccce18fe70935c0bd06f0d5743a2e2f59c0138
MD5 18e00ab7042408d5e202a29c6766b752
BLAKE2b-256 261baf38a67352cae1bce45e5768513d38bc8a4c6e70dec577b95322855e05b7

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6a3674ac59596f17f777c14632d581b996f67fb4e5ae78429a00910be5d0a6f7
MD5 cd30b0b77294b39eae002543876cc2de
BLAKE2b-256 b0cc7e7c11d553c47e52258a8beb650bd5ab783339fecd1f40cafcd7394a9604

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: lsqfit-13.0.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 148.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for lsqfit-13.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d9f0eeb53a1dc2001fde36a4932d26f3b6d49d07eeb3a039ea19703287e5f2a4
MD5 a5d2d474eee3081dd4eff9ca8451c6cc
BLAKE2b-256 a5bb7437a35f1c636d12d8d08eefb60357df47c9de560cb32f59c6c24ca0439e

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56a84490564563429208eac9591872696152e0bbfcaf3d16582b1944507af865
MD5 3bc22e6f919840a8edede25ef55eaf81
BLAKE2b-256 b1e4f7997a3c76ab0dc79ee1dc873fa0f7adcb90c08363b6cad7e50699835bf6

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 807d0f0d0d35e7d0f59e6bf156c12f8c328693db50c6d69a6f01763f6e8df444
MD5 7c644b414ae965e0cacc759821d52431
BLAKE2b-256 83e517323b51b5432e1a249409ab954022fb77b05a2ee36004ff876b65e7ce88

See more details on using hashes here.

File details

Details for the file lsqfit-13.0.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.0.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dfc772778534ccb81860c0c3938981d71712602ccb0c4b0b037b96595ce88402
MD5 b7e0867ecbc1ce5784dced7933ac2d2b
BLAKE2b-256 53824e1cd558d25b0e34dd512a026c8c16e56a49181f95d7f553d66bb4856d5d

See more details on using hashes here.

Supported by

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