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.3.1.tar.gz (2.0 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.3.1-cp313-cp313-win_amd64.whl (149.0 kB view details)

Uploaded CPython 3.13Windows x86-64

lsqfit-13.3.1-cp313-cp313-musllinux_1_2_x86_64.whl (696.8 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

lsqfit-13.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (667.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

lsqfit-13.3.1-cp313-cp313-macosx_11_0_arm64.whl (155.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

lsqfit-13.3.1-cp313-cp313-macosx_10_13_x86_64.whl (161.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

lsqfit-13.3.1-cp312-cp312-win_amd64.whl (149.2 kB view details)

Uploaded CPython 3.12Windows x86-64

lsqfit-13.3.1-cp312-cp312-musllinux_1_2_x86_64.whl (700.2 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

lsqfit-13.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (675.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

lsqfit-13.3.1-cp312-cp312-macosx_11_0_arm64.whl (156.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lsqfit-13.3.1-cp312-cp312-macosx_10_13_x86_64.whl (163.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

lsqfit-13.3.1-cp311-cp311-win_amd64.whl (149.4 kB view details)

Uploaded CPython 3.11Windows x86-64

lsqfit-13.3.1-cp311-cp311-musllinux_1_2_x86_64.whl (707.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

lsqfit-13.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (682.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

lsqfit-13.3.1-cp311-cp311-macosx_11_0_arm64.whl (156.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lsqfit-13.3.1-cp311-cp311-macosx_10_9_x86_64.whl (161.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lsqfit-13.3.1-cp310-cp310-win_amd64.whl (149.6 kB view details)

Uploaded CPython 3.10Windows x86-64

lsqfit-13.3.1-cp310-cp310-musllinux_1_2_x86_64.whl (673.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

lsqfit-13.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (645.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

lsqfit-13.3.1-cp310-cp310-macosx_11_0_arm64.whl (156.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lsqfit-13.3.1-cp310-cp310-macosx_10_9_x86_64.whl (161.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lsqfit-13.3.1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lsqfit-13.3.1.tar.gz
Algorithm Hash digest
SHA256 3a17e9411d8bb61af8e8e7f6c3620492f594d87b90b564561fd0acbe3adca6b1
MD5 d3e8adc8395d9b1a899dd2a1cebb09b1
BLAKE2b-256 3e8b6c46ac9685771181e9ee6750b4daf22f97f5cd26666087fb5a1b31d08455

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: lsqfit-13.3.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 149.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lsqfit-13.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b358af14da857d741f584dac8715db9bf6c20c0b6fa6471508e841e2e09875fb
MD5 bcbbb911c57dcf95ca475ba5124abbd4
BLAKE2b-256 c799470e0795147d27e1a903392ac0db9c04e01fe6bf8c1ff3204a1b01feb711

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c9374430847bf87a56ecd5a51f705fa51ce536f02abcedc8f2342b68048ba2ac
MD5 a144a139702ff404b1b569a7e331ab3c
BLAKE2b-256 4593fb0919d485977417ba1c300827ffe5607b766da30968eb43f4297a382b2d

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1944892b1dea2d83aa1dcc570d46143918e9d9ace23792238f71bd663b45fb9f
MD5 671370e998991e5423a5f8b387da3021
BLAKE2b-256 5acb42b3c5b16d67eb8788c29525f06ae813e52b51c037a54d91d1c2826663be

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f305ce2e550ebe69d659ce95fa7478b26d37a7394585e7a96e97a1ca3824bb2e
MD5 e374c0b173bbbafe79308d831eeb6c5c
BLAKE2b-256 5b29a02448c1f6ddc99394130ca595ca95b69ad7dc4c5b5b273c24777c18f946

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0fe1a092d90400c1cc762de336ced8584a7dd5198b94533c343f276b942d42b1
MD5 6e2c1841c60739c52e6ab9d87ab9143b
BLAKE2b-256 ecb671bc55eacce583fb20aba0c65a8577bc1663c84461b4805112c1399a5c41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lsqfit-13.3.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 149.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lsqfit-13.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7cdc405fa824756a43d75fffabdb5a62768400e0f937174e7009e052703e2f8a
MD5 f15a76a4d55d01192d374237f6fa998d
BLAKE2b-256 4162dfee113e523ec7dbd2a7f564b5ac6c98eb04d6b3bd0c4ce1d785c34f9127

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 34d5e68868c7371e4ca53ba347c0c54829dc61d7c62ac83dbedf68dfc00f1047
MD5 c4a67636fbaa11fd7077c950efedfc18
BLAKE2b-256 ff7bab5f907e4c5ecec19604ab34d6786ca1a034b6c3f5d8deb2ed7758e1b4a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dca84700af90783fe140d37bbdc4d5c626ed67337ef53536d21a88cfdc69f04d
MD5 d7419d6a782a637ed6bf2558a48c608f
BLAKE2b-256 706c1176b4005d09436ffd7726aa7b865047ce8343df21f3e14c5c0823b8c42b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31c3db12baa0a7e710f4e85360a69cd060a4c4467563457cd7b8396e298fc512
MD5 137a21bd889a1e09e32e853da07eea4c
BLAKE2b-256 735c170eb7aa1c63cd4d4730cd19487b31604a29a7b4056cbcb9dfaebcfabdbe

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6d112c7527a4e0427a22822cf9d1a1b5a82166f1b4d16ebe53e7597cff399630
MD5 2479147cc9df9e6efb8156bd0f5121bc
BLAKE2b-256 75ecdc5c6d32bf36d546859de3c97f4d29f544cb1492fe2eba4496a35ddf63b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lsqfit-13.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 149.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lsqfit-13.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2d621be1b4a1ac294245e68468e1acee64c7bc419ddab1fb3469ec6cb764a018
MD5 9ae573501bb0b3167950f953e47cc7e9
BLAKE2b-256 345324c7cec60b5caa59d5f3e086fa9924e02004d30088e9e0b87f86ed2fd708

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 22d906d11dbabdaf8ed5f15a7dee7719c7d1a81e08164b6e35684b90273aa9e3
MD5 32a3113664cdcf64aac059f49fdc781b
BLAKE2b-256 518379fc475fffd6ff6dc45dc4859547a9621c7d2137bc78e581d26284a997cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3749a16d8d7e07501986fbe707a373ac4b0818280320bce51dffb951faee3930
MD5 ab0112eb312ac6ca2d2ce490a85bde51
BLAKE2b-256 6bbdf338745017bc349b689fba4f80b3337bab6e9678b8ce129f0433fab2bd05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 666f2ca415a5032ddbd7aca83379127ea18f286176cb46b45e35399169d587ca
MD5 295dee6810796b6cafbcfd5ad8375ff6
BLAKE2b-256 6c76d7b9f7839a27209a95735820c2dfbeb358f0d071f29cd8455cf18d1ff6ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c9c5c60969bc6aae481ebb7c58c49a53d581f181ff1561de1f3d459f0863a77
MD5 2a8c5af6eed094172e620c5fe29d4168
BLAKE2b-256 3672a78931c92c4ccd906f319ced332653a15a906c532d66e72a0a912ff5b68a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lsqfit-13.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 149.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for lsqfit-13.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e99ae750c77c4767f0a8324f085604e01006c54f6def3a285cce07f50e217f0
MD5 8c3d990506e9bbfe8b3408a845e3fdf7
BLAKE2b-256 134dfeae7fe9670df1e18226dfe8f828d4b2709a5271e9f901831492bbf602a8

See more details on using hashes here.

File details

Details for the file lsqfit-13.3.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 23eeeedbd44b089eeb94bc43519418f512bc41a929b9e60be78d85bdecb647e5
MD5 c33eb2757ac6c00a1038660beefb1404
BLAKE2b-256 cc7996488956a57aeef2318f9c95b18c8701de20986cb522efffe403fbb11a20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b5f72d7bec84d9aff264441f92f4dfc81d0905a8aeaa00bf06503b868bf020e
MD5 37712f1161681f14545f012d8a9578fc
BLAKE2b-256 7084d208bb9929745d0beb5e410682ad13e0ed6ffc32dd94caab0695f4653c53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c172252c1363993b2f48c6ae26ad173f4e40549d73b6e01efdb53b7cfe751236
MD5 f96bd04cb21d3a6a93ecbc3fdc852df1
BLAKE2b-256 b3ee3075b596fce8f1dae1563887f3ff950f3fdb01588d2fe219233c3c045ca8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 22ec4a32e782c7f442ae0588f9bc200aa2f6195942ce5f5cccdc4c3bfa5059e8
MD5 654e8f1af564a227bc14b8afcb2b19fc
BLAKE2b-256 f0aaa5e7c14cd871432ea7eb62ac7df17331e147dce538d7ab7e3dd76bda930d

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