Numerical differentiation methods for python, including:
Symmetric finite difference schemes using arbitrary window size.
Savitzky-Galoy derivatives of any polynomial order with independent left and right window parameters.
Spectral derivatives with optional filter.
Spline derivatives of any order.
Polynomial-trend-filtered derivatives generalizing methods like total variational derivatives.
These examples are intended to survey some common differentiation methods. The goal of this package is to bind these common differentiation methods to an easily implemented differentiation interface to encourage user adaptation.
Usage:
from primelab import dxdt
import numpy as np
t = np.linspace(0,2*np.pi,50)
x = np.sin(x)
# Finite differences with central differencing using 3 points.
result1 = dxdt(x, t, kind="finite_difference", k=1)
# Savitzky-Golay using cubic polynomials to fit in a centered window of length 1
result2 = dxdt(x, t, kind="savitzky_golay", left=.5, right=.5, order=3)
# Spectral derivative
result3 = dxdt(x, t, kind="spectral")
# Spline derivative with smoothing set to 0.01
result4 = dxdt(x, t, kind="spline", s=1e-2)
# Total variational derivative with regularization set to 0.01
result5 = dxdt(x, t, kind="trend_filtered", order=0, alpha=1e-2)
Project references:
[1] Numerical differentiation of experimental data: local versus global methods- K. Ahnert and M. Abel
[2] Numerical Differentiation of Noisy, Nonsmooth Data- Rick Chartrand
[3] The Solution Path of the Generalized LASSO- R.J. Tibshirani and J. Taylor
Metadata
Release files for primelab 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| primelab-0.1.2.tar.gz | 8.2 kB | Without provenance | Details for primelab-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| primelab-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for primelab-0.1.2-py3-none-any.whl |
Total release size: 16.7 kB
Release files / primelab-0.1.2.tar.gz
| Download URL | primelab-0.1.2.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcb1f99a02748b61c54d7db797e44faf10222ee8b756eea162f8ac27dac6198c
|
|
BLAKE2b-256 checksum How to use checksums |
39fbe230aa473bc259d023719afbd8a3aa35c2c0571777106682defb437accc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.6 Darwin/19.4.0
|
Release files / primelab-0.1.2-py3-none-any.whl
| Download URL | primelab-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d616dbe66bce0a9d79db5e7bd6808e63d9370eb1d9d6b8eb6f7de34b65e4c4a8
|
|
BLAKE2b-256 checksum How to use checksums |
fb3395f82f8be6dd46ef93d5893217d0760839031889f0ddc809e8b39e758ee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.6 Darwin/19.4.0
|
Security for primelab 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.