Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pastas: Analysis of Groundwater Time Series

image image image image image

image image image image

Pastas: what is it?

Pastas is an open source python package for processing, simulating and analyzing groundwater time series. The object oriented structure allows for the quick implementation of new model components. Time series models can be created, calibrated, and analysed with just a few lines of python code with the built-in optimization, visualisation, and statistical analysis tools.

Documentation & Examples

Quick Example

# Import Python packages
import pandas as pd
import pastas as ps

# Load head and meteorological observations into a pandas Series
obs = pd.read_csv("head.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()
prec = pd.read_csv("prec.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()
evap = pd.read_csv("evap.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()

# Create and calibrate Pastas model
ml = ps.Model(obs, name="head")
sm = ps.RechargeModel(ml, prec, evap, rfunc=ps.Exponential(), name="recharge")
ml.solve()

# Visualize the model results
ml.plots.results()

image

Get in Touch

  • Questions on Pastas can be asked and answered on Github Discussions.
  • Bugs, feature requests and other improvements can be posted as Github Issues.
  • Pull requests will only be accepted on the development branch (dev) of this repository. Please take a look at the developers section on the documentation website for more information on how to contribute to Pastas.

Quick installation guide

To install Pastas, a working version of Python has to be installed on your computer. We recommend using uv to manage Python and your project dependencies. However, you are free to use any Python installation method you prefer. The Anaconda Distribution is another popular option.

Stable version

To get the latest stable version, use:

pip install pastas

Or with uv:

uv pip install pastas

Update

To update pastas, use:

pip install pastas --upgrade

Developers

To get the latest development version, use:

pip install git+https://github.com/pastas/pastas.git@dev#egg=pastas

Related packages

  • Pastastore is a Python package for managing multiple timeseries and pastas models
  • Metran is a Python package to perform multivariate timeseries analysis using a technique called dynamic factor modelling.
  • Hydropandas can be used to obtain Dutch timeseries (KNMI, Dinoloket, ..)
  • PyEt can be used to compute potential evaporation from meteorological variables.

Dependencies

Pastas depends on a number of Python packages, of which all of the necessary are automatically installed when using the pip install manager. To know which dependencies exist, check the pyproject.toml file.

To install the most important optional dependencies (solver with LmFit and caching via cachetools) at the same time with Pastas use:

pip install pastas[full]

or for the development version use:

pip install git+https://github.com/pastas/pastas.git@dev#egg=pastas[full]

How to Cite Pastas?

If you use Pastas in one of your studies, please cite the Pastas article in Groundwater:

To cite a specific version of Pastas, you can use the DOI provided for each official release (>0.9.7) through Zenodo. Click on the link to get a specific version and DOI, depending on the Pastas version.

  • Collenteur, R., Bakker, M., Caljé, R. & Schaars, F. (XXXX). Pastas: open-source software for time series analysis in hydrology (Version X.X.X). Zenodo. http://doi.org/10.5281/zenodo.1465866

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pastas-2.0.0rc0.tar.gz (252.2 kB view details)

Uploaded Source

Built Distribution

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

pastas-2.0.0rc0-py3-none-any.whl (215.0 kB view details)

Uploaded Python 3

File details

Details for the file pastas-2.0.0rc0.tar.gz.

File metadata

  • Download URL: pastas-2.0.0rc0.tar.gz
  • Upload date:
  • Size: 252.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pastas-2.0.0rc0.tar.gz
Algorithm Hash digest
SHA256 13b70a349dc7d91c9951350b7797bf1382a1b6b852ccde5d16ee2393e4f44057
MD5 9722f69a5c371b2e0fa6a5f1de93e803
BLAKE2b-256 d6b820bf8740dcff3aabcf132e87f8d560a8925b50b5354991312cf9d7c5c0c2

See more details on using hashes here.

File details

Details for the file pastas-2.0.0rc0-py3-none-any.whl.

File metadata

  • Download URL: pastas-2.0.0rc0-py3-none-any.whl
  • Upload date:
  • Size: 215.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pastas-2.0.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 714d5206ed38e7ef9111e66cc46203f0b0e2c7a2b4bf8fb58dda3dd0a672c70b
MD5 fc2eedb1d1d1e03cc9274198d9b6a035
BLAKE2b-256 cf1528e60de90a6a8a05fad08fee6df3a30780d2b303c1c0e19572aa4ec9c405

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 Sentry Error logging StatusPage Status page