{"id":32175883,"url":"https://github.com/pmeal/porespy","last_synced_at":"2025-10-21T19:50:53.819Z","repository":{"id":31616506,"uuid":"35181546","full_name":"PMEAL/porespy","owner":"PMEAL","description":"A set of tools for characterizing and analyzing 3D images of porous materials","archived":false,"fork":false,"pushed_at":"2025-10-14T12:52:29.000Z","size":1634756,"stargazers_count":370,"open_issues_count":40,"forks_count":110,"subscribers_count":23,"default_branch":"dev","last_synced_at":"2025-10-20T04:47:06.854Z","etag":null,"topics":["3d-images","image-analysis","porespy","porous-materials","porous-media","python","scientific-visualization","tomography","voxel-generator"],"latest_commit_sha":null,"homepage":"https://porespy.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PMEAL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-05-06T20:35:41.000Z","updated_at":"2025-10-19T11:24:19.000Z","dependencies_parsed_at":"2024-01-14T16:13:15.336Z","dependency_job_id":"d5a64c57-507a-4424-9a19-06c5ff981c45","html_url":"https://github.com/PMEAL/porespy","commit_stats":{"total_commits":2818,"total_committers":38,"mean_commits":74.15789473684211,"dds":0.7480482611781405,"last_synced_commit":"86dbe0cf6244e725be6b80986a835863bf900c1c"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/PMEAL/porespy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMEAL%2Fporespy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMEAL%2Fporespy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMEAL%2Fporespy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMEAL%2Fporespy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PMEAL","download_url":"https://codeload.github.com/PMEAL/porespy/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMEAL%2Fporespy/sbom","scorecard":{"id":106931,"data":{"date":"2025-08-11","repo":{"name":"github.com/PMEAL/porespy","commit":"36ebce8d0de369648f79cd8337387c71370e3c2b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 24 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/bump-version-dev.yml:18","Warn: no topLevel permission defined: .github/workflows/bump-version-dev.yml:1","Warn: no topLevel permission defined: .github/workflows/examples.yml:1","Warn: no topLevel permission defined: .github/workflows/gh-pages.yml:1","Warn: no topLevel permission defined: .github/workflows/nightly-dev.yml:1","Warn: no topLevel permission defined: .github/workflows/nightly-pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/release-notes.yml:1","Warn: no topLevel permission defined: .github/workflows/ruff.yml:1","Warn: no topLevel permission defined: .github/workflows/test-duration-logger.yml:1","Warn: no topLevel permission defined: .github/workflows/test-release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.3.0 not signed: https://api.github.com/repos/PMEAL/porespy/releases/107549657","Warn: release artifact v2.3.0 does not have provenance: https://api.github.com/repos/PMEAL/porespy/releases/107549657"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/test-release.yml:120"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bump-version-dev.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/bump-version-dev.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bump-version-dev.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/bump-version-dev.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bump-version-dev.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/bump-version-dev.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/examples.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/examples.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/examples.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/examples.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/examples.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/examples.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/gh-pages.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/gh-pages.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/gh-pages.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-dev.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/nightly-dev.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly-dev.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/nightly-dev.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-pypi.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/nightly-pypi.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly-pypi.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/nightly-pypi.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/pypi.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/pypi.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/pypi.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-notes.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/release-notes.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-notes.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/release-notes.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ruff.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/ruff.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruff.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/ruff.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ruff.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/ruff.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-duration-logger.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-duration-logger.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-duration-logger.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-duration-logger.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-duration-logger.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-duration-logger.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-release.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-release.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-release.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-release.yml:129: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-release.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-release.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-release.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-release.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/test-release.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/tests.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/tests.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/PMEAL/porespy/tests.yml/dev?enable=pin","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  22 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-15T11:16:23.838Z","repository_id":31616506,"created_at":"2025-08-15T11:16:23.838Z","updated_at":"2025-08-15T11:16:23.838Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325299,"owners_count":26311419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-images","image-analysis","porespy","porous-materials","porous-media","python","scientific-visualization","tomography","voxel-generator"],"created_at":"2025-10-21T19:50:49.300Z","updated_at":"2025-10-21T19:50:53.814Z","avatar_url":"https://github.com/PMEAL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/porespy_logo.png\" width=\"25%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n[![image](https://img.shields.io/pypi/v/porespy.svg)](https://pypi.python.org/pypi/porespy/)\n[![image](https://codecov.io/gh/PMEAL/PoreSpy/branch/dev/graph/badge.svg)](https://codecov.io/gh/PMEAL/PoreSpy)\n[![Tests](https://github.com/PMEAL/porespy/actions/workflows/tests.yml/badge.svg?branch=dev)](https://github.com/PMEAL/porespy/actions/workflows/tests.yml)\n[![Examples](https://github.com/PMEAL/porespy/actions/workflows/examples.yml/badge.svg?branch=dev)](https://github.com/PMEAL/porespy/actions/workflows/examples.yml)\n\n# What is PoreSpy?\n\n**PoreSpy** is a collection of image analysis tools used to extract\ninformation from 3D images of porous materials (typically obtained from\nX-ray tomography). There are many packages that offer generalized image\nanalysis tools (i.e **Skimage** and **Scipy.NDimage** in the Python environment,\n**ImageJ**, **MatLab**'s Image Processing Toolbox), but they all require building\nup complex scripts or macros to accomplish tasks of specific use to\nporous media. The aim of **PoreSpy** is to provide a set of pre-written\ntools for all the common porous media measurements. \n\n**PoreSpy** relies heavily on\n[scipy.ndimage](https://docs.scipy.org/doc/scipy/reference/ndimage.html)\nand [scikit-image](https://scikit-image.org/) also known as **skimage**.\nThe former contains an assortment of general image analysis tools such\nas image morphology filters, while the latter offers more complex but\nstill general functions such as watershed segmentation. **PoreSpy** tries \nnot to duplicate any of these general functions so you will also have to\ninstall and learn how to use them to get the most from **PoreSpy**. The\nfunctions in PoreSpy are generally built up using several of the general \nfunctions offered by **skimage** and **scipy**. There are a few functions \nin **PoreSpy** that are implemented natively, but only when necessary.\n\n# Capabilities\n\n**PoreSpy** consists of the following modules:\n\n- `generators`: Routines for generating artificial images of porous\n    materials useful for testing and illustration\n- `filters`: Functions that accept an image and return an altered\n    image\n- `metrics`: Tools for quantifying properties of images\n- `networks`: Algorithms and tools for analyzing images as pore networks\n- `simulations`: Physical simulations on images including drainage\n- `visualization`: Helper functions for creating useful views of the\n    image\n- `io`: Functions for outputting image data in various formats for use in\n    common software\n- `tools`: Various useful tools for working with images\n\n## Gallery\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/montage.svg\" width=\"85%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Cite as\n\n\u003e *Gostick J, Khan ZA, Tranter TG, Kok MDR, Agnaou M, Sadeghi MA, Jervis\n\u003e R.* **PoreSpy: A Python Toolkit for Quantitative Analysis of Porous Media\n\u003e Images.** Journal of Open Source Software, 2019.\n\u003e [doi:10.21105/joss.01296](https://doi.org/10.21105/joss.01296)\n\n# Installation\n\nFor detailed and up to date installation instructions, [see here](https://porespy.org/installation.html)\n\n# Contributing\n\nIf you think you may be interested in contributing to PoreSpy and wish\nto both *use* and *edit* the source code, then you should clone the\n[repository](https://github.com/PMEAL/porespy) to your local machine,\nand install it using the following PIP command:\n\n    pip install -e \"C:\\path\\to\\the\\local\\files\\\"\n\nFor information about contributing, refer to the [contributors\nguide](https://github.com/PMEAL/porespy/blob/dev/CONTRIBUTING.md)\n\n# Acknowledgements\n\nPoreSpy is grateful to [CANARIE](https://canarie.ca) for their generous funding over the past few years.  We would also like to acknowledge the support of [NSERC of Canada](https://www.nserc-crsng.gc.ca/) for funding many of the student that have contributed to PoreSpy since it's inception in 2014.\n\n# Examples\n\nThe following code snippets illustrate generating a 2D image, applying\nseveral filters, and calculating some common metrics. A set of examples\nis included in this repo, and can be [browsed\nhere](https://github.com/PMEAL/porespy/tree/dev/examples).\n\n## Generating an image\n\nPoreSpy offers several ways to generate artificial images, for quick\ntesting and developmnet of work flows, instead of dealing with\nreading/writing/storing of large tomograms.\n\n```python\nimport porespy as ps\nimport matplotlib.pyplot as plt\nim = ps.generators.blobs(shape=[500, 500], porosity=0.6, blobiness=2)\nplt.imshow(im)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig1.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Applying filters\n\nA common filter to apply is the local thickness, which replaces every\nvoxel with the radius of a sphere that overlaps it. Analysis of the\nhistogram of the voxel values provides information about the pore size\ndistribution.\n\n```python\nlt = ps.filters.local_thickness(im)\nplt.imshow(lt)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig2.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\nA less common filter is the application of chords that span the pore\nspace in a given direction. It is possible to gain information about\nanisotropy of the material by looking at the distributions of chords\nlengths in each principle direction.\n\n```python\ncr = ps.filters.apply_chords(im)\ncr = ps.filters.flood(cr, mode='size')\nplt.imshow(cr)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig3.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Calculating metrics\n\nThe metrics sub-module contains several common functions that analyze\nbinary tomogram directly. Examples are simple porosity, as well as\ntwo-point correlation function.\n\n```python\ndata = ps.metrics.two_point_correlation_fft(im)\nfig = plt.plot(*data, 'bo-')\nplt.ylabel('probability')\nplt.xlabel('correlation length [voxels]')\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig4.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\nThe metrics sub-module also contains a suite of functions that produce\nplots based on values in images that have passed through a filter, such\nas local thickness.\n\n```python\nmip = ps.filters.porosimetry(im)\ndata = ps.metrics.pore_size_distribution(mip, log=False)\nplt.imshow(mip)\n# Now show intrusion curve\nplt.plot(data.R, data.cdf, 'bo-')\nplt.xlabel('invasion size [voxels]')\nplt.ylabel('volume fraction invaded [voxels]')\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig5.png\" width=\"50%\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://github.com/PMEAL/porespy/raw/dev/docs/_static/images/fig6.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmeal%2Fporespy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmeal%2Fporespy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmeal%2Fporespy/lists"}