pyemu
python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 10 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
12 of 47 committers (25.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Repository
python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
Basic Info
Statistics
- Stars: 189
- Watchers: 26
- Forks: 107
- Open Issues: 27
- Releases: 1
Topics
Metadata Files
README.md
pyEMU
python modules for model-independent FOSM (first-order, second-moment) (a.k.a linear-based, a.k.a. Bayes linear)
uncertainty analyses and data-worth analyses, non-linear uncertainty analyses and interfacing with PEST and PEST++.
pyEMU also has a pure python (pandas and numpy) implementation of ordinary kriging for geostatistical interpolation and
support for generating high-dimensional PEST(++) model interfaces, including support for (very) high-dimensional
ensemble generation and handling
Documentation
Complete user's guide:
https://pyemu.readthedocs.io/en/latest/
The pyEMU documentation is being treated as a first-class citizen! Also see the example notebooks in the repo.
What is pyEMU?
pyEMU is a set of python modules for model-independent, user-friendly, computer model uncertainty analysis. pyEMU is tightly coupled to the open-source suite PEST (Doherty 2010a and 2010b, and Doherty and other, 2010) and PEST++ (Welter and others, 2015, Welter and other, 2012), which are tools for model-independent parameter estimation. However, pyEMU can be used with generic array objects, such as numpy ndarrays.
Several equations are implemented, including Schur's complement for conditional uncertainty propagation (a.k.a. Bayes Linear estimation) (the foundation of the PREDUNC suite from PEST) and error variance analysis (the foundation of the PREDVAR suite of PEST). pyEMU has easy-to-use routines for parameter and data worth analyses, which estimate how increased parameter knowledge and/or additional data effect forecast uncertainty in linear, Bayesian framework. Support is also provided for high-dimensional Monte Carlo analyses via ObservationEnsemble and ParameterEnsemble class, including the null-space monte carlo approach of Tonkin and Doherty (2009); these ensemble classes also play nicely with PESTPP-IES.
pyEMU also includes lots of functionality for dealing with PEST(++) datasets, such as:
* manipulation of PEST control files, including the use of pandas for sophisticated editing of the parameter data and observation data sections
* creation of PEST control files from instruction and template files
* going between site sample files and pandas dataframes - really cool for observation processing
* easy-to-use observation (re)weighting via residuals or user-defined functions
* handling Jacobian and covariance matrices, including functionality to go between binary and ASCII matrices, reading and writing PEST uncertainty files. Covariance matrices can be instantiated from relevant control file sections, such as parameter bounds or observation weights. The base Matrix class overloads most common linear algebra operators so that operations are automatically aligned by row and column name. Builtin SVD is also included in all Matrix instances.
* geostatistics including geostatistical structure support, reading and writing PEST structure files and creating covariance matrices implied by nested geostatistical structures, and ordinary kriging (in the utils.geostats.OrdinaryKrige object), which replicates the functionality of pest utility ppk2fac.
* composite scaled sensitivity calculations
* calculation of correlation coefficient matrix from a given covariance matrix
* Karhunen-Loeve-based parameterization as an alternative to pilot points for spatially-distributed parameter fields
* a helper functions to start a group of tcp/ip workers on a local machine for parallel PEST++/BeoPEST runs
* full support for prior information equations in control files
* preferred differencing prior information equations where the weights are based on the Pearson correlation coefficient
* verification-based tests based on results from several PEST utilities
Version => 1.1 includes the PstFrom setup class to support generating PEST(++) interfaces in the 100,000 to 1,000,000 parameter range with all the bells and whistles. A publication documenting the PstFrom class can be found here:
https://doi.org/10.1016/j.envsoft.2021.105022
A publication documenting pyEMU and an example application can be found here:
http://dx.doi.org/10.1016/j.envsoft.2016.08.017
Funding
pyEMU was originally developed with support from the U.S. Geological Survey. The New Zealand Strategic Science Investment Fund as part of GNS Sciences (https://www.gns.cri.nz/) Groundwater Research Programme has also funded contributions 2018-present. Intera, Inc. has also provided funding for pyEMU development and support
Examples
Several example ipython notebooks are provided to demonstrate typical workflows for FOSM parameter and forecast uncertainty analysis as well as techniques to investigate parameter contributions to forecast uncertainty and observation data worth. Example models include the Henry saltwater intrusion problem (Henry 1964) and the model of Freyberg (1988)
There is a whole world of detailed learning material for script-based approaches to parameter estimation and uncertainty quantification using PEST(++) at https://github.com/gmdsi/GMDSI_notebooks. These are and excellent resource for people picking up Pyemu for the first time and for those needing to revisit elements.
Related Links
Groundwater Modelling Decision Support Initiative
How to get started with pyEMU
pyEMU is available through pyPI and conda. To install pyEMU type:
>>>conda install -c conda-forge pyemu
or
>>>pip install pyemu
pyEMU needs numpy and pandas. For plotting, matplotloib, pyshp, and flopy to take advantage of the auto interface construction
After pyEMU is installed, the PEST++ software suite can be installed for your operating system using the command:
get-pestpp :pyemu
See documentation for more information.
Found a bug? Got a smart idea? Contributions welcome.
Feel free to raise and issue or submit a pull request.
pyEMU CI testing, using GitHub actions, has recently been switched over to run with pytest.
We make use of pytest-xdist for parallel execution.
Some notes that might be helpful for building your PR and testing:
* Test files are in ./autotest
* Pytest settings are in ./autotest/conftest.py and ./autotest/pytest.ini
* Currently, files ending _tests.py or _tests_2.py are collected
* Functions starting test_ or ending _test are collected
* ipython notebooks in .examples are also run
* As tests are run in parallel, where tests require read/write access to files it is safest to sandbox runs.
Pytest has a built-in fixture tmp_path that can help with this.
Setting optional argument --basetemp can be helpful for accessing the locally run files.
Running test locally
To be able to make clean use of pytests fixture decorators etc.,
it is recommended to run local tests through pytest (rather than use from script execution and commenting in
main block). For e.g.:
Run all tests:
pytest --basetemp=runner autotest
with pytest-xdist, local runs can be parallelized:
pytest --basetemp=runner -n auto autotest
Run all tests in a file:
pytest --basetemp=runner -n auto autotest/testfile_tests.py
Run a specific test [this_test()]:
pytest --basetemp=runner autotest/testfiletests.py::thistest
Using an IDE:
Most modern, feature-rich editors and IDEs support launching pytest within debug or run consoles.
Some might need "encouraging" to recognise the non-standard test tags used in this library.
For example, in pycharm, to support click-and-run testing, the
pytest-imp plugin is required to
pickup test functions that end with _test (a nosetest hangover in pyEMU).
Owner
- Name: pypest
- Login: pypest
- Kind: organization
- Repositories: 1
- Profile: https://github.com/pypest
GitHub Events
Total
- Create event: 2
- Release event: 1
- Issues event: 26
- Watch event: 14
- Delete event: 1
- Issue comment event: 78
- Push event: 47
- Pull request review event: 13
- Pull request review comment event: 10
- Pull request event: 60
- Fork event: 10
Last Year
- Create event: 2
- Release event: 1
- Issues event: 26
- Watch event: 14
- Delete event: 1
- Issue comment event: 78
- Push event: 47
- Pull request review event: 13
- Pull request review comment event: 10
- Pull request event: 60
- Fork event: 10
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 2,245
- Total Committers: 47
- Avg Commits per committer: 47.766
- Development Distribution Score (DDS): 0.46
Top Committers
| Name | Commits | |
|---|---|---|
| Jeremy White | j****0@g****m | 1,213 |
| jwhite | j****9@y****m | 370 |
| Brioch | b****h@g****m | 276 |
| Mike Fienen | m****n@u****v | 113 |
| Jeremy White | j****e@g****z | 62 |
| brioch | b****s@g****z | 30 |
| Reeves, Howard W | h****s@u****v | 20 |
| Mike Fienen | m****n@u****v | 18 |
| Wes Kitlasten | w****n@u****v | 16 |
| briochh | b****s@.****z | 16 |
| rhugman | 6****n@u****m | 15 |
| Jeremy White | j****w@m****l | 12 |
| Steve Westenbroek | s****n@u****v | 12 |
| aleaf-usgs | a****f@u****v | 8 |
| Matt Knowling | m****g@g****m | 6 |
| aleaf | a****f@g****m | 5 |
| rosskush | r****h@g****m | 4 |
| Brioch Hemmings | b****h@m****l | 4 |
| Wes Kitlasten | w****n@g****m | 3 |
| Mike Taves | m****s@g****m | 3 |
| Clark, Brian R | b****k@u****v | 3 |
| Wes Kitlasten | w****n@g****z | 3 |
| White | j****e@i****t | 3 |
| Jason Bellino | j****o@u****v | 2 |
| Ayman Alzraiee | a****e@g****m | 2 |
| White | j****e@u****v | 2 |
| Brioch Hemmings | b****h@m****z | 2 |
| Jeremy White | J****e@l****l | 2 |
| Michael N Fienen | m****n@M****l | 2 |
| Chris Nicol | c****l@g****m | 1 |
| and 17 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 117
- Total pull requests: 177
- Average time to close issues: 4 months
- Average time to close pull requests: 6 days
- Total issue authors: 49
- Total pull request authors: 17
- Average comments per issue: 3.77
- Average comments per pull request: 1.41
- Merged pull requests: 159
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 17
- Pull requests: 49
- Average time to close issues: 2 days
- Average time to close pull requests: 10 days
- Issue authors: 14
- Pull request authors: 11
- Average comments per issue: 1.24
- Average comments per pull request: 1.2
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- wkitlasten (17)
- Paszka1 (11)
- briochh (10)
- RyanConway91 (9)
- jtwhite79 (4)
- oscarfasanchez (4)
- aleaf (4)
- BJEANNOT0 (4)
- mnfienen (3)
- hansonmcoombs (3)
- nikobenho (2)
- DStrom1987 (2)
- hjia1005 (2)
- martinvonk (2)
- laat0003 (2)
Pull Request Authors
- jtwhite79 (85)
- briochh (71)
- wkitlasten (10)
- mnfienen (7)
- rhugman (7)
- mwtoews (6)
- jonathanqv (5)
- martinvonk (5)
- laat0003 (4)
- nicohiggs (4)
- jdhughes-usgs (3)
- kmarkovich (3)
- rhugman-intera (2)
- Hugovdberg (2)
- p-ortega (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,239 last-month
- Total dependent packages: 4
- Total dependent repositories: 4
- Total versions: 21
- Total maintainers: 2
pypi.org: pyemu
pyEMU is a set of python modules for interfacing with PEST and PEST++
- Documentation: https://pyemu.readthedocs.io/
- License: BSD 3-Clause
-
Latest release: 1.3.8
published about 1 year ago
Rankings
Maintainers (2)
Dependencies
- actions/checkout v3 composite
- coverallsapp/github-action master composite
- ilammy/msvc-dev-cmd v1 composite
- mamba-org/provision-with-micromamba main composite
- modflowpy/install-modflow-action v1 composite
- seanmiddleditch/gha-setup-ninja master composite
- coveralls
- ffmpeg
- flaky
- flopy
- jinja2
- jupyter
- jupyterlab
- jupytext
- libopenblas <0.3.30
- matplotlib
- modflow-devtools
- nbmake
- numpy
- pandas
- pip
- pyproj
- pyshp
- pytest
- pytest-cov
- pytest-xdist
- python >=3.9
- scikit-learn
- shapely
- numpy *
- pandas *