Metadata-Version: 2.1
Name: taufactor
Version: 1.0.0
Summary: TauFactor is an application for calculating tortuosity factors from tomographic data
Home-page: https://github.com/tldr-group/taufactor
Author: Isaac Squires
Author-email: is21@ic.ac.uk
License: MIT license
Keywords: taufactor
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.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.5
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md

# 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 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.


# History

## 1.0.0 (2023-03-23)

---

-   Migrated to PyTorch from CuPy
-   New convergence criteria
-   New documentation style
-   CI testing
-   Includes TauFactor paper

## 0.1.4 (2022-07-11)

---

-   Add TauE solver
-   Add triple phase boundary calculations
-   Fix cuboids not converging
-   Fix convergence messaging

## 0.1.3 (2021-03-25)

---

-   Hotfix code in taufactor.py

## 0.1.2 (2021-03-25)

---

-   Added multi-phase and periodic solvers and metrics calculations

## 0.1.1 (2021-02-10)

---

-   Removed CuPy from requirements and added installation instructions to README

## 0.1.0 (2021-02-08)

---

-   First release on PyPI.
