Metadata-Version: 2.4
Name: taufactor
Version: 1.2.1
Summary: TauFactor is an application for calculating tortuosity factors from tomographic data
Maintainer-email: tldr group <samuel.cooper@imperial.ac.uk>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Environment :: GPU
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: matplotlib>=3.4
Requires-Dist: pyvista>=0.38
Requires-Dist: tifffile>=2023.2.3
Requires-Dist: scikit-image>=0.20.0
Requires-Dist: scipy>=1.3
Requires-Dist: psutil>=5.9.0
Requires-Dist: ipython>=7.0.0
Requires-Dist: torch>=2.1
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Provides-Extra: notebooks
Requires-Dist: ipywidgets; extra == "notebooks"
Requires-Dist: ipympl; extra == "notebooks"
Requires-Dist: notebook; extra == "notebooks"
Dynamic: license-file

# TauFactor

TauFactor is an application for calculating tortuosity factors from tomographic data.

-   Free software: MIT license
-   Documentation: [https://taufactor.readthedocs.io](https://taufactor.readthedocs.io).

<p align="center">
<img src="https://tldr-group.github.io/static/media/tau_example.2c29eaf9.png" alt="TauFactor" width="324" height="324">
</p>
<p align="center">
<a style="border-width:0" href="https://doi.org/10.21105/joss.05358">
  <img src="https://joss.theoj.org/papers/10.21105/joss.05358/status.svg" alt="DOI badge" >
</a>
<a href="https://pypi.python.org/pypi/taufactor">
        <img src="https://img.shields.io/pypi/v/taufactor.svg"
            alt="PyPI"></a>
<a href="https://taufactor.readthedocs.io/en/latest/?badge=latest">
        <img src="https://readthedocs.org/projects/taufactor/badge/?version=latest"
            alt="ReadTheDocs"></a>
<a href="https://opensource.org/licenses/MIT">
        <img src="https://img.shields.io/badge/License-MIT-yellow.svg"
            alt="MIT LICENSE"></a>
<img src="https://github.com/tldr-group/taufactor/actions/workflows/taufactor.yml/badge.svg"
        alt="github actions">

</p>

## Requirements

Before installing taufactor, [download the most recent version of PyTorch](https://pytorch.org/get-started/locally/). Ensure you have `pytorch>=1.10` installed in your Python environment.

For example, for a Linux machine with CUDA GPU

```
conda install pytorch pytorch-cuda=11.7 -c pytorch -c nvidia
```

## Quickstart

To install TauFactor via PyPI

```
pip install taufactor
```

To extract effective diffusivity and tortuosity factor from your data:

```python
import taufactor as tau
import tifffile

# load image
img = tifffile.imread('path/filename')
# ensure 1s for conductive phase and 0s otherwise.

# create a solver object with loaded image
s = tau.Solver(img)

# call solve function
s.solve()

# view effective diffusivity and tau
print(s.D_eff, s.tau)

```

## Tests

To run unit tests navigate to the root directory and run

```
pytest
```

## Credits

This package was created by the [tldr group](https://tldr-group.github.io/) at the Dyson School of Design Engineering, Imperial College London.

## TauFactor MATLAB

The package in this repository refers to a Python implementation of the TauFactor solver. There is a deprecated [MATLAB implementation](https://www.mathworks.com/matlabcentral/fileexchange/57956-taufactor), which is no longer maintained.
