Skip to main content

Package for piecewise linear fitting of noisy data

Project description

Piecewise Linear Fits to Noisy Data

PyPI package GitHub Release Actions Status License

Use this package to perform efficient piecewise linear fits to noisy data.

Installation

Install the latest released version from pypi using:

pip install pwlfit

The required dependencies are numpy, scipy, yaml.

The changes with each version are documented here.

Quick Start

Fit some sample data included in this package using:

from pwlfit.util import read_sample_data
from pwlfit.grid import Grid
from pwlfit.driver import PWLinearFitter

x, y, ivar = read_sample_data('A')
grid = Grid(x, ngrid=100)

fitter = PWLinearFitter(grid)

fit = fitter(y, ivar)

plt.plot(x, y, '.')
plt.plot(fit.xknots, fit.yknots, 'o-');

to produce this plot:

Fit to sample A data

For more details see the Quickstart notebook: readonly or live (via google colab).

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

pwlfit-0.2.0.tar.gz (84.5 kB view details)

Uploaded Source

Built Distribution

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

pwlfit-0.2.0-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file pwlfit-0.2.0.tar.gz.

File metadata

  • Download URL: pwlfit-0.2.0.tar.gz
  • Upload date:
  • Size: 84.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pwlfit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f02fec14dde888589266f634e334dd6c741ccb9d51a797257c546aac2b30f929
MD5 207900ea4493388bf4d961c1574f1caa
BLAKE2b-256 3dbc33b406f03089146fd851badf1953c92eb67209703a239bc7429ac20745f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwlfit-0.2.0.tar.gz:

Publisher: release.yml on dkirkby/pwlfit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pwlfit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pwlfit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 78.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pwlfit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d00a89c39f2e8ed64f1f52483ac5e3d5b0dff98a76d7dbacd74f48dba50e5a
MD5 d9bb7ab1d1addca1a2c597b6ceb724e9
BLAKE2b-256 710214cab95d73a0cd9a698465e0e11f62160dadf101214b5926e9be225e1a1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwlfit-0.2.0-py3-none-any.whl:

Publisher: release.yml on dkirkby/pwlfit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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