Kinetic Inverse-Laplace Toolbox for MEM fitting
Project description
pyKilt — Kernel-based Inverse Laplace Transform
pyKilt is a lightweight Python package for recovering fluorescence lifetime distributions using the Maximum Entropy Method (MEM). It supports 1D MEM (single-decay) and 2D / global MEM (τ–τ maps or stacks) with optional IRF reconvolution and annealed regularization.
Quick links
- Full docs: ./docs/ (installation, tutorials, 1D/2D guides, plotting)
- Examples: ./docs/examples/ (1d_example.py, 2d_example.py)
Installation
From PyPI:
pip install pyKilt
From source (dev):
git clone <repo>
cd pyKilt
pip install -e .[dev]
Minimal usage
1D (single decay)
import numpy as np
import jax.numpy as jnp
from pyKilt import KiltConfig, run_ilt_1d
from pyKilt.plotting import plot_1d_fit, plot_1d_distribution
time = np.linspace(0, 15, 500)
hist = np.loadtxt("my_decay.txt")
tau = jnp.linspace(0.02, 5, 200)
cfg = KiltConfig(use_irf_convolution=True, optimize_eta=True)
res = run_ilt_1d(time, tau, hist, cfg)
# plot best result
fig, ax = plot_1d_fit(time, hist, res["best"]["fit"])
fig, ax = plot_1d_distribution(tau, res["best"]["A"])
2D (global / τ–τ maps)
from pyKilt import KiltConfig, run_ilt_2d
# time: (n_times,), corr_maps: user-provided maps array, tau: lifetime grid
cfg = KiltConfig(global_fit=True, use_irf_convolution=True, optimize_eta=True)
res2d = run_ilt_2d(time, tau, corr_maps, cfg, A_init=A_init)
Key config options (KiltConfig)
- tau (lifetime grid)
- optimize_eta, eta_start, eta_end, eta_rounds — annealing schedule for MEM regularization
- use_irf_convolution, irf, optimize_irf_shift — enable reconvolution and IRF shift search
- global_fit / A_init — for 2D/global fitting
- maxiter, rounds_per_eta, conv_pad, sigma2, baseline — solver tuning
Tips
- Start with a coarse tau grid and short annealing to find stable settings, then refine.
- Provide experimental IRF and enable reconvolution + IRF shift for accurate fits.
- Inspect
res["trials"]to monitor annealing progression andres["best"]for final outputs. - Use plotting helpers in
pyKilt.plottingto visualize fits and τ–τ maps.
Documentation & examples
See the docs folder for detailed step-by-step guides:
- ./docs/usage/1d.md — 1D workflows and examples
- ./docs/usage/2d.md — 2D/global workflows, A_init suggestions
- ./docs/usage/plotting.md — plotting helpers
- ./docs/examples/ — runnable example scripts
Contributing
Open issues or PRs for bugs, examples, doc improvements or feature requests.
License
MIT License See LICENSE in repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykilt-0.5.0.tar.gz.
File metadata
- Download URL: pykilt-0.5.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f165d6ab9f62dd5d496856a384a021b93cdc1184a5f9777566fc6115c632047
|
|
| MD5 |
0815d7a8f508122b9019684c89f85872
|
|
| BLAKE2b-256 |
fd6db56cb46988a54706cecdfdb068d852614b4bb3a9191dafc4f6d6b5f26d16
|
Provenance
The following attestation bundles were made for pykilt-0.5.0.tar.gz:
Publisher:
publish.yml on AdrienR09/pyKilt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pykilt-0.5.0.tar.gz -
Subject digest:
5f165d6ab9f62dd5d496856a384a021b93cdc1184a5f9777566fc6115c632047 - Sigstore transparency entry: 983857423
- Sigstore integration time:
-
Permalink:
AdrienR09/pyKilt@a1218fb8c5d93d2e3df023ff4f387bc3133e66ec -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/AdrienR09
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a1218fb8c5d93d2e3df023ff4f387bc3133e66ec -
Trigger Event:
release
-
Statement type:
File details
Details for the file pykilt-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pykilt-0.5.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cc4915dda8b7f42cbd740ce93dbb19dad38cc350db0aebcd67932c344bc4bd1
|
|
| MD5 |
95c63224863cae9f3cbfff036d1dbd7e
|
|
| BLAKE2b-256 |
6056ab5f38327604d4ab6e137dd6857ec37c2c118e21ed1d6f1734f01796c878
|
Provenance
The following attestation bundles were made for pykilt-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on AdrienR09/pyKilt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pykilt-0.5.0-py3-none-any.whl -
Subject digest:
9cc4915dda8b7f42cbd740ce93dbb19dad38cc350db0aebcd67932c344bc4bd1 - Sigstore transparency entry: 983857427
- Sigstore integration time:
-
Permalink:
AdrienR09/pyKilt@a1218fb8c5d93d2e3df023ff4f387bc3133e66ec -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/AdrienR09
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a1218fb8c5d93d2e3df023ff4f387bc3133e66ec -
Trigger Event:
release
-
Statement type: