PoreSpy
PoreSpy: A Python Toolkit for Quantitative Analysis of Porous Media Images - Published in JOSS (2019)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
10 of 40 committers (25.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Scientific Fields
Repository
A set of tools for characterizing and analyzing 3D images of porous materials
Basic Info
- Host: GitHub
- Owner: PMEAL
- License: mit
- Language: Python
- Default Branch: dev
- Homepage: https://porespy.org
- Size: 1.49 GB
Statistics
- Stars: 364
- Watchers: 24
- Forks: 107
- Open Issues: 32
- Releases: 27
Topics
Metadata Files
README.md
What is PoreSpy?
PoreSpy is a collection of image analysis tools used to extract information from 3D images of porous materials (typically obtained from X-ray tomography). There are many packages that offer generalized image analysis tools (i.e Skimage and Scipy.NDimage in the Python environment, ImageJ, MatLab's Image Processing Toolbox), but they all require building up complex scripts or macros to accomplish tasks of specific use to porous media. The aim of PoreSpy is to provide a set of pre-written tools for all the common porous media measurements.
PoreSpy relies heavily on scipy.ndimage and scikit-image also known as skimage. The former contains an assortment of general image analysis tools such as image morphology filters, while the latter offers more complex but still general functions such as watershed segmentation. PoreSpy tries not to duplicate any of these general functions so you will also have to install and learn how to use them to get the most from PoreSpy. The functions in PoreSpy are generally built up using several of the general functions offered by skimage and scipy. There are a few functions in PoreSpy that are implemented natively, but only when necessary.
Capabilities
PoreSpy consists of the following modules:
generators: Routines for generating artificial images of porous materials useful for testing and illustrationfilters: Functions that accept an image and return an altered imagemetrics: Tools for quantifying properties of imagesnetworks: Algorithms and tools for analyzing images as pore networkssimulations: Physical simulations on images including drainagevisualization: Helper functions for creating useful views of the imageio: Functions for outputting image data in various formats for use in common softwaretools: Various useful tools for working with images
Gallery
Cite as
Gostick J, Khan ZA, Tranter TG, Kok MDR, Agnaou M, Sadeghi MA, Jervis R. PoreSpy: A Python Toolkit for Quantitative Analysis of Porous Media Images. Journal of Open Source Software, 2019. doi:10.21105/joss.01296
Installation
For detailed and up to date installation instructions, see here
Contributing
If you think you may be interested in contributing to PoreSpy and wish to both use and edit the source code, then you should clone the repository to your local machine, and install it using the following PIP command:
pip install -e "C:\path\to\the\local\files\"
For information about contributing, refer to the contributors guide
Acknowledgements
PoreSpy is grateful to CANARIE for their generous funding over the past few years. We would also like to acknowledge the support of NSERC of Canada for funding many of the student that have contributed to PoreSpy since it's inception in 2014.
Examples
The following code snippets illustrate generating a 2D image, applying several filters, and calculating some common metrics. A set of examples is included in this repo, and can be browsed here.
Generating an image
PoreSpy offers several ways to generate artificial images, for quick testing and developmnet of work flows, instead of dealing with reading/writing/storing of large tomograms.
python
import porespy as ps
import matplotlib.pyplot as plt
im = ps.generators.blobs(shape=[500, 500], porosity=0.6, blobiness=2)
plt.imshow(im)
Applying filters
A common filter to apply is the local thickness, which replaces every voxel with the radius of a sphere that overlaps it. Analysis of the histogram of the voxel values provides information about the pore size distribution.
python
lt = ps.filters.local_thickness(im)
plt.imshow(lt)
A less common filter is the application of chords that span the pore space in a given direction. It is possible to gain information about anisotropy of the material by looking at the distributions of chords lengths in each principle direction.
python
cr = ps.filters.apply_chords(im)
cr = ps.filters.flood(cr, mode='size')
plt.imshow(cr)
Calculating metrics
The metrics sub-module contains several common functions that analyze binary tomogram directly. Examples are simple porosity, as well as two-point correlation function.
python
data = ps.metrics.two_point_correlation_fft(im)
fig = plt.plot(*data, 'bo-')
plt.ylabel('probability')
plt.xlabel('correlation length [voxels]')
The metrics sub-module also contains a suite of functions that produce plots based on values in images that have passed through a filter, such as local thickness.
```python mip = ps.filters.porosimetry(im) data = ps.metrics.poresizedistribution(mip, log=False) plt.imshow(mip)
Now show intrusion curve
plt.plot(data.R, data.cdf, 'bo-') plt.xlabel('invasion size [voxels]') plt.ylabel('volume fraction invaded [voxels]') ```
Owner
- Name: PMEAL
- Login: PMEAL
- Kind: organization
- Email: jgostick@gmail.com
- Location: Waterloo, ON
- Website: pmeal.com
- Repositories: 9
- Profile: https://github.com/PMEAL
Porous Materials Engineering and Analysis Lab
JOSS Publication
PoreSpy: A Python Toolkit for Quantitative Analysis of Porous Media Images
Authors
Department of Chemical Engineering, University of Waterloo, Waterloo, ON, Canada, Department of Chemical Engineering, University College London, London, United Kingdom
Tags
porous media tomography image analysisCitation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Gostick"
given-names: "Jeff"
orcid: "https://orcid.org/0000-0001-7736-7124"
title: "PoreSpy"
url: "https://github.com/PMEAL/porespy"
preferred-citation:
type: article
authors:
- family-names: "Gostick"
given-names: "Jeff"
orcid: "https://orcid.org/0000-0001-7736-7124"
- family-names: "Khan"
given-names: "Zohaib A."
- family-names: "Tranter"
given-names: "Thomas"
- family-names: "Kok"
given-names: "Matthew"
- family-names: "Agnaou"
given-names: "Mehrez"
- family-names: "Sadeghi"
given-names: "Mohammadamin"
- family-names: "Jervis"
given-names: "Rhodri"
doi: "10.21105/joss.01296"
journal: "Journal of Open Source Software"
title: "PoreSpy: A python toolkit for quantitative analysis of porous media images"
year: 2019
Papers & Mentions
Total mentions: 1
Use of deep learning for structural analysis of computer tomography images of soil samples
- DOI: 10.1098/rsos.201275
- OpenAlex ID: https://openalex.org/W3150393068
- Published: March 2021
GitHub Events
Total
- Issues event: 104
- Watch event: 52
- Delete event: 43
- Member event: 1
- Issue comment event: 109
- Push event: 255
- Pull request event: 89
- Fork event: 10
- Create event: 59
Last Year
- Issues event: 104
- Watch event: 52
- Delete event: 43
- Member event: 1
- Issue comment event: 109
- Push event: 255
- Pull request event: 89
- Fork event: 10
- Create event: 59
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jeff Gostick | j****k@g****m | 1,907 |
| Amin Sadeghi | a****i@l****m | 662 |
| Author | a****s@g****m | 160 |
| Zohaib | z****q@y****m | 139 |
| Ni2M | n****h@u****a | 116 |
| Tom Tranter | t****r@u****a | 71 |
| Hamed Fathiannasab | h****n@u****a | 40 |
| Matthew Lam | m****m@e****a | 37 |
| madeline_am | m****e@u****a | 37 |
| Vasu Venkateshwaran | v****l@g****m | 27 |
| Tom Tranter | t****r@g****m | 26 |
| rickyfann3265 | r****7@l****a | 19 |
| mdrkok | m****k@g****m | 17 |
| Rafael Arenhart | r****t@l****r | 13 |
| Bryan W. Weber | b****r@g****m | 7 |
| Mehrez Agnaou | m****b@g****m | 7 |
| Pascal Ruzzante | p****e@g****m | 7 |
| Anthero1 | a****v@g****m | 6 |
| Mike McKague | m****9@g****m | 6 |
| Sreeyuth Lal | s****h@g****m | 6 |
| github-actions | 4****] | 5 |
| Rômulo Cenci | r****i@l****r | 5 |
| Hamed Fathiannasab | h****n@g****m | 3 |
| James Butler | j****r@s****m | 3 |
| Jihye Oh | j****h@u****a | 3 |
| ajavadim | a****m@u****a | 3 |
| amirDahari1 | a****i@m****l | 3 |
| David Haberthür | d****r@u****h | 3 |
| Scott Zero | S****o@w****m | 3 |
| Zohaib | 2 | |
| and 10 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 185
- Total pull requests: 189
- Average time to close issues: 9 months
- Average time to close pull requests: 27 days
- Total issue authors: 33
- Total pull request authors: 21
- Average comments per issue: 1.11
- Average comments per pull request: 1.16
- Merged pull requests: 151
- Bot issues: 0
- Bot pull requests: 26
Past Year
- Issues: 52
- Pull requests: 94
- Average time to close issues: about 2 months
- Average time to close pull requests: 9 days
- Issue authors: 13
- Pull request authors: 8
- Average comments per issue: 0.67
- Average comments per pull request: 0.72
- Merged pull requests: 71
- Bot issues: 0
- Bot pull requests: 20
Top Authors
Issue Authors
- jgostick (100)
- ma-sadeghi (34)
- amirDahari1 (5)
- heinsimon (5)
- morendong (3)
- mkaguer (3)
- xiaorong117 (3)
- lucianoguedes8 (2)
- yojeep (1)
- Curf (1)
- likeduck (1)
- ivonindima (1)
- Kyle-RuidongLI (1)
- Maoxinmaoxin (1)
- xiangWu-WW (1)
Pull Request Authors
- jgostick (113)
- ma-sadeghi (30)
- github-actions[bot] (13)
- dependabot[bot] (13)
- habi (8)
- Anthero1 (4)
- mkaguer (4)
- rickyfann (4)
- heinsimon (2)
- emmanuel-ferdman (2)
- cmaloney111 (2)
- amirDahari1 (2)
- takeruhukushima (2)
- PascalRuzzante (2)
- Daniel-olaO (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 2,798 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 10
(may contain duplicates) - Total versions: 35
- Total maintainers: 2
pypi.org: porespy
A set of tools for analyzing 3D images of porous materials
- Homepage: https://porespy.org
- Documentation: https://porespy.org
- License: MIT License
-
Latest release: 2.4.3
published 4 months ago
Rankings
Maintainers (2)
conda-forge.org: porespy
PoreSpy is a collection of image analysis tool used to extract information from 3D images of porous materials (typically obtained from X-ray tomography). There are many packages that offer generalized image analysis tools (i.e Skimage and Scipy.NDimage in the Python environment, ImageJ, MatLab's Image Processing Toolbox), but the all require building up complex scripts or macros to accomplish tasks of specific use to porous media. The aim of PoreSpy is to provide a set of pre-written tools for all the common porous media measurements.
- Homepage: https://github.com/PMEAL/porespy/
- License: MIT
-
Latest release: 2.2.2
published about 3 years ago
Rankings
Dependencies
- dask *
- deprecated *
- edt *
- imageio *
- loguru *
- matplotlib *
- numba *
- numpy *
- numpy-stl *
- openpnm *
- pandas *
- psutil *
- pyevtk *
- pyfastnoisesimd *
- scikit-fmm *
- scikit-image *
- scipy *
- tqdm *
- trimesh *
- actions/checkout v3 composite
- actions/setup-python v2 composite
- stefanzweifel/git-auto-commit-action v4 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- repo-sync/pull-request v2 composite
- actions/checkout v2 composite
- FedericoCarboni/setup-ffmpeg v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- conda-incubator/setup-miniconda v2 composite
- peaceiris/actions-gh-pages v3 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish master composite
- Roang-zero1/github-create-release-action master composite
- actions/checkout v2 composite
- EndBug/add-and-commit v7 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- codecov/codecov-action v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- dask *
- deprecated *
- edt *
- imageio *
- matplotlib *
- numba *
- numpy *
- numpy-stl *
- pandas *
- psutil *
- pyevtk *
- rich *
- scikit-fmm *
- scikit-image *
- scikit-learn *
- scipy *
- tqdm *
- trimesh *
- ipykernel *
- ipython *
- ipywidgets *
- jupyterlab_widgets *
- mock *
- myst-nb *
- pandoc *
- pydata-sphinx-theme =0.9
- sphinx *
- sphinx-copybutton *
- sphinx-design *
- codecov * test
- coverage * test
- jupyter * test
- nbval * test
- pytest * test
- pytest-cache * test
- pytest-cov * test
- pytest-custom-exit-code * test
- pytest-pycodestyle * test
- pytest-split * test
- imageio *
- numpy-stl *
- pyevtk *
- pyfastnoisesimd *
- scikit-fmm *
- scikit-learn *
- tensorflow *
- trimesh *