Metadata-Version: 2.4
Name: rtdpy
Version: 0.6.1
Summary: Python package for residence time distribution analysis
Author-email: Matthew Flamm <matthew.flamm@merck.com>
License: MIT
Project-URL: Homepage, https://merck.github.io/rtdpy
Project-URL: Repository, https://github.com/Merck/rtdpy
Project-URL: Documentation, https://merck.github.io/rtdpy
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSES_THIRD_PARTY
Requires-Dist: numpy>=1.23.0
Requires-Dist: scipy>=1.9.0
Provides-Extra: dev
Requires-Dist: numpy==2.3.5; extra == "dev"
Requires-Dist: scipy==1.16.3; extra == "dev"
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: dev-min
Requires-Dist: numpy==1.23.0; extra == "dev-min"
Requires-Dist: scipy==1.9.0; extra == "dev-min"
Requires-Dist: pytest>=7.0; extra == "dev-min"
Requires-Dist: pytest-cov>=4.0; extra == "dev-min"
Requires-Dist: ruff>=0.1.0; extra == "dev-min"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: numpydoc>=1.0.0; extra == "docs"
Requires-Dist: matplotlib; extra == "docs"
Requires-Dist: ipython; extra == "docs"
Dynamic: license-file

# rtdpy

Residence Time Distribution modeling in Python.

[https://merck.github.io/rtdpy](https://merck.github.io/rtdpy/)

[![DOI](https://joss.theoj.org/papers/10.21105/joss.01621/status.svg)](https://doi.org/10.21105/joss.01621)

## A simple example
Create a family of tanks in series (N-CSTRs) and analyze them
```python
import matplotlib.pyplot as plt
import rtdpy
for n in [1, 2, 5, 10, 100]:
    a = rtdpy.Ncstr(tau=1, n=n, dt=.001, time_end=5)
    plt.plot(a.time, a.exitage, label="n={}".format(n))
plt.legend()
plt.xlabel('Time')
plt.ylabel('Exit Age Function')
plt.title('Impulse Responses')
```

![N-Cstr RTDs](images/ncstr.png?raw=true "N-Cstr RTDs")

## Installation
```bash
pip install rtdpy
```

## Issues/Requests/Contributions
See [CONTRIBUTING.md](CONTRIBUTING.md)

## Development and Testing
It is recommended to use a virtual environment for developing/testing.

```bash
git clone https://github.com/Merck/rtdpy.git  # or use your forked repo
cd rtdpy
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"  # install package with dev dependencies

# run all tests with coverage
pytest
```

Tests are written using `pytest` and configuration is in `pyproject.toml`. See [pytest documentation](https://docs.pytest.org/en/latest/) for more details.

Author: Matthew Flamm

Email: <matthew.flamm@merck.com>
