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


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

Uploaded Source

Built Distributions

lsqfit-13.2.3-cp312-cp312-win_amd64.whl (155.7 kB view details)

Uploaded CPython 3.12 Windows x86-64

lsqfit-13.2.3-cp312-cp312-musllinux_1_2_x86_64.whl (719.9 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

lsqfit-13.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (697.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

lsqfit-13.2.3-cp312-cp312-macosx_11_0_arm64.whl (160.5 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

lsqfit-13.2.3-cp312-cp312-macosx_10_9_x86_64.whl (169.0 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

lsqfit-13.2.3-cp311-cp311-win_amd64.whl (156.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

lsqfit-13.2.3-cp311-cp311-musllinux_1_2_x86_64.whl (738.4 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

lsqfit-13.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (707.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

lsqfit-13.2.3-cp311-cp311-macosx_11_0_arm64.whl (159.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

lsqfit-13.2.3-cp311-cp311-macosx_10_9_x86_64.whl (168.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

lsqfit-13.2.3-cp310-cp310-win_amd64.whl (156.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

lsqfit-13.2.3-cp310-cp310-musllinux_1_2_x86_64.whl (685.1 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

lsqfit-13.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (657.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lsqfit-13.2.3-cp310-cp310-macosx_11_0_arm64.whl (159.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

lsqfit-13.2.3-cp310-cp310-macosx_10_9_x86_64.whl (167.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

lsqfit-13.2.3-cp39-cp39-win_amd64.whl (156.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

lsqfit-13.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (660.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lsqfit-13.2.3-cp39-cp39-macosx_11_0_arm64.whl (160.1 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

lsqfit-13.2.3-cp39-cp39-macosx_10_9_x86_64.whl (168.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for lsqfit-13.2.3.tar.gz
Algorithm Hash digest
SHA256 8ee8bb42a78671a97ae0a85f02d988df8959fda477ad6f0d26da5015196f7ced
MD5 25605d8b84538b9b8a5dffea638350f8
BLAKE2b-256 2b2198a28539e2d1cbba0508ffef41d47b49c13595e93dc0b1868a5b6f615924

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lsqfit-13.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 643e731407c0a151a3394ed8d7ac65c313a8481d2c4196f020ce166f943f9fa4
MD5 0400c636d92d9a460d8107f07cc277a5
BLAKE2b-256 052a8f964b2573d2751527deea133a3f78fd0cda1967d2e324279f02cb9226db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 249749bd7e1375a17b0e41274c42fbdd55df11b010bc7f42231e8f2ec19af90d
MD5 901ddd48a5efba5eecf8d92a55a9c651
BLAKE2b-256 df975a124f001aecbfb0a2a202f7104ad7add2ce65f95f075bb050e520971a6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a2453da153b8b15789ce5fe61e0df70ff9ee9cad1053acdff36c246e16d3c6a
MD5 86288ee965a2bfa49a4cd4bb4b7042f9
BLAKE2b-256 c7843d63b2735dfeb33e0f79b51ba42961ae04510634bb988a80b53060c1f5c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b63ab2d3795282c9613a790fcfd275ba93ab4e3d66c91e287d06b6c8282b280
MD5 4eb6bed04cac21548d06678c998b2ac4
BLAKE2b-256 7ee4f727aa14c3cdebdd16ec3a8d81689866af9732660a8073cf61c0ac4a035b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 448099df20779408bc98694d0a52f6d03d02702287264a7b92d3988ffc7d1a28
MD5 0ae1dbefb5d1ce03273ec420702f7a1c
BLAKE2b-256 49877c08b0e0b0efd89dde4593e3085a094170a178f47b6510bc540ec5f2bcc6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lsqfit-13.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d28235554f706836514df8bc6d43562b3d1aca47062af2eaf3141f6c836ba09a
MD5 a9dd1f8abf1e2530d6245560ea6f0899
BLAKE2b-256 10ab65ed3ed5ff2795d8400ac18747609398e1e40130a169bc78ad8e0933d58b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 64fd5c07d7b92e3d04dfaa95fe743e8513b0547f7f8602b830576ed9c471219f
MD5 238fd4881cdb4a7f0cf21d8adc489651
BLAKE2b-256 6f3981b8297704fd982e4a22676e274f46fc1fa6913f3c954e1f6a2548919189

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 503eea9772254ee21c5f2218f8ac5d1d8803864c7148e00249fd5d542316ed17
MD5 3825093a130d858aec4de26fc9b9cb9f
BLAKE2b-256 2208b3615a74e9f028d4a430d2a7656a4761b887537958f23a2e2644d83d413e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 625066f6b6b53b6274926f74dbe4bebea523f684bf828e06f96b4025f04662a5
MD5 20e303740d21e6d4af2f0f87e792f28f
BLAKE2b-256 b1d00002cf8fd113c8d4055cb91e37972d3879251aeca8c173e9f7d9247547fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7d1e649d04f21c0a20c51e97d3a73e132cb9daff0d8af6dd33ac61d167231168
MD5 efb637a70b994c64a5a2517558028508
BLAKE2b-256 5e9a03bb9e32cf61426fb5e362b6644d4877baf29748b253b71bcd602393c496

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lsqfit-13.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c2ce26a75f35bf0ac0ea21df7e8500a6282a4ffe66525b8c65172dc28fa91470
MD5 18b30166f940a7724672680a0bff7184
BLAKE2b-256 2d259abd0d0a7eeab0f6fb915d178f4b21785b13dbea2899f0624f941994d977

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ef2321b49031537694e337da7a8bc37e931eba4f4e9dc60c754fee815b25da8a
MD5 fe5cac1272f8bbd173d55f4ff902da97
BLAKE2b-256 1033696edf744186c3147e95724fe3cf9e4e0c4da68485edcf1735b3284055fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 373b0107e56c8cf8f410bbe4d4012514cd97e7ad378db72793a9f313b07db8a6
MD5 8cbf71c9399733a60bc53d374dab8539
BLAKE2b-256 788ed63a535310da1e77951a330b8806e135b1f5f253f21988e5cdf929b7752f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1cee663c9de3aa55d0724a8f971ba39bce5ab8432f1a04cfe6e34e70d51d7f0
MD5 8e82fc96d652dcf703236111d21cdf3d
BLAKE2b-256 c5ae3f89092184030f2b8b584f8ed182b2dea446ff53265998951acf1de0c165

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 743f1bd3020a800200420bed09d8e4d7fc70307e18ff252ac5a8ce0b39391321
MD5 7072199b2edd43591182f02a001e8cd4
BLAKE2b-256 6b9f84ac5a1f03f2863ef195bc87b3af38668a2a38049520a21eb19afae0c140

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lsqfit-13.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9e294c1ab42b04d60fcd8ea89539f2e3c3423157c233852787c6d8f77c458c45
MD5 88cefb75cc392838da10268c0e766f87
BLAKE2b-256 56689b52920f84b6de7f00c3767b5c70b5a6a393e0269453e0f27fe704d254de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4c840a5a637fc837a049d673f5964074f475c32d6fdeaee7fd330bce95f1792
MD5 32b3fbe29c3f30db468253af68d15539
BLAKE2b-256 e02df24724cf2b3800cd2df8d8ef52d96315336c23c6e680d9f6cef6d448f02a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c034bcd96dda41896e5beef3cf33c6335a52c5613da27d817acf7b0e5339d0d
MD5 6f58b52fd43c8701c1e7acddc9546d00
BLAKE2b-256 0a002d89edde6ae3d4c40972fc3dd84292e849ddad733e622e3dd6481da29b4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsqfit-13.2.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0521160cbba2da27c37cf378b8a1ad90beb6dcc57ef2c420562dacfa36703bbc
MD5 6d6b9caf0de26f077ce14458d3c3d432
BLAKE2b-256 deaa96cc88205fecc665b45ae97f44f93f483016573ba3cde9f0cdc04d659b02

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