Skip to main content

Python package for residence time distribution analysis

Project description

rtdpy

Residence Time Distribution modeling in Python.

https://merck.github.io/rtdpy

DOI

A simple example

Create a family of tanks in series (N-CSTRs) and analyze them

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

Installation

pip install rtdpy

Issues/Requests/Contributions

See CONTRIBUTING.md

Testing

Tests are written using pytest. numpy and scipy must also be installed in the environment if using pytest directly. tox can also be used to test against Python versions 3.5, 3.6, and 3.7. See pytest documentation for how to use and interpret pytest results.

It is recommended to use a virtual environment for developing/testing.

git clone https://github.com/Merck/rtdpy.git  # or use your forked repo
cd rtdpy
python3 -m venv .venv
source .venv/bin/activate
pip install -e .  # will also install numpy and scipy dependencies
pip install pytest tox

# run all tests
pytest

# run tests and style check for Python versions 3.5, 3.6, and 3.7, if available.
tox

Author: Matthew Flamm

Email: matthew.flamm@merck.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtdpy-0.6.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

rtdpy-0.6.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file rtdpy-0.6.0.tar.gz.

File metadata

  • Download URL: rtdpy-0.6.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for rtdpy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 ff8746cecfdcf72f837da1c2932de619f7e6849d810b5b290b6b804fe9cf32a9
MD5 68911b6e382ce6306dc47efa1245d935
BLAKE2b-256 53510b2956f10b2eb0b64188f31a401714b83ebd0d9f525f92612616e6f8d480

See more details on using hashes here.

File details

Details for the file rtdpy-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: rtdpy-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for rtdpy-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca669aa26e6b255f1f0709b4d71f5677f36afa79e81e720e31eb4815b5adc2e7
MD5 00e39e5cdbd9ed58cc65ea99bbcd6568
BLAKE2b-256 974d0f43b785ae1d809b81335f986186f24008b693d8f0556c6edbafb2d7fb72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page