PESTpy
A pure-Python parameter estimation and uncertainty analysis package for
environmental and geophysical models. pestpy bridges the gap between
scipy.optimize.least_squares and PEST++ by providing two core algorithms:
- GLM (Gauss-Levenberg-Marquardt) – A deterministic optimizer with an explicit multi-lambda testing loop and Marquardt scaling. Suitable for non-linear least-squares calibration problems.
- iES (Iterative Ensemble Smoother) – A stochastic ensemble-based smoother based on the mathematics from Fienen et al. (2025). It simultaneously upgrades an ensemble of parameter realizations while adding observation noise to prevent ensemble collapse.
Installation
pip install pestpysuite
Or directly from source:
pip install .
Quick Start
import numpy as np
from pestpy import GLMOptimizer, IESOptimizer
# --- GLM example ---
def model(params):
return params[0] * np.array([1.0, 2.0, 3.0]) + params[1]
obs = np.array([2.1, 4.0, 6.1])
p0 = np.array([1.0, 0.0])
glm = GLMOptimizer(model, obs)
result = glm.fit(p0)
print("GLM solution:", result)
# --- iES example ---
n_params, n_obs, n_real = 2, 3, 50
ensemble = np.random.randn(n_params, n_real)
ies = IESOptimizer(model, obs)
ensemble_updated = ies.fit(ensemble)
print("iES posterior mean:", ensemble_updated.mean(axis=1))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pestpysuite-0.0.1.tar.gz
(7.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pestpysuite-0.0.1.tar.gz.
File metadata
- Download URL: pestpysuite-0.0.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87cd585a34317165b274f525d0e5b981388b34db2fea61da5645e96bab2cb5a3
|
|
| MD5 |
2978c9c7b5a0b06bd4c768317bb4d7fd
|
|
| BLAKE2b-256 |
a2aaeaaf7cd7d45abe1ef1d64737bf555b08fe67f4aac6fed2bd397556e871b4
|
File details
Details for the file pestpysuite-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pestpysuite-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e358d3ce2ac68b6062ce9b7689e09a27b6b24ea021e7a971aa57335c935ac79a
|
|
| MD5 |
1a5357920731369ce8a0f77c2fa40f50
|
|
| BLAKE2b-256 |
4afde313d9b554634e6dcd385a4eae3f6e8d52c08034f0d8c9af4556a04e99e7
|