ilt-py-lib


Nameilt-py-lib JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://apps.fz-juelich.de/iltpy
SummaryA python library for inverse Laplace transform of one dimensional and multidimensional data.
upload_time2025-08-27 00:22:14
maintainerNone
docs_urlNone
authorDavis Thomas Daniel, Josef Granwehr
requires_python<3.14,>=3.9
licenseNone
keywords epr nmr drt inverse laplace transform laplace inversion relaxation impedance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ILTpy 1.0.0
<div align="center">
<img src="https://jugit.fz-juelich.de/iet-1/iltpy/-/raw/main/logo/iltpy_readme.gif?ref_type=heads" width="90%" alt="iltpy_logo">

 [![ILTpy_test](https://jugit.fz-juelich.de/iet-1/iltpy/badges/main/pipeline.svg?key_text=ILTpy%20Tests&key_width=80)](https://jugit.fz-juelich.de/iet-1/iltpy/-/pipelines) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fapps.fz-juelich.de%2Filtpy%2F&up_message=online&label=ILTpy%20Docs)](https://apps.fz-juelich.de/iltpy/)
[![coverage_report](https://jugit.fz-juelich.de/iet-1/iltpy/badges/main/coverage.svg?key_text=Test%20coverage&key_width=90)]( https://jugit.fz-juelich.de/iet-1/iltpy/-/pipelines) [![PyPI - Version](https://img.shields.io/pypi/v/ilt-py-lib?label=Version)](https://pypi.org/project/ilt-py-lib/) [![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fjugit.fz-juelich.de%2Fiet-1%2Filtpy%2F-%2Fraw%2Fmain%2Fpyproject.toml%3Fref_type%3Dheads)](https://www.python.org/)
 [![PyPI - Downloads](https://img.shields.io/pypi/dm/ilt-py-lib?label=Downloads)](https://pypi.org/project/ilt-py-lib/) [![PyPI - License](https://img.shields.io/pypi/l/ilt-py-lib?label=License)
](https://jugit.fz-juelich.de/iet-1/iltpy/-/blob/main/LICENSE?ref_type=heads)

</div>

## Introduction

**ILTpy** (/ɪltˈpaɪ/) is a python library for performing regularized inversion of one-dimensional or multi-dimensional data without non-negativity constraint. Contributions to respective distributions with both positive and negative sign are determined. Primary applications include magnetic resonance (NMR, EPR), and electrochemical impedance spectroscopy (distribution of relaxation times; DRT). Algorithmic details and parametrization are described in : [J. Granwehr, P.J. Roberts, J. Chem. Theory Comput. 8, 3473­3482 (2012)](https://doi.org/10.1021/ct3001393)

## Documentation

Visit [ILTpy's documentation](https://apps.fz-juelich.de/iltpy/index.html).  

## Demo
[Try ILTpy in your web browser](https://apps.fz-juelich.de/iltpy/demo) or jump to [quick start](https://jugit.fz-juelich.de/iet-1/iltpy/-/tree/main?ref_type=heads#-quick-start).

## Installation

### Prerequisites
* To install and use **ILTpy**, Python must be installed on your device and be available on system PATH. 
* **ILTpy** is compatible with Python 3.9, 3.10, 3.11, 3.12 and 3.13.
* **ILTpy** can be installed using python's package manager, pip.
* A python virtual environment is recommended.

### Installing from PyPi

* Run the following command in a terminal:

```python
python -m pip install ilt-py-lib
```

### Installing from FZJ's app server

* Run the following command in a terminal:

```python
python -m pip install --index-url https://apps.fz-juelich.de/iltpy/packages --extra-index-url https://pypi.org/simple ilt-py-lib
```

### Installing from source

* Clone this repository.
* Navigate to the local directory where ILTpy was downloaded/extracted. The **ILTpy** directory should contain a `setup.py` file along with other folders.
* While inside the **ILTpy** directory, run the following command in a terminal (or command prompt) :

```python
python -m pip install .
```

### Dependencies

* python >=3.9,<3.14
* scipy>=1.13.1,<=1.16.0 
* numpy>1.25.1,<=2.3.1 
* joblib>=1.4.2,<=1.5.1
* tqdm

More information on using **ILTpy** can be found [here](https://apps.fz-juelich.de/iltpy/index.html). 

## ⚡ Quick-start
A workflow using ILTpy and synthetic exponential decay data wth noise is shown below. 
First, we generate some synthetic data for analysis :

<details>
<summary> Click to show</summary>

```python
# --- Simulate synthetic data ---

import numpy as np

def kww(t, taus, betas, amps):

    """Kohlrausch–Williams–Watts function"""
    
    return sum(a * np.exp(-(t / tau) ** b) for tau, b, a in zip(taus, betas, amps))

# Time vector (input sampling points)
t_syn = np.linspace(0, 1024,1024) 

# Simulate data with two components at 10 and 100 with different amplitudes
data_syn = kww(t_syn, taus=[10,100], betas=[1, 1], amps=[1, 0.5])

# Add noise to the simulated data
noise_level = 0.01
data_syn = data_syn + np.random.randn(t_syn.size)*noise_level

# scale data so that noise variance is 1 before analysis using ILTpy
data_syn = data_syn/noise_level
```

</details>
<br>
The synthetic data consists of two components with time constants 10 and 100, which is reproduced in the distribution after inversion.
The residuals obtained after inversion are random and devoid of systematic features, indicating a good fit to the data and a compatible kernel.

#### ILTpy Workflow
```python
# --- ILTpy workflow ---
# assuming data_syn and t_syn are numpy arrays with the data and the sampling vector.

# Import ILTpy
import iltpy as ilt

# Load the data into iltpy using iltload
synILT = ilt.iltload(data=data_syn, t=t_syn)

# Specify parameters and  initialize inversion
tau = np.logspace(-1, 4, 100) # output sampling points
synILT.init(tau=tau, kernel=ilt.Exponential())

# Perform inversion
synILT.invert()
```
```bash
Starting iterations ...
100%|██████████| 100/100 [00:00<00:00, 423.44it/s]
Done.
```
```python
## Reporting

# Save the results
synILT.report(filepath='syn_data_ILT.txt')

# Plot the results
from iltpy.output.plotting import iltplot
iltplot(synILT)
```

<div align="center">
<img src="https://jugit.fz-juelich.de/iet-1/iltpy/-/raw/main/docs/source/images/getting_started_example_syn_data.png?ref_type=heads" width="60%" alt="iltpy_quick_start_result">
</div>

## Team
* [Dr. Davis Thomas Daniel](https://davistdaniel.github.io/introduction/) (Lead developer)
* Christian Bartsch
* Franz Philipp Bereck
* Dr. Simone Köcher
* Dr. Christoph Scheurer
* Prof. Dr. Josef Granwehr (Project lead)

## License

Copyright (c) 2025 Davis Thomas Daniel, Josef Granwehr and [other contributors](https://jugit.fz-juelich.de/iet-1/iltpy#team).

ILTpy is licensed under the GNU Lesser General Public License v3.0.
See the [LICENSE](https://jugit.fz-juelich.de/iet-1/iltpy/-/blob/main/LICENSE?ref_type=heads) file for details.

## Citation

If you use **ILTpy** in your work, please cite it (using the appropriate version):

```bibtex
@software{iltpy,
  author       = {Davis Thomas Daniel and Christian Bartsch and Franz Philipp Bereck and Simone Köcher and Christoph Scheurer and Josef Granwehr},
  title        = {ILTpy},
  year         = {2025},
  version      = {1.0.0},
  url          = {https://apps.fz-juelich.de/iltpy/},
  doi          = {10.1021/ct3001393}
}

            

Raw data

            {
    "_id": null,
    "home_page": "https://apps.fz-juelich.de/iltpy",
    "name": "ilt-py-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9",
    "maintainer_email": "Davis Thomas Daniel <davisthomasdaniel@gmail.com>",
    "keywords": "EPR, NMR, DRT, Inverse Laplace transform, Laplace inversion, Relaxation, Impedance",
    "author": "Davis Thomas Daniel, Josef Granwehr",
    "author_email": "Davis Thomas Daniel <davisthomasdaniel@gmail.com>, Josef Granwehr <j.granwehr@fz-juelich.de>",
    "download_url": "https://files.pythonhosted.org/packages/2f/71/97c8cdd5d20df24d92c7007da1b88a906e14c279a18f73d19cdfb00c7519/ilt_py_lib-1.0.0.tar.gz",
    "platform": null,
    "description": "# ILTpy 1.0.0\n<div align=\"center\">\n<img src=\"https://jugit.fz-juelich.de/iet-1/iltpy/-/raw/main/logo/iltpy_readme.gif?ref_type=heads\" width=\"90%\" alt=\"iltpy_logo\">\n\n [![ILTpy_test](https://jugit.fz-juelich.de/iet-1/iltpy/badges/main/pipeline.svg?key_text=ILTpy%20Tests&key_width=80)](https://jugit.fz-juelich.de/iet-1/iltpy/-/pipelines) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fapps.fz-juelich.de%2Filtpy%2F&up_message=online&label=ILTpy%20Docs)](https://apps.fz-juelich.de/iltpy/)\n[![coverage_report](https://jugit.fz-juelich.de/iet-1/iltpy/badges/main/coverage.svg?key_text=Test%20coverage&key_width=90)]( https://jugit.fz-juelich.de/iet-1/iltpy/-/pipelines) [![PyPI - Version](https://img.shields.io/pypi/v/ilt-py-lib?label=Version)](https://pypi.org/project/ilt-py-lib/) [![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fjugit.fz-juelich.de%2Fiet-1%2Filtpy%2F-%2Fraw%2Fmain%2Fpyproject.toml%3Fref_type%3Dheads)](https://www.python.org/)\n [![PyPI - Downloads](https://img.shields.io/pypi/dm/ilt-py-lib?label=Downloads)](https://pypi.org/project/ilt-py-lib/) [![PyPI - License](https://img.shields.io/pypi/l/ilt-py-lib?label=License)\n](https://jugit.fz-juelich.de/iet-1/iltpy/-/blob/main/LICENSE?ref_type=heads)\n\n</div>\n\n## Introduction\n\n**ILTpy** (/\u026alt\u02c8pa\u026a/) is a python library for performing regularized inversion of one-dimensional or multi-dimensional data without non-negativity constraint. Contributions to respective distributions with both positive and negative sign are determined. Primary applications include magnetic resonance (NMR, EPR), and electrochemical impedance spectroscopy (distribution of relaxation times; DRT). Algorithmic details and parametrization are described in : [J. Granwehr, P.J. Roberts, J. Chem. Theory Comput. 8, 3473\u00ad3482 (2012)](https://doi.org/10.1021/ct3001393)\n\n## Documentation\n\nVisit [ILTpy's documentation](https://apps.fz-juelich.de/iltpy/index.html).  \n\n## Demo\n[Try ILTpy in your web browser](https://apps.fz-juelich.de/iltpy/demo) or jump to [quick start](https://jugit.fz-juelich.de/iet-1/iltpy/-/tree/main?ref_type=heads#-quick-start).\n\n## Installation\n\n### Prerequisites\n* To install and use **ILTpy**, Python must be installed on your device and be available on system PATH. \n* **ILTpy** is compatible with Python 3.9, 3.10, 3.11, 3.12 and 3.13.\n* **ILTpy** can be installed using python's package manager, pip.\n* A python virtual environment is recommended.\n\n### Installing from PyPi\n\n* Run the following command in a terminal:\n\n```python\npython -m pip install ilt-py-lib\n```\n\n### Installing from FZJ's app server\n\n* Run the following command in a terminal:\n\n```python\npython -m pip install --index-url https://apps.fz-juelich.de/iltpy/packages --extra-index-url https://pypi.org/simple ilt-py-lib\n```\n\n### Installing from source\n\n* Clone this repository.\n* Navigate to the local directory where ILTpy was downloaded/extracted. The **ILTpy** directory should contain a `setup.py` file along with other folders.\n* While inside the **ILTpy** directory, run the following command in a terminal (or command prompt) :\n\n```python\npython -m pip install .\n```\n\n### Dependencies\n\n* python >=3.9,<3.14\n* scipy>=1.13.1,<=1.16.0 \n* numpy>1.25.1,<=2.3.1 \n* joblib>=1.4.2,<=1.5.1\n* tqdm\n\nMore information on using **ILTpy** can be found [here](https://apps.fz-juelich.de/iltpy/index.html). \n\n## \u26a1 Quick-start\nA workflow using ILTpy and synthetic exponential decay data wth noise is shown below. \nFirst, we generate some synthetic data for analysis :\n\n<details>\n<summary> Click to show</summary>\n\n```python\n# --- Simulate synthetic data ---\n\nimport numpy as np\n\ndef kww(t, taus, betas, amps):\n\n    \"\"\"Kohlrausch\u2013Williams\u2013Watts function\"\"\"\n    \n    return sum(a * np.exp(-(t / tau) ** b) for tau, b, a in zip(taus, betas, amps))\n\n# Time vector (input sampling points)\nt_syn = np.linspace(0, 1024,1024) \n\n# Simulate data with two components at 10 and 100 with different amplitudes\ndata_syn = kww(t_syn, taus=[10,100], betas=[1, 1], amps=[1, 0.5])\n\n# Add noise to the simulated data\nnoise_level = 0.01\ndata_syn = data_syn + np.random.randn(t_syn.size)*noise_level\n\n# scale data so that noise variance is 1 before analysis using ILTpy\ndata_syn = data_syn/noise_level\n```\n\n</details>\n<br>\nThe synthetic data consists of two components with time constants 10 and 100, which is reproduced in the distribution after inversion.\nThe residuals obtained after inversion are random and devoid of systematic features, indicating a good fit to the data and a compatible kernel.\n\n#### ILTpy Workflow\n```python\n# --- ILTpy workflow ---\n# assuming data_syn and t_syn are numpy arrays with the data and the sampling vector.\n\n# Import ILTpy\nimport iltpy as ilt\n\n# Load the data into iltpy using iltload\nsynILT = ilt.iltload(data=data_syn, t=t_syn)\n\n# Specify parameters and  initialize inversion\ntau = np.logspace(-1, 4, 100) # output sampling points\nsynILT.init(tau=tau, kernel=ilt.Exponential())\n\n# Perform inversion\nsynILT.invert()\n```\n```bash\nStarting iterations ...\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 100/100 [00:00<00:00, 423.44it/s]\nDone.\n```\n```python\n## Reporting\n\n# Save the results\nsynILT.report(filepath='syn_data_ILT.txt')\n\n# Plot the results\nfrom iltpy.output.plotting import iltplot\niltplot(synILT)\n```\n\n<div align=\"center\">\n<img src=\"https://jugit.fz-juelich.de/iet-1/iltpy/-/raw/main/docs/source/images/getting_started_example_syn_data.png?ref_type=heads\" width=\"60%\" alt=\"iltpy_quick_start_result\">\n</div>\n\n## Team\n* [Dr. Davis Thomas Daniel](https://davistdaniel.github.io/introduction/) (Lead developer)\n* Christian Bartsch\n* Franz Philipp Bereck\n* Dr. Simone K\u00f6cher\n* Dr. Christoph Scheurer\n* Prof. Dr. Josef Granwehr (Project lead)\n\n## License\n\nCopyright (c) 2025 Davis Thomas Daniel, Josef Granwehr and [other contributors](https://jugit.fz-juelich.de/iet-1/iltpy#team).\n\nILTpy is licensed under the GNU Lesser General Public License v3.0.\nSee the [LICENSE](https://jugit.fz-juelich.de/iet-1/iltpy/-/blob/main/LICENSE?ref_type=heads) file for details.\n\n## Citation\n\nIf you use **ILTpy** in your work, please cite it (using the appropriate version):\n\n```bibtex\n@software{iltpy,\n  author       = {Davis Thomas Daniel and Christian Bartsch and Franz Philipp Bereck and Simone K\u00f6cher and Christoph Scheurer and Josef Granwehr},\n  title        = {ILTpy},\n  year         = {2025},\n  version      = {1.0.0},\n  url          = {https://apps.fz-juelich.de/iltpy/},\n  doi          = {10.1021/ct3001393}\n}\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A python library for inverse Laplace transform of one dimensional and multidimensional data.",
    "version": "1.0.0",
    "project_urls": {
        "Changelog": "https://jugit.fz-juelich.de/iet-1/iltpy/-/blob/main/CHANGELOG",
        "Documentation": "https://apps.fz-juelich.de/iltpy",
        "Homepage": "https://apps.fz-juelich.de/iltpy",
        "Issues": "https://jugit.fz-juelich.de/iet-1/iltpy/-/issues",
        "Repository": "https://jugit.fz-juelich.de/iet-1/iltpy"
    },
    "split_keywords": [
        "epr",
        " nmr",
        " drt",
        " inverse laplace transform",
        " laplace inversion",
        " relaxation",
        " impedance"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2500aba8954c441705e4ba3d9ade3afe4dbd34bd1dca67630d3dfbc7c0d22bd2",
                "md5": "39a8f70fc4cb46e40926feacda483610",
                "sha256": "e0d393e128c3988ea9ed42de0720d6148ac0ce16354dffcb76d4ab3cd72fb9b6"
            },
            "downloads": -1,
            "filename": "ilt_py_lib-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39a8f70fc4cb46e40926feacda483610",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9",
            "size": 60524,
            "upload_time": "2025-08-27T00:22:13",
            "upload_time_iso_8601": "2025-08-27T00:22:13.392104Z",
            "url": "https://files.pythonhosted.org/packages/25/00/aba8954c441705e4ba3d9ade3afe4dbd34bd1dca67630d3dfbc7c0d22bd2/ilt_py_lib-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2f7197c8cdd5d20df24d92c7007da1b88a906e14c279a18f73d19cdfb00c7519",
                "md5": "0a2f329df6775e48a1b4a004272608be",
                "sha256": "c1ddf4f78950c117f2154255f8784ecee7762685c3993d79efb4c99c7cb63475"
            },
            "downloads": -1,
            "filename": "ilt_py_lib-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0a2f329df6775e48a1b4a004272608be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9",
            "size": 49803,
            "upload_time": "2025-08-27T00:22:14",
            "upload_time_iso_8601": "2025-08-27T00:22:14.801783Z",
            "url": "https://files.pythonhosted.org/packages/2f/71/97c8cdd5d20df24d92c7007da1b88a906e14c279a18f73d19cdfb00c7519/ilt_py_lib-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 00:22:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ilt-py-lib"
}
        
Elapsed time: 0.82685s